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>2021-10-01 17:05:10 +0300
committerDavid Benson [draw.io] <david@jgraph.com>2021-10-01 17:05:10 +0300
commite3828225564f57f81dd5228050dcb027cd144ad9 (patch)
tree4f0a1a5bc65f49e27cb4f08ecb85e536b92ff887
parentbd75812c2c2a9b1b21d829f300ea51da58f21b8b (diff)
15.4.1 releasev15.4.1
-rw-r--r--ChangeLog8
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/js/app.min.js4614
-rw-r--r--src/main/webapp/js/diagramly/Editor.js7
-rw-r--r--src/main/webapp/js/diagramly/Menus.js9
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js1
-rw-r--r--src/main/webapp/js/diagramly/NotionClient.js158
-rw-r--r--src/main/webapp/js/diagramly/NotionFile.js8
-rw-r--r--src/main/webapp/js/grapheditor/EditorUi.js2
-rw-r--r--src/main/webapp/js/grapheditor/Format.js62
-rw-r--r--src/main/webapp/js/grapheditor/Graph.js56
-rw-r--r--src/main/webapp/js/grapheditor/Menus.js165
-rw-r--r--src/main/webapp/js/grapheditor/Toolbar.js25
-rw-r--r--src/main/webapp/js/viewer-static.min.js1541
-rw-r--r--src/main/webapp/js/viewer.min.js1541
-rw-r--r--src/main/webapp/mxgraph/mxClient.js2
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/service-worker.js.map2
18 files changed, 4228 insertions, 3977 deletions
diff --git a/ChangeLog b/ChangeLog
index 928e2601..ad984384 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+01-OCT-2021: 15.4.1
+
+- [gliffy] Hides shapes fully in -ve coord
+- Fixes lineheight and regex https://github.com/jgraph/drawio/issues/2280, adds rowspan
+- Fixes possible getAttribute is not a function
+- Fixes update of current style for label editing https://github.com/jgraph/drawio-desktop/issues/727
+- Fixes update of color button, handling of rgba
+
30-SEP-2021: 15.4.0
- Adds pages switch for sketch mode
diff --git a/VERSION b/VERSION
index 92edc454..65d9b5b1 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-15.4.0 \ No newline at end of file
+15.4.1 \ 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 d2d10e24..d760f786 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -234,7 +234,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1");(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||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.4.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),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/"),
+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||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.4.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),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.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),
@@ -2040,9 +2040,9 @@ d);this.exportColor(e)};this.fromRGB=function(a,b,c,d){0>a&&(a=0);1<a&&(a=1);0>b
function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},mxJSColor.addEvent(u,"keyup",q),mxJSColor.addEvent(u,"input",q),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-Editor=function(a,c,b,e,d){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=e||this.createGraph(c,b);this.editable=null!=d?d:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(a,b){var c=null!=b?b.getProperty("edit"):null;null!=c&&c.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
-(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(c){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
+Editor=function(a,b,d,e,c){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=e||this.createGraph(b,d);this.editable=null!=c?c:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+function(){return this.status};this.graphChangeListener=function(a,b){var d=null!=b?b.getProperty("edit"):null;null!=d&&d.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
+(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";
Editor.lightCheckmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+
"/checkmark.gif";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=";Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";
@@ -2075,105 +2075,105 @@ Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Ha
Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.darkMode=!1;Editor.isDarkMode=function(a){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;
Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};
-Editor.prototype.editAsNew=function(a,c){var b=null!=c?"?title="+encodeURIComponent(c):"";null!=urlParams.ui&&(b+=(0<b.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var e=null,d=mxUtils.bind(this,function(b){"ready"==b.data&&b.source==e&&(mxEvent.removeListener(window,"message",d),e.postMessage(a,"*"))});mxEvent.addListener(window,"message",d);e=this.graph.openLink(this.getEditBlankUrl(b+(0<b.length?"&":"?")+
-"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(b)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,c){var b=new Graph(null,c,null,null,a);b.transparentBackground=!1;var e=b.isCssTransformsSupported,d=this;b.isCssTransformsSupported=function(){return e.apply(this,arguments)&&(!d.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(a){return!this.isExternalProtocol(a)});return b};
+Editor.prototype.editAsNew=function(a,b){var d=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var e=null,c=mxUtils.bind(this,function(b){"ready"==b.data&&b.source==e&&(mxEvent.removeListener(window,"message",c),e.postMessage(a,"*"))});mxEvent.addListener(window,"message",c);e=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+
+"client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){var d=new Graph(null,b,null,null,a);d.transparentBackground=!1;var e=d.isCssTransformsSupported,c=this;d.isCssTransformsSupported=function(){return e.apply(this,arguments)&&(!c.chromeless||!mxClient.IS_SF)};this.chromeless||(d.isBlankLink=function(a){return!this.isExternalProtocol(a)});return d};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
-Editor.prototype.readGraphState=function(a){var c=a.getAttribute("grid");if(null==c||""==c)c=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=c&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled=
-"0"!=a.getAttribute("arrows");this.graph.foldingEnabled="0"!=a.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);c=parseFloat(a.getAttribute("pageScale"));!isNaN(c)&&0<c?this.graph.pageScale=c:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(c=a.getAttribute("page"),this.graph.pageVisible=
-null!=c?"0"!=c:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;var c=parseFloat(a.getAttribute("pageWidth")),b=parseFloat(a.getAttribute("pageHeight"));isNaN(c)||isNaN(b)||(this.graph.pageFormat=new mxRectangle(0,0,c,b));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:null};
-Editor.prototype.setGraphXml=function(a){if(null!=a){var c=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),c.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var b=c.document.createElement("mxGraphModel");b.appendChild(a);c.decode(b,this.graph.getModel());
+Editor.prototype.readGraphState=function(a){var b=a.getAttribute("grid");if(null==b||""==b)b=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=b&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled=
+"0"!=a.getAttribute("arrows");this.graph.foldingEnabled="0"!=a.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);b=parseFloat(a.getAttribute("pageScale"));!isNaN(b)&&0<b?this.graph.pageScale=b:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(b=a.getAttribute("page"),this.graph.pageVisible=
+null!=b?"0"!=b:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;var b=parseFloat(a.getAttribute("pageWidth")),d=parseFloat(a.getAttribute("pageHeight"));isNaN(b)||isNaN(d)||(this.graph.pageFormat=new mxRectangle(0,0,b,d));a=a.getAttribute("background");this.graph.background=null!=a&&0<a.length?a:null};
+Editor.prototype.setGraphXml=function(a){if(null!=a){var b=new mxCodec(a.ownerDocument);if("mxGraphModel"==a.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(a),this.updateGraphComponents(),b.decode(a,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==a.nodeName){this.resetGraph();var d=b.document.createElement("mxGraphModel");d.appendChild(a);b.decode(d,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:a,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize",
this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};
Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,c=new mxUndoManager;this.undoListener=function(a,b){c.undoableEditHappened(b.getProperty("edit"))};var b=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,b);a.getView().addListener(mxEvent.UNDO,b);b=function(b,c){var e=a.getSelectionCellsForChanges(c.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<e.length){a.getModel();for(var d=[],h=0;h<
-e.length;h++)null!=a.view.getState(e[h])&&d.push(e[h]);a.setSelectionCells(d)}};c.addListener(mxEvent.UNDO,b);c.addListener(mxEvent.REDO,b);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()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,d){b.undoableEditHappened(d.getProperty("edit"))};var d=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,d);a.getView().addListener(mxEvent.UNDO,d);d=function(b,d){var c=a.getSelectionCellsForChanges(d.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<c.length){a.getModel();for(var e=[],h=0;h<
+c.length;h++)null!=a.view.getState(c[h])&&e.push(c[h]);a.setSelectionCells(e)}};b.addListener(mxEvent.UNDO,d);b.addListener(mxEvent.REDO,d);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,c,b,e,d,f,k,h,g,l,m){var n=g?57:0,p=b,q=e,t=g?0:64,v=mxUtils.getDocumentSize();null!=window.innerHeight&&(v.height=window.innerHeight);var u=v.height,x=Math.max(1,Math.round((v.width-b-t)/2)),w=Math.max(1,Math.round((u-e-a.footerHeight)/3));c.style.maxHeight="100%";b=null!=document.body?Math.min(b,document.body.scrollWidth-t):b;e=Math.min(e,u-t);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=u+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));v=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=v.x+"px";this.bg.style.top=v.y+"px";x+=v.x;w+=v.y;d&&document.body.appendChild(this.bg);var A=a.createDiv(g?"geTransDialog":"geDialog");d=this.getPosition(x,w,b,e);x=d.x;w=d.y;A.style.width=b+"px";A.style.height=e+"px";A.style.left=x+"px";A.style.top=w+"px";A.style.zIndex=
-this.zIndex;A.appendChild(c);document.body.appendChild(A);!h&&c.clientHeight>A.clientHeight-t&&(c.style.overflowY="auto");c.style.overflowX="hidden";if(f&&(f=document.createElement("img"),f.setAttribute("src",Dialog.prototype.closeImage),f.setAttribute("title",mxResources.get("close")),f.className="geDialogClose",f.style.top=w+14+"px",f.style.left=x+b+38-n+"px",f.style.zIndex=this.zIndex,mxEvent.addListener(f,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(f),this.dialogImg=
-f,!m)){var E=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){E=!0}),null,mxUtils.bind(this,function(b){E&&(a.hideDialog(!0),E=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var d=l();null!=d&&(p=b=d.w,q=e=d.h)}d=mxUtils.getDocumentSize();u=d.height;this.bg.style.height=u+"px";x=Math.max(1,Math.round((d.width-b-t)/2));w=Math.max(1,Math.round((u-e-a.footerHeight)/3));b=null!=document.body?Math.min(p,document.body.scrollWidth-t):p;e=Math.min(q,u-t);d=this.getPosition(x,
-w,b,e);x=d.x;w=d.y;A.style.left=x+"px";A.style.top=w+"px";A.style.width=b+"px";A.style.height=e+"px";!h&&c.clientHeight>A.clientHeight-t&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=w+14+"px",this.dialogImg.style.left=x+b+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=A;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(a,b,d,e,c,f,k,h,g,l,m){var n=g?57:0,p=d,q=e,u=g?0:64,v=mxUtils.getDocumentSize();null!=window.innerHeight&&(v.height=window.innerHeight);var t=v.height,x=Math.max(1,Math.round((v.width-d-u)/2)),w=Math.max(1,Math.round((t-e-a.footerHeight)/3));b.style.maxHeight="100%";d=null!=document.body?Math.min(d,document.body.scrollWidth-u):d;e=Math.min(e,t-u);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=t+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));v=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=v.x+"px";this.bg.style.top=v.y+"px";x+=v.x;w+=v.y;c&&document.body.appendChild(this.bg);var z=a.createDiv(g?"geTransDialog":"geDialog");c=this.getPosition(x,w,d,e);x=c.x;w=c.y;z.style.width=d+"px";z.style.height=e+"px";z.style.left=x+"px";z.style.top=w+"px";z.style.zIndex=
+this.zIndex;z.appendChild(b);document.body.appendChild(z);!h&&b.clientHeight>z.clientHeight-u&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(f&&(f=document.createElement("img"),f.setAttribute("src",Dialog.prototype.closeImage),f.setAttribute("title",mxResources.get("close")),f.className="geDialogClose",f.style.top=w+14+"px",f.style.left=x+d+38-n+"px",f.style.zIndex=this.zIndex,mxEvent.addListener(f,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(f),this.dialogImg=
+f,!m)){var E=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){E=!0}),null,mxUtils.bind(this,function(b){E&&(a.hideDialog(!0),E=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var c=l();null!=c&&(p=d=c.w,q=e=c.h)}c=mxUtils.getDocumentSize();t=c.height;this.bg.style.height=t+"px";x=Math.max(1,Math.round((c.width-d-u)/2));w=Math.max(1,Math.round((t-e-a.footerHeight)/3));d=null!=document.body?Math.min(p,document.body.scrollWidth-u):p;e=Math.min(q,t-u);c=this.getPosition(x,
+w,d,e);x=c.x;w=c.y;z.style.left=x+"px";z.style.top=w+"px";z.style.width=d+"px";z.style.height=e+"px";!h&&b.clientHeight>z.clientHeight-u&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=w+14+"px",this.dialogImg.style.left=x+d+38-n+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=z;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
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+
-"/clear.gif";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,b,e,d,f,k,h,g,l,m){g=null!=g?g:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=c){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,c);p.setAttribute("title",c);n.appendChild(p)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=b;n.appendChild(c);b=document.createElement("div");b.style.marginTop="12px";b.style.textAlign="center";null!=f&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",b.appendChild(l));var q=mxUtils.button(e,function(){g&&a.hideDialog();null!=d&&d()});
-q.className="geBtn";b.appendChild(q);null!=k&&(e=mxUtils.button(k,function(){g&&a.hideDialog();null!=h&&h()}),e.className="geBtn gePrimaryBtn",b.appendChild(e));this.init=function(){q.focus()};n.appendChild(b);this.container=n},PrintDialog=function(a,c){this.create(a,c)};
-PrintDialog.prototype.create=function(a){function c(a){var c=h.checked||l.checked,e=parseInt(n.value)/100;isNaN(e)&&(e=1,n.value="100%");var e=.75*e,d=b.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/b.pageScale;if(c){var g=h.checked?1:parseInt(m.value);isNaN(g)||(f=mxUtils.getScaleForPageCount(g,b,d))}b.getGraphBounds();var k=g=0,d=mxRectangle.fromRectangle(d);d.width=Math.ceil(d.width*e);d.height=Math.ceil(d.height*e);f*=e;!c&&b.pageVisible?(e=b.getPageLayout(),g-=e.x*d.width,k-=e.y*d.height):
-c=!0;c=PrintDialog.createPrintPreview(b,f,d,0,g,k,c);c.open();a&&PrintDialog.printPreview(c)}var b=a.editor.graph,e,d,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var k=document.createElement("tbody");e=document.createElement("tr");var h=document.createElement("input");h.setAttribute("type","checkbox");d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(h);var g=document.createElement("span");mxUtils.write(g," "+mxResources.get("fitPage"));
-d.appendChild(g);mxEvent.addListener(g,"click",function(a){h.checked=!h.checked;l.checked=!h.checked;mxEvent.consume(a)});mxEvent.addListener(h,"change",function(){l.checked=!h.checked});e.appendChild(d);k.appendChild(e);e=e.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(l);g=document.createElement("span");mxUtils.write(g," "+mxResources.get("posterPrint")+":");d.appendChild(g);mxEvent.addListener(g,
-"click",function(a){l.checked=!l.checked;h.checked=!l.checked;mxEvent.consume(a)});e.appendChild(d);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(m);mxUtils.write(d," "+mxResources.get("pages")+" (max)");e.appendChild(d);k.appendChild(e);mxEvent.addListener(l,"change",
-function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");h.checked=!l.checked});e=e.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");e.appendChild(d);d=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";d.appendChild(n);e.appendChild(d);k.appendChild(e);e=document.createElement("tr");d=document.createElement("td");d.colSpan=2;
-d.style.paddingTop="20px";d.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&d.appendChild(g);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)});p.className="geBtn";d.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||
-d.appendChild(g);e.appendChild(d);k.appendChild(e);f.appendChild(k);this.container=f};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(b){}};
-PrintDialog.createPrintPreview=function(a,c,b,e,d,f,k){c=new mxPrintPreview(a,c,b,e,d,f);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";c.backgroundColor=a;var h=c.writeHead;c.writeHead=function(a){h.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};
+"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
+var ErrorDialog=function(a,b,d,e,c,f,k,h,g,l,m){g=null!=g?g:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=b){var p=document.createElement("div");p.style.padding="0px";p.style.margin="0px";p.style.fontSize="18px";p.style.paddingBottom="16px";p.style.marginBottom="10px";p.style.borderBottom="1px solid #c0c0c0";p.style.color="gray";p.style.whiteSpace="nowrap";p.style.textOverflow="ellipsis";p.style.overflow="hidden";mxUtils.write(p,b);p.setAttribute("title",b);n.appendChild(p)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=d;n.appendChild(b);d=document.createElement("div");d.style.marginTop="12px";d.style.textAlign="center";null!=f&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",d.appendChild(l));var q=mxUtils.button(e,function(){g&&a.hideDialog();null!=c&&c()});
+q.className="geBtn";d.appendChild(q);null!=k&&(e=mxUtils.button(k,function(){g&&a.hideDialog();null!=h&&h()}),e.className="geBtn gePrimaryBtn",d.appendChild(e));this.init=function(){q.focus()};n.appendChild(d);this.container=n},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(a){var b=h.checked||l.checked,c=parseInt(n.value)/100;isNaN(c)&&(c=1,n.value="100%");var c=.75*c,e=d.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,f=1/d.pageScale;if(b){var g=h.checked?1:parseInt(m.value);isNaN(g)||(f=mxUtils.getScaleForPageCount(g,d,e))}d.getGraphBounds();var k=g=0,e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*c);e.height=Math.ceil(e.height*c);f*=c;!b&&d.pageVisible?(c=d.getPageLayout(),g-=c.x*e.width,k-=c.y*e.height):
+b=!0;b=PrintDialog.createPrintPreview(d,f,e,0,g,k,b);b.open();a&&PrintDialog.printPreview(b)}var d=a.editor.graph,e,c,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var k=document.createElement("tbody");e=document.createElement("tr");var h=document.createElement("input");h.setAttribute("type","checkbox");c=document.createElement("td");c.setAttribute("colspan","2");c.style.fontSize="10pt";c.appendChild(h);var g=document.createElement("span");mxUtils.write(g," "+mxResources.get("fitPage"));
+c.appendChild(g);mxEvent.addListener(g,"click",function(a){h.checked=!h.checked;l.checked=!h.checked;mxEvent.consume(a)});mxEvent.addListener(h,"change",function(){l.checked=!h.checked});e.appendChild(c);k.appendChild(e);e=e.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");c=document.createElement("td");c.style.fontSize="10pt";c.appendChild(l);g=document.createElement("span");mxUtils.write(g," "+mxResources.get("posterPrint")+":");c.appendChild(g);mxEvent.addListener(g,
+"click",function(a){l.checked=!l.checked;h.checked=!l.checked;mxEvent.consume(a)});e.appendChild(c);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";c=document.createElement("td");c.style.fontSize="10pt";c.appendChild(m);mxUtils.write(c," "+mxResources.get("pages")+" (max)");e.appendChild(c);k.appendChild(e);mxEvent.addListener(l,"change",
+function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");h.checked=!l.checked});e=e.cloneNode(!1);c=document.createElement("td");mxUtils.write(c,mxResources.get("pageScale")+":");e.appendChild(c);c=document.createElement("td");var n=document.createElement("input");n.setAttribute("value","100 %");n.setAttribute("size","5");n.style.width="50px";c.appendChild(n);e.appendChild(c);k.appendChild(e);e=document.createElement("tr");c=document.createElement("td");c.colSpan=2;
+c.style.paddingTop="20px";c.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&c.appendChild(g);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});p.className="geBtn";c.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});p.className="geBtn gePrimaryBtn";c.appendChild(p);a.editor.cancelFirst||
+c.appendChild(g);e.appendChild(c);k.appendChild(e);f.appendChild(k);this.container=f};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(d){}};
+PrintDialog.createPrintPreview=function(a,b,d,e,c,f,k){b=new mxPrintPreview(a,b,d,e,c,f);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var h=b.writeHead;b.writeHead=function(a){h.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function b(){var b=t;null!=b&&Graph.isPageLink(b.src)&&(b=a.createImageForPageLink(b.src,null));null!=b&&null!=b.src?(q.setAttribute("src",b.src),q.style.display=""):(q.removeAttribute("src"),q.style.display="none")}var e=a.editor.graph,d,f,k=document.createElement("table");k.style.width=
-"100%";k.style.height="100%";var h=document.createElement("tbody");d=document.createElement("tr");f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("paperSize")+":");d.appendChild(f);f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";var g=PageSetupDialog.addPageFormatPanel(f,"pagesetupdialog",e.pageFormat);d.appendChild(f);h.appendChild(d);d=document.createElement("tr");f=document.createElement("td");
-mxUtils.write(f,mxResources.get("background")+":");d.appendChild(f);f=document.createElement("td");f.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var m=e.background;c();mxEvent.addListener(l,
-"click",function(b){a.pickColor(m||"none",function(a){m=a;c()});mxEvent.consume(b)});f.appendChild(l);mxUtils.write(f,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=e.getGridSize();f.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?e.getGridSize():a)});d.appendChild(f);h.appendChild(d);d=document.createElement("tr");
-f=document.createElement("td");mxUtils.write(f,mxResources.get("image")+":");d.appendChild(f);f=document.createElement("td");var p=document.createElement("button");p.className="geBtn";p.style.margin="0px";mxUtils.write(p,mxResources.get("change")+"...");var q=document.createElement("img");q.setAttribute("valign","middle");q.style.verticalAlign="middle";q.style.border="1px solid lightGray";q.style.borderRadius="4px";q.style.marginRight="14px";q.style.maxWidth="100px";q.style.cursor="pointer";q.style.height=
-"60px";q.style.padding="4px";var t=e.backgroundImage,v=function(c){a.showBackgroundImageDialog(function(a,c){c||(t=a,b())},t);mxEvent.consume(c)};mxEvent.addListener(p,"click",v);mxEvent.addListener(q,"click",v);b();f.appendChild(q);f.appendChild(p);d.appendChild(f);h.appendChild(d);d=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="16px";f.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";
-a.editor.cancelFirst&&f.appendChild(p);v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(n.value);isNaN(b)||e.gridSize===b||e.setGridSize(b);b=new ChangePageSetup(a,m,t,g.get());b.ignoreColor=e.background==m;b.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=t?t.src:null);e.pageFormat.width==b.previousFormat.width&&e.pageFormat.height==b.previousFormat.height&&b.ignoreColor&&b.ignoreImage||e.model.execute(b)});v.className="geBtn gePrimaryBtn";
-f.appendChild(v);a.editor.cancelFirst||f.appendChild(p);d.appendChild(f);h.appendChild(d);k.appendChild(h);this.container=k};
-PageSetupDialog.addPageFormatPanel=function(a,c,b,e){function d(a,c,e){if(e||n!=document.activeElement&&p!=document.activeElement){a=!1;for(c=0;c<t.length;c++)e=t[c],w?"custom"==e.key&&(h.value=e.key,w=!1):null!=e.format&&("a4"==e.key?826==b.width?(b=mxRectangle.fromRectangle(b),b.width=827):826==b.height&&(b=mxRectangle.fromRectangle(b),b.height=827):"a5"==e.key&&(584==b.width?(b=mxRectangle.fromRectangle(b),b.width=583):584==b.height&&(b=mxRectangle.fromRectangle(b),b.height=583)),b.width==e.format.width&&
-b.height==e.format.height?(h.value=e.key,f.setAttribute("checked","checked"),f.defaultChecked=!0,f.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,a=!0):b.width==e.format.height&&b.height==e.format.width&&(h.value=e.key,f.removeAttribute("checked"),f.defaultChecked=!1,f.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,a=k.checked=!0));a?(g.style.display="",m.style.display="none"):(n.value=b.width/100,p.value=b.height/100,f.setAttribute("checked","checked"),
-h.value="custom",g.style.display="none",m.style.display="")}}c="format-"+c;var f=document.createElement("input");f.setAttribute("name",c);f.setAttribute("type","radio");f.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",c);k.setAttribute("type","radio");k.setAttribute("value","landscape");var h=document.createElement("select");h.style.marginBottom="8px";h.style.borderRadius="4px";h.style.border="1px solid rgb(160, 160, 160)";h.style.width="206px";var g=
-document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height="24px";f.style.marginRight="6px";g.appendChild(f);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));g.appendChild(c);k.style.marginLeft="10px";k.style.marginRight="6px";g.appendChild(k);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));g.appendChild(l);var m=document.createElement("div");m.style.marginLeft=
-"4px";m.style.width="210px";m.style.height="24px";var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");g.style.display="none";m.style.display="none";for(var q={},t=PageSetupDialog.getFormats(),v=0;v<t.length;v++){var u=t[v];q[u.key]=u;var x=document.createElement("option");x.setAttribute("value",
-u.key);mxUtils.write(x,u.title);h.appendChild(x)}var w=!1;d();a.appendChild(h);mxUtils.br(a);a.appendChild(g);a.appendChild(m);var A=b,E=function(a,c){var d=q[h.value];null!=d.format?(n.value=d.format.width/100,p.value=d.format.height/100,m.style.display="none",g.style.display=""):(g.style.display="none",m.style.display="");d=parseFloat(n.value);if(isNaN(d)||0>=d)n.value=b.width/100;d=parseFloat(p.value);if(isNaN(d)||0>=d)p.value=b.height/100;d=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),
-Math.floor(100*parseFloat(p.value)));"custom"!=h.value&&k.checked&&(d=new mxRectangle(0,0,d.height,d.width));c&&w||d.width==A.width&&d.height==A.height||(A=d,null!=e&&e(A))};mxEvent.addListener(c,"click",function(a){f.checked=!0;E(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){k.checked=!0;E(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",E);mxEvent.addListener(n,"click",E);mxEvent.addListener(p,"blur",E);mxEvent.addListener(p,"click",E);mxEvent.addListener(k,"change",E);mxEvent.addListener(f,
-"change",E);mxEvent.addListener(h,"change",function(a){w="custom"==h.value;E(a,!0)});E();return{set:function(a){b=a;d(null,null,!0)},get:function(){return A},widthInput:n,heightInput:p}};
+var PageSetupDialog=function(a){function b(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function d(){var b=u;null!=b&&Graph.isPageLink(b.src)&&(b=a.createImageForPageLink(b.src,null));null!=b&&null!=b.src?(q.setAttribute("src",b.src),q.style.display=""):(q.removeAttribute("src"),q.style.display="none")}var e=a.editor.graph,c,f,k=document.createElement("table");k.style.width=
+"100%";k.style.height="100%";var h=document.createElement("tbody");c=document.createElement("tr");f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";mxUtils.write(f,mxResources.get("paperSize")+":");c.appendChild(f);f=document.createElement("td");f.style.verticalAlign="top";f.style.fontSize="10pt";var g=PageSetupDialog.addPageFormatPanel(f,"pagesetupdialog",e.pageFormat);c.appendChild(f);h.appendChild(c);c=document.createElement("tr");f=document.createElement("td");
+mxUtils.write(f,mxResources.get("background")+":");c.appendChild(f);f=document.createElement("td");f.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var m=e.background;b();mxEvent.addListener(l,
+"click",function(d){a.pickColor(m||"none",function(a){m=a;b()});mxEvent.consume(d)});f.appendChild(l);mxUtils.write(f,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=e.getGridSize();f.appendChild(n);mxEvent.addListener(n,"change",function(){var a=parseInt(n.value);n.value=Math.max(1,isNaN(a)?e.getGridSize():a)});c.appendChild(f);h.appendChild(c);c=document.createElement("tr");
+f=document.createElement("td");mxUtils.write(f,mxResources.get("image")+":");c.appendChild(f);f=document.createElement("td");var p=document.createElement("button");p.className="geBtn";p.style.margin="0px";mxUtils.write(p,mxResources.get("change")+"...");var q=document.createElement("img");q.setAttribute("valign","middle");q.style.verticalAlign="middle";q.style.border="1px solid lightGray";q.style.borderRadius="4px";q.style.marginRight="14px";q.style.maxWidth="100px";q.style.cursor="pointer";q.style.height=
+"60px";q.style.padding="4px";var u=e.backgroundImage,v=function(b){a.showBackgroundImageDialog(function(a,b){b||(u=a,d())},u);mxEvent.consume(b)};mxEvent.addListener(p,"click",v);mxEvent.addListener(q,"click",v);d();f.appendChild(q);f.appendChild(p);c.appendChild(f);h.appendChild(c);c=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="16px";f.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";
+a.editor.cancelFirst&&f.appendChild(p);v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=parseInt(n.value);isNaN(b)||e.gridSize===b||e.setGridSize(b);b=new ChangePageSetup(a,m,u,g.get());b.ignoreColor=e.background==m;b.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=u?u.src:null);e.pageFormat.width==b.previousFormat.width&&e.pageFormat.height==b.previousFormat.height&&b.ignoreColor&&b.ignoreImage||e.model.execute(b)});v.className="geBtn gePrimaryBtn";
+f.appendChild(v);a.editor.cancelFirst||f.appendChild(p);c.appendChild(f);h.appendChild(c);k.appendChild(h);this.container=k};
+PageSetupDialog.addPageFormatPanel=function(a,b,d,e){function c(a,b,c){if(c||n!=document.activeElement&&p!=document.activeElement){a=!1;for(b=0;b<u.length;b++)c=u[b],w?"custom"==c.key&&(h.value=c.key,w=!1):null!=c.format&&("a4"==c.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==c.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==c.format.width&&
+d.height==c.format.height?(h.value=c.key,f.setAttribute("checked","checked"),f.defaultChecked=!0,f.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,a=!0):d.width==c.format.height&&d.height==c.format.width&&(h.value=c.key,f.removeAttribute("checked"),f.defaultChecked=!1,f.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,a=k.checked=!0));a?(g.style.display="",m.style.display="none"):(n.value=d.width/100,p.value=d.height/100,f.setAttribute("checked","checked"),
+h.value="custom",g.style.display="none",m.style.display="")}}b="format-"+b;var f=document.createElement("input");f.setAttribute("name",b);f.setAttribute("type","radio");f.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",b);k.setAttribute("type","radio");k.setAttribute("value","landscape");var h=document.createElement("select");h.style.marginBottom="8px";h.style.borderRadius="4px";h.style.border="1px solid rgb(160, 160, 160)";h.style.width="206px";var g=
+document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height="24px";f.style.marginRight="6px";g.appendChild(f);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));g.appendChild(b);k.style.marginLeft="10px";k.style.marginRight="6px";g.appendChild(k);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));g.appendChild(l);var m=document.createElement("div");m.style.marginLeft=
+"4px";m.style.width="210px";m.style.height="24px";var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");g.style.display="none";m.style.display="none";for(var q={},u=PageSetupDialog.getFormats(),v=0;v<u.length;v++){var t=u[v];q[t.key]=t;var x=document.createElement("option");x.setAttribute("value",
+t.key);mxUtils.write(x,t.title);h.appendChild(x)}var w=!1;c();a.appendChild(h);mxUtils.br(a);a.appendChild(g);a.appendChild(m);var z=d,E=function(a,b){var c=q[h.value];null!=c.format?(n.value=c.format.width/100,p.value=c.format.height/100,m.style.display="none",g.style.display=""):(g.style.display="none",m.style.display="");c=parseFloat(n.value);if(isNaN(c)||0>=c)n.value=d.width/100;c=parseFloat(p.value);if(isNaN(c)||0>=c)p.value=d.height/100;c=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),
+Math.floor(100*parseFloat(p.value)));"custom"!=h.value&&k.checked&&(c=new mxRectangle(0,0,c.height,c.width));b&&w||c.width==z.width&&c.height==z.height||(z=c,null!=e&&e(z))};mxEvent.addListener(b,"click",function(a){f.checked=!0;E(a);mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){k.checked=!0;E(a);mxEvent.consume(a)});mxEvent.addListener(n,"blur",E);mxEvent.addListener(n,"click",E);mxEvent.addListener(p,"blur",E);mxEvent.addListener(p,"click",E);mxEvent.addListener(k,"change",E);mxEvent.addListener(f,
+"change",E);mxEvent.addListener(h,"change",function(a){w="custom"==h.value;E(a,!0)});E();return{set:function(a){d=a;c(null,null,!0)},get:function(){return z},widthInput:n,heightInput:p}};
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,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,c,b,e,d,f,k,h,g,l,m,n){g=null!=g?g:!0;var p,q,t=document.createElement("table"),v=document.createElement("tbody");t.style.position="absolute";t.style.top="30px";t.style.left="20px";p=document.createElement("tr");q=document.createElement("td");q.style.textOverflow="ellipsis";q.style.textAlign="right";q.style.maxWidth="100px";q.style.fontSize="10pt";q.style.width="84px";mxUtils.write(q,(d||mxResources.get("filename"))+":");p.appendChild(q);var u=document.createElement("input");
-u.setAttribute("value",c||"");u.style.marginLeft="4px";u.style.width=null!=n?n+"px":"180px";var x=mxUtils.button(b,function(){if(null==f||f(u.value))g&&a.hideDialog(),e(u.value)});x.className="geBtn gePrimaryBtn";this.init=function(){if(null!=d||null==k)if(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.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=u,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")&&(u.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),x.click());a.stopPropagation();
-a.preventDefault()}))}}};q=document.createElement("td");q.style.whiteSpace="nowrap";q.appendChild(u);p.appendChild(q);if(null!=d||null==k)v.appendChild(p),null!=m&&(q.appendChild(FilenameDialog.createTypeHint(a,u,m)),null!=a.editor.diagramFileTypes&&(p=document.createElement("tr"),q=document.createElement("td"),q.style.textOverflow="ellipsis",q.style.textAlign="right",q.style.maxWidth="100px",q.style.fontSize="10pt",q.style.width="84px",mxUtils.write(q,mxResources.get("type")+":"),p.appendChild(q),
-q=document.createElement("td"),q.style.whiteSpace="nowrap",p.appendChild(q),c=FilenameDialog.createFileTypes(a,u,a.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",q.appendChild(c),u.style.width=null!=n?n-40+"px":"190px",p.appendChild(q),v.appendChild(p)));null!=k&&(p=document.createElement("tr"),q=document.createElement("td"),q.colSpan=2,q.appendChild(k),p.appendChild(q),v.appendChild(p));p=document.createElement("tr");q=document.createElement("td");q.colSpan=2;q.style.paddingTop=
-null!=m?"12px":"20px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});m.className="geBtn";a.editor.cancelFirst&&q.appendChild(m);null!=h&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(h)}),n.className="geBtn",q.appendChild(n));mxEvent.addListener(u,"keypress",function(a){13==a.keyCode&&x.click()});q.appendChild(x);a.editor.cancelFirst||q.appendChild(m);p.appendChild(q);v.appendChild(p);
-t.appendChild(v);this.container=t};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(a,c,b){var e=document.createElement("img");e.style.backgroundPosition="center bottom";e.style.backgroundRepeat="no-repeat";e.style.margin="2px 0 0 4px";e.style.verticalAlign="top";e.style.cursor="pointer";e.style.height="16px";e.style.width="16px";mxUtils.setOpacity(e,70);var d=function(){e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));for(var a=0;a<b.length;a++)if(0<b[a].ext.length&&c.value.toLowerCase().substring(c.value.length-
-b[a].ext.length-1)=="."+b[a].ext){e.setAttribute("title",mxResources.get(b[a].title));break}};mxEvent.addListener(c,"keyup",d);mxEvent.addListener(c,"change",d);mxEvent.addListener(e,"click",function(b){var c=e.getAttribute("title");e.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=c&&a.showError(null,c,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(b)});
-d();return e};
-FilenameDialog.createFileTypes=function(a,c,b){var e=document.createElement("select");for(a=0;a<b.length;a++){var d=document.createElement("option");d.setAttribute("value",a);mxUtils.write(d,mxResources.get(b[a].description)+" (."+b[a].extension+")");e.appendChild(d)}mxEvent.addListener(e,"change",function(a){a=b[e.value].extension;var d=c.value.lastIndexOf(".drawio."),d=0<d?d:c.value.lastIndexOf(".");"drawio"!=a&&(a="drawio."+a);c.value=0<d?c.value.substring(0,d+1)+a:c.value+"."+a;"createEvent"in
-document?(a=document.createEvent("HTMLEvents"),a.initEvent("change",!1,!0),c.dispatchEvent(a)):c.fireEvent("onchange")});a=function(a){a=c.value.toLowerCase();for(var d=0,f=0;f<b.length;f++){var g=b[f].extension,l=null;"drawio"!=g&&(l=g,g=".drawio."+g);if(a.substring(a.length-g.length-1)=="."+g||null!=l&&a.substring(a.length-l.length-1)=="."+l){d=f;break}}e.value=d};mxEvent.addListener(c,"change",a);mxEvent.addListener(c,"keyup",a);a();return e};
+var FilenameDialog=function(a,b,d,e,c,f,k,h,g,l,m,n){g=null!=g?g:!0;var p,q,u=document.createElement("table"),v=document.createElement("tbody");u.style.position="absolute";u.style.top="30px";u.style.left="20px";p=document.createElement("tr");q=document.createElement("td");q.style.textOverflow="ellipsis";q.style.textAlign="right";q.style.maxWidth="100px";q.style.fontSize="10pt";q.style.width="84px";mxUtils.write(q,(c||mxResources.get("filename"))+":");p.appendChild(q);var t=document.createElement("input");
+t.setAttribute("value",b||"");t.style.marginLeft="4px";t.style.width=null!=n?n+"px":"180px";var x=mxUtils.button(d,function(){if(null==f||f(t.value))g&&a.hideDialog(),e(t.value)});x.className="geBtn gePrimaryBtn";this.init=function(){if(null!=c||null==k)if(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=u.parentNode;if(null!=a){var b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor=
+"",b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=t,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")&&(t.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),x.click());a.stopPropagation();
+a.preventDefault()}))}}};q=document.createElement("td");q.style.whiteSpace="nowrap";q.appendChild(t);p.appendChild(q);if(null!=c||null==k)v.appendChild(p),null!=m&&(q.appendChild(FilenameDialog.createTypeHint(a,t,m)),null!=a.editor.diagramFileTypes&&(p=document.createElement("tr"),q=document.createElement("td"),q.style.textOverflow="ellipsis",q.style.textAlign="right",q.style.maxWidth="100px",q.style.fontSize="10pt",q.style.width="84px",mxUtils.write(q,mxResources.get("type")+":"),p.appendChild(q),
+q=document.createElement("td"),q.style.whiteSpace="nowrap",p.appendChild(q),b=FilenameDialog.createFileTypes(a,t,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",q.appendChild(b),t.style.width=null!=n?n-40+"px":"190px",p.appendChild(q),v.appendChild(p)));null!=k&&(p=document.createElement("tr"),q=document.createElement("td"),q.colSpan=2,q.appendChild(k),p.appendChild(q),v.appendChild(p));p=document.createElement("tr");q=document.createElement("td");q.colSpan=2;q.style.paddingTop=
+null!=m?"12px":"20px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});m.className="geBtn";a.editor.cancelFirst&&q.appendChild(m);null!=h&&(n=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(h)}),n.className="geBtn",q.appendChild(n));mxEvent.addListener(t,"keypress",function(a){13==a.keyCode&&x.click()});q.appendChild(x);a.editor.cancelFirst||q.appendChild(m);p.appendChild(q);v.appendChild(p);
+u.appendChild(v);this.container=u};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(a,b,d){var e=document.createElement("img");e.style.backgroundPosition="center bottom";e.style.backgroundRepeat="no-repeat";e.style.margin="2px 0 0 4px";e.style.verticalAlign="top";e.style.cursor="pointer";e.style.height="16px";e.style.width="16px";mxUtils.setOpacity(e,70);var c=function(){e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));for(var a=0;a<d.length;a++)if(0<d[a].ext.length&&b.value.toLowerCase().substring(b.value.length-
+d[a].ext.length-1)=="."+d[a].ext){e.setAttribute("title",mxResources.get(d[a].title));break}};mxEvent.addListener(b,"keyup",c);mxEvent.addListener(b,"change",c);mxEvent.addListener(e,"click",function(b){var c=e.getAttribute("title");e.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=c&&a.showError(null,c,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(b)});
+c();return e};
+FilenameDialog.createFileTypes=function(a,b,d){var e=document.createElement("select");for(a=0;a<d.length;a++){var c=document.createElement("option");c.setAttribute("value",a);mxUtils.write(c,mxResources.get(d[a].description)+" (."+d[a].extension+")");e.appendChild(c)}mxEvent.addListener(e,"change",function(a){a=d[e.value].extension;var c=b.value.lastIndexOf(".drawio."),c=0<c?c:b.value.lastIndexOf(".");"drawio"!=a&&(a="drawio."+a);b.value=0<c?b.value.substring(0,c+1)+a:b.value+"."+a;"createEvent"in
+document?(a=document.createEvent("HTMLEvents"),a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){a=b.value.toLowerCase();for(var c=0,f=0;f<d.length;f++){var g=d[f].extension,l=null;"drawio"!=g&&(l=g,g=".drawio."+g);if(a.substring(a.length-g.length-1)=="."+g||null!=l&&a.substring(a.length-l.length-1)=="."+l){c=f;break}}e.value=c};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return e};
(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 c=a.container.firstChild;null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.nextSibling;null!=c&&(this.backgroundPageShape=this.createBackgroundPageShape(b),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(a.container),c.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,c),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=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",e="none",d="";if(a.isGridEnabled()||a.gridVisible){d=10;mxClient.IS_SVG?(e=unescape(encodeURIComponent(this.createSvgGrid(c))),e=window.btoa?btoa(e):Base64.encode(e,!0),e="url(data:image/svg+xml;base64,"+e+")",d=a.gridSize*this.scale*this.gridSteps):e="url("+this.gridImage+
-")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),c=1+f.x,f=1+f.y);d=-Math.round(d-mxUtils.mod(this.translate.x*this.scale-c,d))+"px "+-Math.round(d-mxUtils.mod(this.translate.y*this.scale-f,d))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=d,a.view.backgroundPageShape.node.style.backgroundImage=e,a.view.backgroundPageShape.node.style.backgroundColor=b,a.view.backgroundPageShape.node.style.borderColor=
-a.defaultPageBorderColor,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=d,c.style.backgroundColor=b,c.style.backgroundImage=e)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,e=[],d=1;d<this.gridSteps;d++){var f=d*b;e.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+
-" "+c)}return'<svg width="'+c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+e.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);
-if(null!=this.shiftPreview1){var e=this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps,d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+b,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+c,d))+"px";e.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var e=this.view.scale,d=this.view.translate,f=this.pageFormat,g=e*this.pageScale,k=this.view.getBackgroundPageBounds();
-b=k.width;c=k.height;var h=new mxRectangle(e*d.x,e*d.y,f.width*g,f.height*g),v=(a=a&&Math.min(h.width,h.height)>this.minPageBreakDist)?Math.ceil(c/h.height)-1:0,u=a?Math.ceil(b/h.width)-1:0,x=k.x+b,w=k.y+c;null==this.horizontalPageBreaks&&0<v&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<u&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?v:u,c=0;c<=b;c++){var e=a==this.horizontalPageBreaks?[new mxPoint(Math.round(k.x),
-Math.round(k.y+(c+1)*h.height)),new mxPoint(Math.round(x),Math.round(k.y+(c+1)*h.height))]:[new mxPoint(Math.round(k.x+(c+1)*h.width),Math.round(k.y)),new mxPoint(Math.round(k.x+(c+1)*h.width),Math.round(w))];null!=a[c]?(a[c].points=e,a[c].redraw()):(e=new mxPolyline(e,this.pageBreakColor),e.dialect=this.dialect,e.isDashed=this.pageBreakDashed,e.pointerEvents=!1,e.init(this.view.backgroundPane),e.redraw(),a[c]=e)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);
-a(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,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 b=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=
-b.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,e=this.graph.pageFormat,
-d=this.graph.pageScale,f=e.width*d,e=e.height*d,d=Math.floor(Math.min(0,b)/f),p=Math.floor(Math.min(0,c)/e);return new mxRectangle(this.scale*(this.translate.x+d*f),this.scale*(this.translate.y+p*e),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-d)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/e)-p)*e)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){e.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 d=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,e,f,n){var g=d.apply(this,arguments);null==n||n||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var f=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(a,b,c){var e,d=this.graph.model.getParent(a);if(b)e=this.graph.model.isEdge(a)?null:this.graph.getCellGeometry(a),e=!this.graph.model.isEdge(d)&&!this.graph.isSiblingSelected(a)&&(null!=e&&e.relative||!this.graph.isContainer(d)||this.graph.isPart(a));else if(e=f.apply(this,arguments),this.graph.isTableCell(a)||this.graph.isTableRow(a))e=d,this.graph.isTable(e)||(e=this.graph.model.getParent(e)),e=!this.graph.selectionCellsHandler.isHandled(e)||this.graph.isCellSelected(e)&&this.graph.isToggleEvent(c.getEvent())||
-this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(c.getEvent())||this.graph.isTableCell(a)&&this.graph.isCellSelected(d);return e};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a),e=this.graph.view.getState(c),d=this.graph.isCellSelected(a);null!=e&&(b.isVertex(c)||b.isEdge(c));){var f=this.graph.isCellSelected(c),d=d||f;if(f||!d&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=c;c=b.getParent(c)}return a}})();EditorUi=function(a,c,b){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=c||document.body;var e=this.editor.graph;e.lightbox=b;this.initialDefaultVertexStyle=mxUtils.clone(e.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);if(b){var d=e.getGraphBounds;e.getGraphBounds=function(a){var b=d.apply(this,arguments);a=this.backgroundImage;if(null!=a){var c=this.view.translate,e=this.view.scale;b.add(new mxRectangle((c.x+a.x)*e,
-(c.y+a.y)*e,a.width*e,a.height*e))}return b}}e.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,e.isEnabled=
-function(){return!1},e.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!e.standalone){var f="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");
+mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,b=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,c=null!=b&&this.gridColor!=b.toLowerCase()?this.gridColor:"#ffffff",d="none",e="";if(a.isGridEnabled()||a.gridVisible){e=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(c))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",e=a.gridSize*this.scale*this.gridSteps):d="url("+this.gridImage+
+")";var f=c=0;null!=a.view.backgroundPageShape&&(f=this.getBackgroundPageBounds(),c=1+f.x,f=1+f.y);e=-Math.round(e-mxUtils.mod(this.translate.x*this.scale-c,e))+"px "+-Math.round(e-mxUtils.mod(this.translate.y*this.scale-f,e))+"px"}c=a.view.canvas;null!=c.ownerSVGElement&&(c=c.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=e,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor=b,a.view.backgroundPageShape.node.style.borderColor=
+a.defaultPageBorderColor,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var f=e*b;d.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+
+" "+c)}return'<svg width="'+c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);
+if(null!=this.shiftPreview1){var d=this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,k=this.view.getBackgroundPageBounds();
+b=k.width;c=k.height;var h=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),v=(a=a&&Math.min(h.width,h.height)>this.minPageBreakDist)?Math.ceil(c/h.height)-1:0,t=a?Math.ceil(b/h.width)-1:0,x=k.x+b,w=k.y+c;null==this.horizontalPageBreaks&&0<v&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<t&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?v:t,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(k.x),
+Math.round(k.y+(c+1)*h.height)),new mxPoint(Math.round(x),Math.round(k.y+(c+1)*h.height))]:[new mxPoint(Math.round(k.x+(c+1)*h.width),Math.round(k.y)),new mxPoint(Math.round(k.x+(c+1)*h.width),Math.round(w))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);
+a(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,d){for(var e=0;e<c.length;e++){if(this.graph.isTableCell(c[e])||this.graph.isTableRow(c[e]))return!1;if(this.graph.getModel().isVertex(c[e])){var f=this.graph.getCellGeometry(c[e]);if(null!=f&&f.relative)return!1}}return b.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=
+d.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,
+e=this.graph.pageScale,f=d.width*e,d=d.height*e,e=Math.floor(Math.min(0,b)/f),p=Math.floor(Math.min(0,c)/d);return new mxRectangle(this.scale*(this.translate.x+e*f),this.scale*(this.translate.y+p*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/f)-e)*f,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-p)*d)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){e.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 c=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,d,e,f,n){var g=c.apply(this,arguments);null==n||n||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var f=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(a,b,c){var d,e=this.graph.model.getParent(a);if(b)d=this.graph.model.isEdge(a)?null:this.graph.getCellGeometry(a),d=!this.graph.model.isEdge(e)&&!this.graph.isSiblingSelected(a)&&(null!=d&&d.relative||!this.graph.isContainer(e)||this.graph.isPart(a));else if(d=f.apply(this,arguments),this.graph.isTableCell(a)||this.graph.isTableRow(a))d=e,this.graph.isTable(d)||(d=this.graph.model.getParent(d)),d=!this.graph.selectionCellsHandler.isHandled(d)||this.graph.isCellSelected(d)&&this.graph.isToggleEvent(c.getEvent())||
+this.graph.isCellSelected(a)&&!this.graph.isToggleEvent(c.getEvent())||this.graph.isTableCell(a)&&this.graph.isCellSelected(e);return d};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a),d=this.graph.view.getState(c),e=this.graph.isCellSelected(a);null!=d&&(b.isVertex(c)||b.isEdge(c));){var f=this.graph.isCellSelected(c),e=e||f;if(f||!e&&(this.graph.isTableCell(a)||this.graph.isTableRow(a)))a=c;c=b.getParent(c)}return a}})();EditorUi=function(a,b,d){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this.editor.graph;e.lightbox=d;this.initialDefaultVertexStyle=mxUtils.clone(e.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);if(d){var c=e.getGraphBounds;e.getGraphBounds=function(a){var b=c.apply(this,arguments);a=this.backgroundImage;if(null!=a){var d=this.view.translate,e=this.view.scale;b.add(new mxRectangle((d.x+a.x)*e,
+(d.y+a.y)*e,a.width*e,a.height*e))}return b}}e.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,e.isEnabled=
+function(){return!1},e.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!e.standalone){var f="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),k="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=e.view.getState(a);if(null!=b){var c=a.clone();c.style="";var d=e.getCellStyle(c);a=[];var c=[],f;for(f in b.style)d[f]!=b.style[f]&&(a.push(b.style[f]),c.push(f));for(var g=e.getModel().getStyle(b.cell),k=null!=g?g.split(";"):[],g=0;g<k.length;g++){var h=k[g],m=h.indexOf("=");if(0<=m){f=h.substring(0,m);var l=h.substring(m+1);null!=d[f]&&"none"==l&&(a.push(l),c.push(f))}}e.getModel().isEdge(b.cell)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
-"keys",c,"values",a,"cells",[b.cell]))}}catch(da){this.handleError(da)}};this.clearDefaultStyle=function(){e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var h=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<h.length;c++)0>mxUtils.indexOf(f,h[c])&&f.push(h[c]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
-l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(b=0;b<l[c].length;b++)f.push(l[c][b]);for(c=0;c<k.length;c++)0>mxUtils.indexOf(f,k[c])&&f.push(k[c]);var m=function(a,b,c,d,g,h,m){d=null!=d?d:e.currentVertexStyle;g=null!=g?g:e.currentEdgeStyle;c=null!=c?c:e.getModel();
-if(m){m=[];for(var n=0;n<a.length;n++)m=m.concat(c.getDescendants(a[n]));a=m}c.beginUpdate();try{for(n=0;n<a.length;n++){var p=a[n],q;if(b)q=["fontSize","fontFamily","fontColor"];else{var u=c.getStyle(p),t=null!=u?u.split(";"):[];q=f.slice();for(var v=0;v<t.length;v++){var aa=t[v],x=aa.indexOf("=");if(0<=x){var O=aa.substring(0,x),E=mxUtils.indexOf(q,O);0<=E&&q.splice(E,1);for(m=0;m<l.length;m++){var w=l[m];if(0<=mxUtils.indexOf(w,O))for(var A=0;A<w.length;A++){var J=mxUtils.indexOf(q,w[A]);0<=J&&
-q.splice(J,1)}}}}}var P=c.isEdge(p);m=P?g:d;for(var X=c.getStyle(p),v=0;v<q.length;v++){var O=q[v],I=m[O];null!=I&&("shape"!=O||P)&&(!P||h||0>mxUtils.indexOf(k,O))&&(X=mxUtils.setStyle(X,O,I))}Editor.simpleLabels&&(X=mxUtils.setStyle(mxUtils.setStyle(X,"html",null),"whiteSpace",null));c.setStyle(p,X)}}finally{c.endUpdate()}return a};e.addListener("cellsInserted",function(a,b){m(b.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(a,b){m(b.getProperty("cells"),
+"keys",c,"values",a,"cells",[b.cell]))}}catch(da){this.handleError(da)}};this.clearDefaultStyle=function(){e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var h=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;b<h.length;b++)0>mxUtils.indexOf(f,h[b])&&f.push(h[b]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
+l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(b=0;b<l.length;b++)for(d=0;d<l[b].length;d++)f.push(l[b][d]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(f,k[b])&&f.push(k[b]);var m=function(a,b,c,d,g,h,m){d=null!=d?d:e.currentVertexStyle;g=null!=g?g:e.currentEdgeStyle;c=null!=c?c:e.getModel();
+if(m){m=[];for(var n=0;n<a.length;n++)m=m.concat(c.getDescendants(a[n]));a=m}c.beginUpdate();try{for(n=0;n<a.length;n++){var p=a[n],q;if(b)q=["fontSize","fontFamily","fontColor"];else{var t=c.getStyle(p),u=null!=t?t.split(";"):[];q=f.slice();for(var v=0;v<u.length;v++){var ba=u[v],x=ba.indexOf("=");if(0<=x){var O=ba.substring(0,x),E=mxUtils.indexOf(q,O);0<=E&&q.splice(E,1);for(m=0;m<l.length;m++){var w=l[m];if(0<=mxUtils.indexOf(w,O))for(var z=0;z<w.length;z++){var J=mxUtils.indexOf(q,w[z]);0<=J&&
+q.splice(J,1)}}}}}var P=c.isEdge(p);m=P?g:d;for(var Y=c.getStyle(p),v=0;v<q.length;v++){var O=q[v],I=m[O];null!=I&&("shape"!=O||P)&&(!P||h||0>mxUtils.indexOf(k,O))&&(Y=mxUtils.setStyle(Y,O,I))}Editor.simpleLabels&&(Y=mxUtils.setStyle(mxUtils.setStyle(Y,"html",null),"whiteSpace",null));c.setStyle(p,Y)}}finally{c.endUpdate()}return a};e.addListener("cellsInserted",function(a,b){m(b.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(a,b){m(b.getProperty("cells"),
!0)});this.insertHandler=m;this.createDivs();this.createUi();this.refresh();var n=mxUtils.bind(this,function(a){null==a&&(a=window.event);return e.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=n,this.menubarContainer.onmousedown=n,this.toolbarContainer.onselectstart=n,this.toolbarContainer.onmousedown=n,this.diagramContainer.onselectstart=n,this.diagramContainer.onmousedown=n,this.sidebarContainer.onselectstart=n,this.sidebarContainer.onmousedown=
-n,this.formatContainer.onselectstart=n,this.formatContainer.onmousedown=n,this.footerContainer.onselectstart=n,this.footerContainer.onmousedown=n,null!=this.tabContainer&&(this.tabContainer.onselectstart=n));!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 n(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
-"contextmenu",c):this.diagramContainer.oncontextmenu=c):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(c=e.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var p=e.graphHandler.start;e.graphHandler.start=function(){null!=F.hoverIcons&&F.hoverIcons.reset();p.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,t=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,b){return q||t.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||e.isEditing()?
+n,this.formatContainer.onselectstart=n,this.formatContainer.onmousedown=n,this.footerContainer.onselectstart=n,this.footerContainer.onmousedown=n,null!=this.tabContainer&&(this.tabContainer.onselectstart=n));!this.editor.chromeless||this.editor.editable?(b=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 n(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
+"contextmenu",b):this.diagramContainer.oncontextmenu=b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var p=e.graphHandler.start;e.graphHandler.start=function(){null!=F.hoverIcons&&F.hoverIcons.reset();p.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,u=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,b){return q||u.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||e.isEditing()?
mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(q=!0,this.hoverIcons.reset(),e.container.style.cursor="move",e.isEditing()||mxEvent.getSource(a)!=e.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){e.container.style.cursor="";q=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var v=e.panningHandler.isForcePanningEvent;e.panningHandler.isForcePanningEvent=function(a){return v.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 u=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(a){return u.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 x=e.isZoomWheelEvent;
-e.isZoomWheelEvent=function(){return q||x.apply(this,arguments)};var w=!1,A=null,E=null,H=null,D=mxUtils.bind(this,function(){if(null!=this.toolbar&&w!=e.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var c=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=c}a=this.toolbar.fontMenu;c=this.toolbar.sizeMenu;if(null==H)this.toolbar.createTextToolbar();else{for(var d=0;d<H.length;d++)this.toolbar.container.appendChild(H[d]);
-this.toolbar.fontMenu=A;this.toolbar.sizeMenu=E}w=e.cellEditor.isContentEditing();A=a;E=c;H=b}}),F=this,z=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){z.apply(this,arguments);D();if(e.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){var b=e.getSelectedEditingElement();null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=F.toolbar&&(F.toolbar.setFontName(Graph.stripQuotes(b.fontFamily)),F.toolbar.setFontSize(parseInt(b.fontSize))));a=!1},
+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 t=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(a){return t.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var x=e.isZoomWheelEvent;
+e.isZoomWheelEvent=function(){return q||x.apply(this,arguments)};var w=!1,z=null,E=null,G=null,D=mxUtils.bind(this,function(){if(null!=this.toolbar&&w!=e.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var c=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=c}a=this.toolbar.fontMenu;c=this.toolbar.sizeMenu;if(null==G)this.toolbar.createTextToolbar();else{for(var d=0;d<G.length;d++)this.toolbar.container.appendChild(G[d]);
+this.toolbar.fontMenu=z;this.toolbar.sizeMenu=E}w=e.cellEditor.isContentEditing();z=a;E=c;G=b}}),F=this,y=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){y.apply(this,arguments);D();if(e.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){var b=e.getSelectedEditingElement();null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=F.toolbar&&(F.toolbar.setFontName(Graph.stripQuotes(b.fontFamily)),F.toolbar.setFontSize(parseInt(b.fontSize))));a=!1},
0))};mxEvent.addListener(e.cellEditor.textarea,"input",b);mxEvent.addListener(e.cellEditor.textarea,"touchend",b);mxEvent.addListener(e.cellEditor.textarea,"mouseup",b);mxEvent.addListener(e.cellEditor.textarea,"keyup",b);b()}};var I=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(a,b){try{I.apply(this,arguments),D()}catch(J){F.handleError(J)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(L){}var K=
e.fireMouseEvent;e.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();K.apply(this,arguments)};e.popupMenuHandler.autoExpand=!0;null!=this.menus&&(e.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){e.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};e.connectionHandler.addListener(mxEvent.CONNECT,
function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&(c.push(b.getProperty("terminal")),window.setTimeout(function(){null!=F.hoverIcons&&F.hoverIcons.update(e.view.getState(c[c.length-1]))},0));m(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),d=!1,m=!1;if(0<c.length)for(var l=0;l<c.length&&(d=e.getModel().isVertex(c[l])||d,!(m=e.getModel().isEdge(c[l])||m)||!d);l++);else m=d=!0;for(var c=b.getProperty("keys"),n=b.getProperty("values"),
@@ -2188,104 +2188,104 @@ this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(t
e.addListener("gridSizeChanged",mxUtils.bind(this,function(){e.isGridEnabled()&&e.view.validateBackground()}));this.editor.resetGraph()}this.init();e.standalone||this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;
EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var b=a.getRubberband();null!=b&&b.cancel()}));mxEvent.addListener(a.container,
-"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var c=a.setDefaultParent,b=this;this.editor.graph.setDefaultParent=function(){c.apply(this,
-arguments);b.updateActionStates()};a.editLink=b.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()}));var b=mxUtils.bind(this,function(){c.hideShapePicker(!0)});a.addListener("wheel",b);a.addListener(mxEvent.ESCAPE,b);a.view.addListener(mxEvent.SCALE,b);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,b);a.getSelectionModel().addListener(mxEvent.CHANGE,b);a.getModel().addListener(mxEvent.CHANGE,
-b);var e=a.popupMenuHandler.isMenuShowing;a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=c.shapePicker};var d=a.dblClick;a.dblClick=function(b,e){if(this.isEnabled())if(null!=e||null==c.sidebar||mxEvent.isShiftDown(b)||a.isCellLocked(a.getDefaultParent()))d.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b));mxEvent.consume(b);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(f.x,f.y)}),
-30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",b);var f=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();f.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(b,e,d){var f=d.getEvent();this.graph.isCloneEvent(f)||mxEvent.isShiftDown(f)?k.apply(this,arguments):this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,g,k){var h=a.getCompositeParent(b.cell);f=a.getCellGeometry(h);
-for(d.consume();null!=h&&a.model.isVertex(h)&&null!=f&&f.relative;)cell=h,h=a.model.getParent(cell),f=a.getCellGeometry(h);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(d.getGraphX(),d.getGraphY(),h,mxUtils.bind(this,function(b){k(b);null!=c.hoverIcons&&c.hoverIcons.update(a.view.getState(b))}),e)}),30)}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,f,this)}))};var h=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(b,e){null!=h&&window.clearTimeout(h);
-h=window.setTimeout(mxUtils.bind(this,function(){var b=e.getProperty("arrow"),d=e.getProperty("direction"),f=e.getProperty("event"),b=b.getBoundingClientRect(),g=mxUtils.getOffset(a.container),k=a.container.scrollLeft+b.x-g.x,g=a.container.scrollTop+b.y-g.y,h=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),l=c.showShapePicker(k,g,h,mxUtils.bind(this,function(b){null!=b&&a.connectVertex(h,d,a.defaultEdgeLength,f,!0,!0,function(e,d,f){f(b);null!=c.hoverIcons&&
-c.hoverIcons.update(a.view.getState(b))},function(b){a.selectCellsForConnectVertex(b)},f,this.hoverIcons)}),d,!0);this.centerShapePicker(l,b,k,g,d);mxUtils.setOpacity(l,30);mxEvent.addListener(l,"mouseenter",function(){mxUtils.setOpacity(l,100)});mxEvent.addListener(l,"mouseleave",function(){c.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(a,b){null!=h&&window.clearTimeout(h)}))}};
-EditorUi.prototype.centerShapePicker=function(a,c,b,e,d){if(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)a.style.width="40px";var f=a.getBoundingClientRect();d==mxConstants.DIRECTION_NORTH?(b-=f.width/2-10,e-=f.height+6):d==mxConstants.DIRECTION_SOUTH?(b-=f.width/2-10,e+=c.height+6):d==mxConstants.DIRECTION_WEST?(b-=f.width+6,e-=f.height/2-10):d==mxConstants.DIRECTION_EAST&&(b+=c.width+6,e-=f.height/2-10);a.style.left=b+"px";a.style.top=e+"px"};
-EditorUi.prototype.showShapePicker=function(a,c,b,e,d,f){a=this.createShapePicker(a,c,b,e,d,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(b,f),f);null!=a&&(null==this.hoverIcons||f||this.hoverIcons.reset(),f=this.editor.graph,f.popupMenuHandler.hideMenu(),f.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=e,this.shapePicker=a);return a};
-EditorUi.prototype.createShapePicker=function(a,c,b,e,d,f,k,h){var g=null;if(null!=k&&0<k.length){var l=this,m=this.editor.graph,g=document.createElement("div");d=m.view.getState(b);var n=null==b||null!=d&&m.isTransparentState(d)?null:m.copyStyle(b);b=6>k.length?35*k.length:140;g.className="geToolbarContainer geSidebarContainer";g.style.cssText="position:absolute;left:"+a+"px;top:"+c+"px;width:"+b+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";h||mxUtils.setPrefixedStyle(g.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(g.style.backgroundColor=m.background);m.container.appendChild(g);b=mxUtils.bind(this,function(b){var d=document.createElement("a");d.className="geItem";d.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";g.appendChild(d);null!=n&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(n,[b]):l.insertHandler([b],""!=b.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([b],25,25,d,null,!0,!1,b.geometry.width,b.geometry.height);mxEvent.addListener(d,"click",function(){var d=m.cloneCell(b);if(null!=e)e(d);else{d.geometry.x=m.snap(Math.round(a/m.view.scale)-m.view.translate.x-b.geometry.width/2);d.geometry.y=m.snap(Math.round(c/m.view.scale)-m.view.translate.y-b.geometry.height/2);m.model.beginUpdate();try{m.addCell(d)}finally{m.model.endUpdate()}m.setSelectionCell(d);
-m.scrollCellToVisible(d);m.startEditingAtCell(d);null!=l.hoverIcons&&l.hoverIcons.update(m.view.getState(d))}null!=f&&f()})});for(d=0;d<(h?Math.min(k.length,4):k.length);d++)b(k[d]);k=g.offsetTop+g.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<k&&(g.style.top=Math.max(m.container.scrollTop+22,c-k)+"px");k=g.offsetLeft+g.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<k&&(g.style.left=Math.max(m.container.scrollLeft+22,a-k)+"px")}return g};
-EditorUi.prototype.getCellsForShapePicker=function(a,c){var b=mxUtils.bind(this,function(a,b,c,k){return this.editor.graph.createVertex(null,null,k||"",0,0,b||120,c||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;"),b("rhombus;whiteSpace=wrap;html=1;",80,80),b("rounded=1;whiteSpace=wrap;html=1;"),
-b("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),b("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),b("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),b("triangle;whiteSpace=wrap;html=1;",60,80),b("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",
-120,80),b("shape=tape;whiteSpace=wrap;html=1;",120,100),b("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),b("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),b("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};
+"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,d=this;this.editor.graph.setDefaultParent=function(){b.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,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){"mouseDown"==c.getProperty("eventName")&&b.hideShapePicker()}));var d=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",d);a.addListener(mxEvent.ESCAPE,d);a.view.addListener(mxEvent.SCALE,d);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,d);a.getSelectionModel().addListener(mxEvent.CHANGE,d);a.getModel().addListener(mxEvent.CHANGE,
+d);var e=a.popupMenuHandler.isMenuShowing;a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=b.shapePicker};var c=a.dblClick;a.dblClick=function(d,e){if(this.isEnabled())if(null!=e||null==b.sidebar||mxEvent.isShiftDown(d)||a.isCellLocked(a.getDefaultParent()))c.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d));mxEvent.consume(d);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(f.x,f.y)}),
+30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",d);var f=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();f.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(c,d,e){var f=e.getEvent();this.graph.isCloneEvent(f)||mxEvent.isShiftDown(f)?k.apply(this,arguments):this.graph.connectVertex(c.cell,d,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,g,k){var h=a.getCompositeParent(c.cell);f=a.getCellGeometry(h);
+for(e.consume();null!=h&&a.model.isVertex(h)&&null!=f&&f.relative;)cell=h,h=a.model.getParent(cell),f=a.getCellGeometry(h);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(e.getGraphX(),e.getGraphY(),h,mxUtils.bind(this,function(c){k(c);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(c))}),d)}),30)}),mxUtils.bind(this,function(a){this.graph.selectCellsForConnectVertex(a,f,this)}))};var h=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(c,d){null!=h&&window.clearTimeout(h);
+h=window.setTimeout(mxUtils.bind(this,function(){var c=d.getProperty("arrow"),e=d.getProperty("direction"),f=d.getProperty("event"),c=c.getBoundingClientRect(),g=mxUtils.getOffset(a.container),k=a.container.scrollLeft+c.x-g.x,g=a.container.scrollTop+c.y-g.y,h=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),l=b.showShapePicker(k,g,h,mxUtils.bind(this,function(c){null!=c&&a.connectVertex(h,e,a.defaultEdgeLength,f,!0,!0,function(d,e,f){f(c);null!=b.hoverIcons&&
+b.hoverIcons.update(a.view.getState(c))},function(b){a.selectCellsForConnectVertex(b)},f,this.hoverIcons)}),e,!0);this.centerShapePicker(l,c,k,g,e);mxUtils.setOpacity(l,30);mxEvent.addListener(l,"mouseenter",function(){mxUtils.setOpacity(l,100)});mxEvent.addListener(l,"mouseleave",function(){b.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(a,b){null!=h&&window.clearTimeout(h)}))}};
+EditorUi.prototype.centerShapePicker=function(a,b,d,e,c){if(c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST)a.style.width="40px";var f=a.getBoundingClientRect();c==mxConstants.DIRECTION_NORTH?(d-=f.width/2-10,e-=f.height+6):c==mxConstants.DIRECTION_SOUTH?(d-=f.width/2-10,e+=b.height+6):c==mxConstants.DIRECTION_WEST?(d-=f.width+6,e-=f.height/2-10):c==mxConstants.DIRECTION_EAST&&(d+=b.width+6,e-=f.height/2-10);a.style.left=d+"px";a.style.top=e+"px"};
+EditorUi.prototype.showShapePicker=function(a,b,d,e,c,f){a=this.createShapePicker(a,b,d,e,c,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(d,f),f);null!=a&&(null==this.hoverIcons||f||this.hoverIcons.reset(),f=this.editor.graph,f.popupMenuHandler.hideMenu(),f.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=e,this.shapePicker=a);return a};
+EditorUi.prototype.createShapePicker=function(a,b,d,e,c,f,k,h){var g=null;if(null!=k&&0<k.length){var l=this,m=this.editor.graph,g=document.createElement("div");c=m.view.getState(d);var n=null==d||null!=c&&m.isTransparentState(c)?null:m.copyStyle(d);d=6>k.length?35*k.length:140;g.className="geToolbarContainer geSidebarContainer";g.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+d+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";h||mxUtils.setPrefixedStyle(g.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(g.style.backgroundColor=m.background);m.container.appendChild(g);d=mxUtils.bind(this,function(c){var d=document.createElement("a");d.className="geItem";d.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";g.appendChild(d);null!=n&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(n,[c]):l.insertHandler([c],""!=c.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([c],25,25,d,null,!0,!1,c.geometry.width,c.geometry.height);mxEvent.addListener(d,"click",function(){var d=m.cloneCell(c);if(null!=e)e(d);else{d.geometry.x=m.snap(Math.round(a/m.view.scale)-m.view.translate.x-c.geometry.width/2);d.geometry.y=m.snap(Math.round(b/m.view.scale)-m.view.translate.y-c.geometry.height/2);m.model.beginUpdate();try{m.addCell(d)}finally{m.model.endUpdate()}m.setSelectionCell(d);
+m.scrollCellToVisible(d);m.startEditingAtCell(d);null!=l.hoverIcons&&l.hoverIcons.update(m.view.getState(d))}null!=f&&f()})});for(c=0;c<(h?Math.min(k.length,4):k.length);c++)d(k[c]);k=g.offsetTop+g.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<k&&(g.style.top=Math.max(m.container.scrollTop+22,b-k)+"px");k=g.offsetLeft+g.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<k&&(g.style.left=Math.max(m.container.scrollLeft+22,a-k)+"px")}return g};
+EditorUi.prototype.getCellsForShapePicker=function(a,b){var d=mxUtils.bind(this,function(a,b,d,k){return this.editor.graph.createVertex(null,null,k||"",0,0,b||120,d||60,a,!1)});return[null!=a?this.editor.graph.cloneCell(a):d("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),d("whiteSpace=wrap;html=1;"),d("ellipse;whiteSpace=wrap;html=1;"),d("rhombus;whiteSpace=wrap;html=1;",80,80),d("rounded=1;whiteSpace=wrap;html=1;"),
+d("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),d("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),d("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),d("triangle;whiteSpace=wrap;html=1;",60,80),d("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",
+120,80),d("shape=tape;whiteSpace=wrap;html=1;",120,100),d("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),d("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),d("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};
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;if(9==a.which&&c.isEnabled()&&!mxEvent.isControlDown(a)){if(c.isEditing())if(mxEvent.isAltDown(a))c.stopEditing(!1);else try{c.cellEditor.isContentEditing()&&c.cellEditor.isTextSelected()?document.execCommand(mxEvent.isShiftDown(a)?"outdent":"indent",!1,null):mxEvent.isShiftDown(a)?c.stopEditing(!1):c.cellEditor.insertTab(c.cellEditor.isContentEditing()?null:4)}catch(b){}else mxEvent.isAltDown(a)?c.selectParentCell():c.selectCell(!mxEvent.isShiftDown(a));
+EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;if(9==a.which&&b.isEnabled()&&!mxEvent.isControlDown(a)){if(b.isEditing())if(mxEvent.isAltDown(a))b.stopEditing(!1);else try{b.cellEditor.isContentEditing()&&b.cellEditor.isTextSelected()?document.execCommand(mxEvent.isShiftDown(a)?"outdent":"indent",!1,null):mxEvent.isShiftDown(a)?b.stopEditing(!1):b.cellEditor.insertTab(b.cellEditor.isContentEditing()?null:4)}catch(d){}else mxEvent.isAltDown(a)?b.selectParentCell():b.selectCell(!mxEvent.isShiftDown(a));
mxEvent.consume(a)}};
-EditorUi.prototype.onKeyPress=function(a){var c=this.editor.graph;!this.isImmediateEditingEvent(a)||c.isEditing()||c.isSelectionEmpty()||0===a.which||27===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(c.escape(),c.startEditing(),mxClient.IS_FF&&(c=c.cellEditor,null!=c.textarea&&(c.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(c.textarea),a.collapse(!1),c=window.getSelection(),c.removeAllRanges(),c.addRange(a))))};
+EditorUi.prototype.onKeyPress=function(a){var b=this.editor.graph;!this.isImmediateEditingEvent(a)||b.isEditing()||b.isSelectionEmpty()||0===a.which||27===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(b.escape(),b.startEditing(),mxClient.IS_FF&&(b=b.cellEditor,null!=b.textarea&&(b.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(b.textarea),a.collapse(!1),b=window.getSelection(),b.removeAllRanges(),b.addRange(a))))};
EditorUi.prototype.isImmediateEditingEvent=function(a){return!0};
-EditorUi.prototype.getCssClassForMarker=function(a,c,b,e){return"flexArrow"==c?null!=b&&b!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":"box"==b||"halfCircle"==b?"geSprite geSvgSprite geSprite-"+b+("end"==a?" geFlipSprite":""):b==mxConstants.ARROW_CLASSIC?"1"==e?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":b==mxConstants.ARROW_CLASSIC_THIN?"1"==e?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":b==mxConstants.ARROW_OPEN?
-"geSprite geSprite-"+a+"open":b==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+a+"openthin":b==mxConstants.ARROW_BLOCK?"1"==e?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":b==mxConstants.ARROW_BLOCK_THIN?"1"==e?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":b==mxConstants.ARROW_OVAL?"1"==e?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":b==mxConstants.ARROW_DIAMOND?"1"==e?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":
-b==mxConstants.ARROW_DIAMOND_THIN?"1"==e?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==b?"geSprite geSprite-"+a+"openasync":"dash"==b?"geSprite geSprite-"+a+"dash":"cross"==b?"geSprite geSprite-"+a+"cross":"async"==b?"1"==e?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==b||"circlePlus"==b?"1"==e||"circle"==b?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==b?"geSprite geSprite-"+a+"erone":"ERmandOne"==
-b?"geSprite geSprite-"+a+"eronetoone":"ERmany"==b?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==b?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==b?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==b?"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"),b=this.actions.get("pasteHere");c.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));b.setEnabled(c.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(b){b.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(b){var c=null;if(b.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var c=c||b.getSelectionCells(),c=b.getExportableCells(b.model.getTopmostCells(c)),d={},e=b.createCellLookup(c),f=b.cloneCells(c,null,d),m=new mxGraphModel,n=m.getChildAt(m.getRoot(),
-0),p=0;p<f.length;p++){m.add(n,f[p]);var q=b.view.getState(c[p]);if(null!=q){var t=b.getCellGeometry(f[p]);null!=t&&t.relative&&!m.isEdge(c[p])&&null==e[mxObjectIdentity.get(m.getParent(c[p]))]&&(t.offset=null,t.relative=!1,t.x=q.x/q.view.scale-q.view.translate.x,t.y=q.y/q.view.scale-q.view.translate.y)}}b.updateCustomLinks(b.createCellMapping(d,e),f);mxClipboard.insertCount=1;mxClipboard.setCells(f)}a.updatePasteActionStates();return c};var b=mxClipboard.paste;mxClipboard.paste=function(c){var d=
-null;c.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):d=b.apply(this,arguments);a.updatePasteActionStates();return d};var e=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){e.apply(this,arguments);a.updatePasteActionStates()};var d=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){d.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.getCssClassForMarker=function(a,b,d,e){return"flexArrow"==b?null!=d&&d!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":"box"==d||"halfCircle"==d?"geSprite geSvgSprite geSprite-"+d+("end"==a?" geFlipSprite":""):d==mxConstants.ARROW_CLASSIC?"1"==e?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":d==mxConstants.ARROW_CLASSIC_THIN?"1"==e?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":d==mxConstants.ARROW_OPEN?
+"geSprite geSprite-"+a+"open":d==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+a+"openthin":d==mxConstants.ARROW_BLOCK?"1"==e?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":d==mxConstants.ARROW_BLOCK_THIN?"1"==e?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":d==mxConstants.ARROW_OVAL?"1"==e?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":d==mxConstants.ARROW_DIAMOND?"1"==e?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":
+d==mxConstants.ARROW_DIAMOND_THIN?"1"==e?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==d?"geSprite geSprite-"+a+"openasync":"dash"==d?"geSprite geSprite-"+a+"dash":"cross"==d?"geSprite geSprite-"+a+"cross":"async"==d?"1"==e?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==d||"circlePlus"==d?"1"==e||"circle"==d?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==d?"geSprite geSprite-"+a+"erone":"ERmandOne"==
+d?"geSprite geSprite-"+a+"eronetoone":"ERmany"==d?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==d?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==d?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==d?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
+EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),d=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));d.setEnabled(b.isEnabled())};
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(c){c.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(b){var c=null;if(b.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var c=c||b.getSelectionCells(),c=b.getExportableCells(b.model.getTopmostCells(c)),d={},e=b.createCellLookup(c),f=b.cloneCells(c,null,d),m=new mxGraphModel,n=m.getChildAt(m.getRoot(),
+0),p=0;p<f.length;p++){m.add(n,f[p]);var q=b.view.getState(c[p]);if(null!=q){var u=b.getCellGeometry(f[p]);null!=u&&u.relative&&!m.isEdge(c[p])&&null==e[mxObjectIdentity.get(m.getParent(c[p]))]&&(u.offset=null,u.relative=!1,u.x=q.x/q.view.scale-q.view.translate.x,u.y=q.y/q.view.scale-q.view.translate.y)}}b.updateCustomLinks(b.createCellMapping(d,e),f);mxClipboard.insertCount=1;mxClipboard.setCells(f)}a.updatePasteActionStates();return c};var d=mxClipboard.paste;mxClipboard.paste=function(b){var c=
+null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):c=d.apply(this,arguments);a.updatePasteActionStates();return c};var e=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){e.apply(this,arguments);a.updatePasteActionStates()};var c=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){c.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,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null,b=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;e=null!=e?e:0;var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),k=a.view.translate,h=a.view.scale,l=mxRectangle.fromRectangle(f);
-l.x=l.x/h-k.x;l.y=l.y/h-k.y;l.width/=h;l.height/=h;var k=a.container.scrollTop,m=a.container.scrollLeft,n=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=a.container.offsetWidth-n,n=a.container.offsetHeight-n;b=b?Math.max(.3,Math.min(c||1,p/l.width)):h;c=(p-b*l.width)/2/b;var q=0==this.lightboxVerticalDivider?0:(n-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),q=Math.max(q,0));if(g||f.width<p||f.height<n)a.view.scaleAndTranslate(b,Math.floor(c-
-l.x),Math.floor(q-l.y)),a.container.scrollTop=k*b/h,a.container.scrollLeft=m*b/h;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/h),Math.floor(f.y+e/h))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",e)});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 d=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=
+this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var b=null,d=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(b,c,d,e){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;e=null!=e?e:0;var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),k=a.view.translate,h=a.view.scale,m=mxRectangle.fromRectangle(f);
+m.x=m.x/h-k.x;m.y=m.y/h-k.y;m.width/=h;m.height/=h;var k=a.container.scrollTop,l=a.container.scrollLeft,n=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=a.container.offsetWidth-n,n=a.container.offsetHeight-n;b=b?Math.max(.3,Math.min(c||1,p/m.width)):h;c=(p-b*m.width)/2/b;var q=0==this.lightboxVerticalDivider?0:(n-b*m.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),q=Math.max(q,0));if(g||f.width<p||f.height<n)a.view.scaleAndTranslate(b,Math.floor(c-
+m.x),Math.floor(q-m.y)),a.container.scrollTop=k*b/h,a.container.scrollLeft=l*b/h;else if(0!=d||0!=e)f=a.view.translate,a.view.setTranslate(Math.floor(f.x+d/h),Math.floor(f.y+e/h))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",e)});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 c=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.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"transition","opacity 600ms ease-in-out");var f=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",f);f();var k=0,f=mxUtils.bind(this,function(a,b,c){k++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight=
-"8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title",c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);a.style.width="36px";a.style.filter="invert(100%)";d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=d.backBtn&&f(mxUtils.bind(this,function(a){window.location.href=d.backBtn.url;mxEvent.consume(a)}),Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var h=f(mxUtils.bind(this,
+"8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title",c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);a.style.width="36px";a.style.filter="invert(100%)";d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=c.backBtn&&f(mxUtils.bind(this,function(a){window.location.href=c.backBtn.url;mxEvent.consume(a)}),Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var h=f(mxUtils.bind(this,
function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousImage,mxResources.get("previousPage")),g=document.createElement("div");g.style.fontFamily=Editor.defaultHtmlFont;g.style.display="inline-block";g.style.verticalAlign="top";g.style.fontWeight="bold";g.style.marginTop="8px";g.style.fontSize="14px";g.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(g);var l=f(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();
mxEvent.consume(a)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});h.style.paddingLeft="0px";h.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var n=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",h.style.display=
"",g.style.display="inline-block"):(l.style.display="none",h.style.display="none",g.style.display="none");m()});this.editor.addListener("resetGraphView",n);this.editor.addListener("pageSelected",m)}f(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");f(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
-f(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.zoomFitImage,mxResources.get("fit"));var p=null,q=null,t=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),p=null);null!=q&&(window.clearTimeout(q),q=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";q=null}),600)}),a||200)}),v=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),p=null);null!=q&&(window.clearTimeout(q),q=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var u=f(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,
-"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var c=u.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+f(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.zoomFitImage,mxResources.get("fit"));var p=null,q=null,u=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),p=null);null!=q&&(window.clearTimeout(q),q=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
+"none";q=null}),600)}),a||200)}),v=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),p=null);null!=q&&(window.clearTimeout(q),q=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var t=f(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,
+"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var c=t.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(b)}),
-Editor.layersImage,mxResources.get("layers")),x=a.getModel();x.addListener(mxEvent.CHANGE,function(){u.style.display=1<x.getChildCount(x.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(f);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||f(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.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(n=0;n<this.lightboxToolbarActions.length;n++){var w=this.lightboxToolbarActions[n];w.elem=f(w.fn,w.icon,w.tooltip)}null!=d.refreshBtn&&f(mxUtils.bind(this,function(a){d.refreshBtn.url?window.location.href=d.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=d.fullscreenBtn&&window.self!==window.top&&f(mxUtils.bind(this,
-function(b){d.fullscreenBtn.url?a.openLink(d.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(d.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&f(mxUtils.bind(this,function(a){"1"==urlParams.close||d.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeImage,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)||v(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(b){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(b)?t():v(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():v(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||v(30)}));var A=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=
-c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(c,d){mxEvent.isTouchEvent(d.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<A&&Math.abs(this.scrollTop-a.container.scrollTop)<A&&Math.abs(this.startX-d.getGraphX())<A&&Math.abs(this.startY-d.getGraphY())<A&&(0<parseFloat(b.chromelessToolbar.style.opacity||0)?t():v(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var E=
-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}E.apply(this,arguments)};if(!a.isViewer()){var H=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*
-c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?H.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-
-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var D=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var z=null,I=null,K=null,L=null,O=null,J=function(d){null!=z&&window.clearTimeout(z);window.setTimeout(function(){if(!a.isMouseDown||L)z=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="",D.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",D.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";D.style.transform=""},0)):(F.style.transform="",D.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var d=new mxPoint(a.container.scrollLeft,a.container.scrollTop),
-e=mxUtils.getOffset(a.container),f=a.view.scale,g=0,k=0;null!=I&&(g=a.container.offsetWidth/2-I.x+e.x,k=a.container.offsetHeight/2-I.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=K&&(g+=d.x-K.x,k+=d.y-K.y),null!=c&&b.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),k*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==g&&0==k||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=k*(a.cumulativeZoomFactor-1)));null!=O&&F.setAttribute("filter",
-O);a.cumulativeZoomFactor=1;O=L=I=K=z=null}),null!=d?d:a.isFastZoomEnabled()?b.wheelZoomDelay:b.lazyZoomDelay)},0)},P=Date.now();a.lazyZoom=function(c,d,e){(d=d||!a.scrollbars)&&(I=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-P)){P=Date.now();c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
+Editor.layersImage,mxResources.get("layers")),x=a.getModel();x.addListener(mxEvent.CHANGE,function(){t.style.display=1<x.getChildCount(x.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(f);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||f(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.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(n=0;n<this.lightboxToolbarActions.length;n++){var w=this.lightboxToolbarActions[n];w.elem=f(w.fn,w.icon,w.tooltip)}null!=c.refreshBtn&&f(mxUtils.bind(this,function(a){c.refreshBtn.url?window.location.href=c.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=c.fullscreenBtn&&window.self!==window.top&&f(mxUtils.bind(this,
+function(b){c.fullscreenBtn.url?a.openLink(c.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(b)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(c.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&f(mxUtils.bind(this,function(a){"1"==urlParams.close||c.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeImage,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)||v(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",
+mxUtils.bind(this,function(b){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(b)?u():v(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?u():v(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||v(30)}));var z=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=
+c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<z&&Math.abs(this.scrollTop-a.container.scrollTop)<z&&Math.abs(this.startX-c.getGraphX())<z&&Math.abs(this.startY-c.getGraphY())<z&&(0<parseFloat(d.chromelessToolbar.style.opacity||0)?u():v(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var E=
+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}E.apply(this,arguments)};if(!a.isViewer()){var G=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*
+c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=e||g.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==c?G.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-
+d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var D=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var y=null,I=null,K=null,L=null,O=null,J=function(c){null!=y&&window.clearTimeout(y);window.setTimeout(function(){if(!a.isMouseDown||L)y=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="",D.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",D.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";D.style.transform=""},0)):(F.style.transform="",D.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),
+e=mxUtils.getOffset(a.container),f=a.view.scale,g=0,k=0;null!=I&&(g=a.container.offsetWidth/2-I.x+e.x,k=a.container.offsetHeight/2-I.y+e.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=K&&(g+=c.x-K.x,k+=c.y-K.y),null!=b&&d.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),k*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==g&&0==k||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=k*(a.cumulativeZoomFactor-1)));null!=O&&F.setAttribute("filter",
+O);a.cumulativeZoomFactor=1;O=L=I=K=y=null}),null!=c?c:a.isFastZoomEnabled()?d.wheelZoomDelay:d.lazyZoomDelay)},0)},P=Date.now();a.lazyZoom=function(b,c,e){(c=c||!a.scrollbars)&&(I=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-P)){P=Date.now();b?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==
-O&&""!=F.getAttribute("filter")&&(O=F.getAttribute("filter"),F.removeAttribute("filter"));K=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=d?a.container.scrollLeft+a.container.clientWidth/2:I.x+a.container.scrollLeft-a.container.offsetLeft;var f=d?a.container.scrollTop+a.container.clientHeight/2:I.y+a.container.scrollTop-a.container.offsetTop;F.style.transformOrigin=c+"px "+f+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";D.style.transformOrigin=c+"px "+f+"px";D.style.transform=
-"scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(d?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":I.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(d?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":I.y+a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,
-"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=b.hoverIcons&&b.hoverIcons.reset()}J(e)}};mxEvent.addGestureListeners(a.container,function(a){null!=z&&window.clearTimeout(z)},null,function(b){1!=a.cumulativeZoomFactor&&J(0)});mxEvent.addListener(a.container,"scroll",function(b){null==z||a.isMouseDown||1==a.cumulativeZoomFactor||J(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c,d,e,f){a.fireEvent(new mxEventObject("wheel"));
+O&&""!=F.getAttribute("filter")&&(O=F.getAttribute("filter"),F.removeAttribute("filter"));K=new mxPoint(a.container.scrollLeft,a.container.scrollTop);b=c?a.container.scrollLeft+a.container.clientWidth/2:I.x+a.container.scrollLeft-a.container.offsetLeft;var f=c?a.container.scrollTop+a.container.clientHeight/2:I.y+a.container.scrollTop-a.container.offsetTop;F.style.transformOrigin=b+"px "+f+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";D.style.transformOrigin=b+"px "+f+"px";D.style.transform=
+"scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(b=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(b.style,"transform-origin",(c?a.container.clientWidth/2+a.container.scrollLeft-b.offsetLeft+"px":I.x+a.container.scrollLeft-b.offsetLeft-a.container.offsetLeft+"px")+" "+(c?a.container.clientHeight/2+a.container.scrollTop-b.offsetTop+"px":I.y+a.container.scrollTop-b.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(b.style,
+"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=d.hoverIcons&&d.hoverIcons.reset()}J(e)}};mxEvent.addGestureListeners(a.container,function(a){null!=y&&window.clearTimeout(y)},null,function(b){1!=a.cumulativeZoomFactor&&J(0)});mxEvent.addListener(a.container,"scroll",function(b){null==y||a.isMouseDown||1==a.cumulativeZoomFactor||J(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c,d,e,f){a.fireEvent(new mxEventObject("wheel"));
if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!d&&a.isScrollWheelEvent(b))d=a.view.getTranslate(),e=40/a.view.scale,mxEvent.isShiftDown(b)?a.view.setTranslate(d.x+(c?-e:e),d.y):a.view.setTranslate(d.x,d.y+(c?e:-e));else if(d||a.isZoomWheelEvent(b))for(var g=mxEvent.getSource(b);null!=g;){if(g==a.container)return a.tooltipHandler.hideTooltip(),I=null!=e&&null!=f?new mxPoint(e,f):new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b)),L=d,a.lazyZoom(c),mxEvent.consume(b),!1;g=g.parentNode}}),
a.container);a.panningHandler.zoomGraph=function(b){a.cumulativeZoomFactor=b.scale;a.lazyZoom(0<b.scale,!0);mxEvent.consume(b)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
-EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var c=urlParams.border,b=60;null!=c&&(b=parseInt(c));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(b,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
+EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,d=60;null!=b&&(d=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(d,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,c){try{var b=mxUtils.parseXml(a);this.editor.setGraphXml(b.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=c&&(this.editor.setFilename(c),this.updateDocumentTitle())}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,c,b,e){this.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(a);d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});d.popup(c,b,null,e);this.setCurrentMenu(d)};
-EditorUi.prototype.setCurrentMenu=function(a,c){this.currentMenuElt=c;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};
-EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}};EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var c=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);c==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(b){}};
-EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0,b;for(b in urlParams)a=0==c?a+"?":a+"&",a+=b+"="+urlParams[b],c++;return a};
-EditorUi.prototype.setScrollbars=function(a){var c=this.editor.graph,b=c.container.style.overflow;c.scrollbars=a;this.editor.updateGraphComponents();b!=c.container.style.overflow&&(c.container.scrollTop=0,c.container.scrollLeft=0,c.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
-EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var c=a.getPagePadding();a.container.scrollTop=Math.floor(c.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(c.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
-1;c=a.getGraphBounds();0<c.width&&0<c.height&&(c.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(c.x+c.width-a.container.clientWidth,c.x-10)),c.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(c.y+c.height-a.container.clientHeight,c.y-10)))}else{var c=a.getGraphBounds(),b=Math.max(c.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,c.y-Math.max(20,(a.container.clientHeight-Math.max(c.height,
-a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,c.x-Math.max(0,(a.container.clientWidth-b)/2)))}else{var c=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds()),b=a.view.translate,e=a.view.scale;c.x=c.x/e-b.x;c.y=c.y/e-b.y;c.width/=e;c.height/=e;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-c.width)/2)-c.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-c.height)/4))-c.y+1))}};
-EditorUi.prototype.setPageVisible=function(a){var c=this.editor.graph,b=mxUtils.hasScrollbars(c.container),e=0,d=0;b&&(e=c.view.translate.x*c.view.scale-c.container.scrollLeft,d=c.view.translate.y*c.view.scale-c.container.scrollTop);c.pageVisible=a;c.pageBreaksVisible=a;c.preferPageSize=a;c.view.validateBackground();b&&(a=c.getSelectionCells(),c.clearSelection(),c.setSelectionCells(a));c.sizeDidChange();b&&(c.container.scrollLeft=c.view.translate.x*c.view.scale-e,c.container.scrollTop=c.view.translate.y*
-c.view.scale-d);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(a,c){this.ui=a;this.color=c}ChangeGridColor.prototype.execute=function(){var a=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=a};(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(a)})();
-function ChangePageSetup(a,c,b,e,d){this.ui=a;this.previousColor=this.color=c;this.previousImage=this.image=b;this.previousFormat=this.format=e;this.previousPageScale=this.pageScale=d;this.ignoreImage=this.ignoreColor=!1}
-ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var c=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=c}if(!this.ignoreImage){this.image=this.previousImage;var c=a.backgroundImage,b=this.previousImage;null!=b&&null!=b.src&&"data:page/id,"==b.src.substring(0,13)&&(b=this.ui.createImageForPageLink(b.src,this.ui.currentPage));this.ui.setBackgroundImage(b);this.previousImage=c}null!=this.previousFormat&&
-(this.format=this.previousFormat,c=a.pageFormat,this.previousFormat.width!=c.width||this.previousFormat.height!=c.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=c);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(a=this.ui.editor.graph.pageScale,this.previousPageScale!=a&&(this.ui.setPageScale(this.previousPageScale),
-this.previousPageScale=a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,b,e){e.previousColor=e.color;e.previousImage=e.image;e.previousFormat=e.format;e.previousPageScale=e.pageScale;null!=e.foldingEnabled&&(e.foldingEnabled=!e.foldingEnabled);return e};mxCodecRegistry.register(a)})();
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);this.editor.setGraphXml(d.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,d,e){this.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(a);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()});c.popup(b,d,null,e);this.setCurrentMenu(c)};
+EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};
+EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}};EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(d){}};
+EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,d;for(d in urlParams)a=0==b?a+"?":a+"&",a+=d+"="+urlParams[d],b++;return a};
+EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,d=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();d!=b.container.style.overflow&&(b.container.scrollTop=0,b.container.scrollLeft=0,b.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
+EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var b=a.getPagePadding();a.container.scrollTop=Math.floor(b.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
+1;b=a.getGraphBounds();0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),d=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,
+a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-d)/2)))}else{var b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds()),d=a.view.translate,e=a.view.scale;b.x=b.x/e-d.x;b.y=b.y/e-d.y;b.width/=e;b.height/=e;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,d=mxUtils.hasScrollbars(b.container),e=0,c=0;d&&(e=b.view.translate.x*b.view.scale-b.container.scrollLeft,c=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();d&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();d&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-e,b.container.scrollTop=b.view.translate.y*
+b.view.scale-c);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(a,b){this.ui=a;this.color=b}ChangeGridColor.prototype.execute=function(){var a=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=a};(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(a)})();
+function ChangePageSetup(a,b,d,e,c){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=d;this.previousFormat=this.format=e;this.previousPageScale=this.pageScale=c;this.ignoreImage=this.ignoreColor=!1}
+ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}if(!this.ignoreImage){this.image=this.previousImage;var b=a.backgroundImage,d=this.previousImage;null!=d&&null!=d.src&&"data:page/id,"==d.src.substring(0,13)&&(d=this.ui.createImageForPageLink(d.src,this.ui.currentPage));this.ui.setBackgroundImage(d);this.previousImage=b}null!=this.previousFormat&&
+(this.format=this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(a=this.ui.editor.graph.pageScale,this.previousPageScale!=a&&(this.ui.setPageScale(this.previousPageScale),
+this.previousPageScale=a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,d,e){e.previousColor=e.color;e.previousImage=e.image;e.previousFormat=e.format;e.previousPageScale=e.pageScale;null!=e.foldingEnabled&&(e.foldingEnabled=!e.foldingEnabled);return e};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,c){c=null!=c?c:"1"==urlParams.sketch;this.editor.graph.pageFormat=a;c||(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.setPageFormat=function(a,b){b=null!=b?b:"1"==urlParams.sketch;this.editor.graph.pageFormat=a;b||(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"),b=this.editor.undoManager,e=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});b.addListener(mxEvent.ADD,e);b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);b.addListener(mxEvent.CLEAR,e);var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);e()};var f=this.editor.graph.cellEditor.stopEditing;
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),d=this.editor.undoManager,e=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});d.addListener(mxEvent.ADD,e);d.addListener(mxEvent.UNDO,e);d.addListener(mxEvent.REDO,e);d.addListener(mxEvent.CLEAR,e);var c=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){c.apply(this,arguments);e()};var f=this.editor.graph.cellEditor.stopEditing;
this.editor.graph.cellEditor.stopEditing=function(a,b){f.apply(this,arguments);e()};e()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,c=!1,b=!1,e=!1,d=!1,f=[],k=a.getSelectionCells();if(null!=k)for(var h=0;h<k.length;h++){var g=k[h];a.isCellEditable(g)&&(f.push(g),d=!0,a.getModel().isEdge(g)&&(e=!0),a.getModel().isVertex(g)&&(c=!0,0<a.getModel().getChildCount(g)||a.isContainer(g)))&&(b=!0)}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(h=
-0;h<k.length;h++)this.actions.get(k[h]).setEnabled(d);this.actions.get("lockUnlock").setEnabled(!a.isSelectionEmpty());this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(d);this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("bringForward").setEnabled(1==f.length);this.actions.get("sendBackward").setEnabled(1==f.length);this.actions.get("turn").setEnabled(0<a.getResizableCells(a.getSelectionCells()).length);
-this.actions.get("curved").setEnabled(e);this.actions.get("rotation").setEnabled(c);this.actions.get("wordWrap").setEnabled(c);this.actions.get("autosize").setEnabled(c);e=c&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||e&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(b);this.actions.get("removeFromGroup").setEnabled(e&&a.getModel().isVertex(a.getModel().getParent(f[0])));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(d||
-null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(c&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);
-this.actions.get("editLink").setEnabled(1==f.length);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);f=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(f&&c);this.menus.get("align").setEnabled(f&&
-c&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(f&&c&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(f);this.actions.get("selectEdges").setEnabled(f);this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);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=this.container.clientWidth,b=this.container.clientHeight;this.container==document.body&&(c=document.body.clientWidth||document.documentElement.clientWidth,b=document.documentElement.clientHeight);var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var d=Math.max(0,Math.min(this.hsplitPosition,c-this.splitSize-
-20)),f=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",f+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",f+=this.toolbarHeight);0<f&&(f+=1);c=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e,c=Math.max(0,Math.min(b-f-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=d+"px";this.sidebarFooterContainer.style.height=c+"px";
-this.sidebarFooterContainer.style.bottom=k+"px"}b=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=f+"px";this.sidebarContainer.style.width=d+"px";this.formatContainer.style.top=f+"px";this.formatContainer.style.width=b+"px";this.formatContainer.style.display=null!=this.format?"":"none";var k=this.getDiagramContainerOffset(),h=null!=this.hsplit.parentNode?d+this.splitSize:0;this.diagramContainer.style.left=h+k.x+"px";this.diagramContainer.style.top=f+k.y+"px";this.footerContainer.style.height=
-this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=d+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=h+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=e+"px");this.diagramContainer.style.right=b+"px";d=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=
-this.diagramContainer.style.right,d=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+c+e+"px";this.formatContainer.style.bottom=this.footerHeight+e+"px";this.diagramContainer.style.bottom=this.footerHeight+e+d+"px";a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!1,d=!1,e=!1,c=!1,f=[],k=a.getSelectionCells();if(null!=k)for(var h=0;h<k.length;h++){var g=k[h];a.isCellEditable(g)&&(f.push(g),c=!0,a.getModel().isEdge(g)&&(e=!0),a.getModel().isVertex(g)&&(b=!0,0<a.getModel().getChildCount(g)||a.isContainer(g)))&&(d=!0)}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(h=
+0;h<k.length;h++)this.actions.get(k[h]).setEnabled(c);this.actions.get("lockUnlock").setEnabled(!a.isSelectionEmpty());this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(c);this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("bringForward").setEnabled(1==f.length);this.actions.get("sendBackward").setEnabled(1==f.length);this.actions.get("turn").setEnabled(0<a.getResizableCells(a.getSelectionCells()).length);
+this.actions.get("curved").setEnabled(e);this.actions.get("rotation").setEnabled(b);this.actions.get("wordWrap").setEnabled(b);this.actions.get("autosize").setEnabled(b);e=b&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||e&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(d);this.actions.get("removeFromGroup").setEnabled(e&&a.getModel().isVertex(a.getModel().getParent(f[0])));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(c||
+null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(b&&(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()));d=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(d);this.actions.get("collapse").setEnabled(d);
+this.actions.get("editLink").setEnabled(1==f.length);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);f=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(f&&b);this.menus.get("align").setEnabled(f&&
+b&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(f&&b&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(f);this.actions.get("selectEdges").setEnabled(f);this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,d=document.documentElement.clientHeight);var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var c=Math.max(0,Math.min(this.hsplitPosition,b-this.splitSize-
+20)),f=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",f+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",f+=this.toolbarHeight);0<f&&(f+=1);b=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e,b=Math.max(0,Math.min(d-f-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=c+"px";this.sidebarFooterContainer.style.height=b+"px";
+this.sidebarFooterContainer.style.bottom=k+"px"}d=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=f+"px";this.sidebarContainer.style.width=c+"px";this.formatContainer.style.top=f+"px";this.formatContainer.style.width=d+"px";this.formatContainer.style.display=null!=this.format?"":"none";var k=this.getDiagramContainerOffset(),h=null!=this.hsplit.parentNode?c+this.splitSize:0;this.diagramContainer.style.left=h+k.x+"px";this.diagramContainer.style.top=f+k.y+"px";this.footerContainer.style.height=
+this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+e+"px";this.hsplit.style.left=c+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=h+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=e+"px");this.diagramContainer.style.right=d+"px";c=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=
+this.diagramContainer.style.right,c=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+b+e+"px";this.formatContainer.style.bottom=this.footerHeight+e+"px";this.diagramContainer.style.bottom=this.footerHeight+e+c+"px";a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2293,51 +2293,51 @@ EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var a=this.editor.chromeless?null:this.createFooter();null!=a&&(this.footerContainer.appendChild(a),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
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";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,b,e){function d(a){if(null!=k){var d=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));e(Math.max(0,h+(c?d.x-k.x:k.y-d.y)-b));mxEvent.consume(a);h!=m()&&(g=!0,l=null)}}function f(a){d(a);k=h=null}var k=null,h=null,g=!0,l=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var m=mxUtils.bind(this,function(){var d=parseInt(c?a.style.left:a.style.bottom);c||(d=d+b-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){k=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));h=m();g=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!g&&this.hsplitClickEnabled){var c=null!=l?l-b:0;l=m();e(c);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,d,f);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,d,f)})};
-EditorUi.prototype.handleError=function(a,c,b,e,d){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=c){d=mxUtils.htmlEntities(mxResources.get("unknownError"));var f=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=a&&null!=a.message&&(d=mxUtils.htmlEntities(a.message));this.showError(c,d,f,b,null,null,null,null,null,null,null,null,e?b:null)}else null!=b&&b()};
-EditorUi.prototype.showError=function(a,c,b,e,d,f,k,h,g,l,m,n,p){a=new ErrorDialog(this,a,c,b||mxResources.get("ok"),e,d,f,k,n,h,g);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(a.container,l||340,m||100+20*c,!0,!1,p);a.init()};EditorUi.prototype.showDialog=function(a,c,b,e,d,f,k,h,g,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,c,b,e,d,f,k,h,g,l);this.dialogs.push(this.dialog)};
-EditorUi.prototype.hideDialog=function(a,c,b){null!=this.dialogs&&0<this.dialogs.length&&(null==b||b==this.dialog.container.firstChild)&&(b=this.dialogs.pop(),0==b.close(a,c)?this.dialogs.push(b):(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(),b=new mxDictionary,e=[],d=0;d<c.length;d++){var f=a.isTableCell(c[d])?a.model.getParent(c[d]):c[d];null==f||b.get(f)||(b.put(f,!0),e.push(f))}a.setSelectionCells(a.duplicateCells(e,!1))}catch(k){this.handleError(k)}};
-EditorUi.prototype.pickColor=function(a,c){var b=this.editor.graph,e=b.cellEditor.saveSelection(),d=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),f=new ColorDialog(this,a||"none",function(a){b.cellEditor.restoreSelection(e);c(a)},function(){b.cellEditor.restoreSelection(e)});this.showDialog(f.container,230,d,!0,!1);f.init()};
+EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
+EditorUi.prototype.addSplitHandler=function(a,b,d,e){function c(a){if(null!=k){var c=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));e(Math.max(0,h+(b?c.x-k.x:k.y-c.y)-d));mxEvent.consume(a);h!=m()&&(g=!0,l=null)}}function f(a){c(a);k=h=null}var k=null,h=null,g=!0,l=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var m=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+d-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){k=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));h=m();g=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!g&&this.hsplitClickEnabled){var b=null!=l?l-d:0;l=m();e(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,c,f);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,c,f)})};
+EditorUi.prototype.handleError=function(a,b,d,e,c){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){c=mxUtils.htmlEntities(mxResources.get("unknownError"));var f=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(c=mxUtils.htmlEntities(a.message));this.showError(b,c,f,d,null,null,null,null,null,null,null,null,e?d:null)}else null!=d&&d()};
+EditorUi.prototype.showError=function(a,b,d,e,c,f,k,h,g,l,m,n,p){a=new ErrorDialog(this,a,b,d||mxResources.get("ok"),e,c,f,k,n,h,g);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,l||340,m||100+20*b,!0,!1,p);a.init()};EditorUi.prototype.showDialog=function(a,b,d,e,c,f,k,h,g,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,d,e,c,f,k,h,g,l);this.dialogs.push(this.dialog)};
+EditorUi.prototype.hideDialog=function(a,b,d){null!=this.dialogs&&0<this.dialogs.length&&(null==d||d==this.dialog.container.firstChild)&&(d=this.dialogs.pop(),0==d.close(a,b)?this.dialogs.push(d):(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 b=a.getSelectionCells(),d=new mxDictionary,e=[],c=0;c<b.length;c++){var f=a.isTableCell(b[c])?a.model.getParent(b[c]):b[c];null==f||d.get(f)||(d.put(f,!0),e.push(f))}a.setSelectionCells(a.duplicateCells(e,!1))}catch(k){this.handleError(k)}};
+EditorUi.prototype.pickColor=function(a,b){var d=this.editor.graph,e=d.cellEditor.saveSelection(),c=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),f=new ColorDialog(this,a||"none",function(a){d.cellEditor.restoreSelection(e);b(a)},function(){d.cellEditor.restoreSelection(e)});this.showDialog(f.container,230,c,!0,!1);f.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 b=a.indexOf("&lt;mxGraphModel ");if(0<=b){var e=a.lastIndexOf("&lt;/mxGraphModel&gt;");e>b&&(c=a.substring(b,e+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(d){}return c};
-EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){null!=c?a(c):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){if(null!=b){var c=decodeURIComponent(b);this.isCompatibleString(c)&&(b=c)}a(b)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,c){navigator.clipboard.read().then(mxUtils.bind(this,function(b){if(null!=b&&0<b.length&&"html"==c&&0<=mxUtils.indexOf(b[0].types,"text/html"))b[0].getType("text/html").then(mxUtils.bind(this,function(b){b.text().then(mxUtils.bind(this,function(b){try{var c=this.parseHtmlData(b),d="text/plain"!=c.getAttribute("data-type")?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):c.innerText);try{var e=d.lastIndexOf("%3E");
-0<=e&&e<d.length-3&&(d=d.substring(0,e+3))}catch(m){}try{var g=c.getElementsByTagName("span"),l=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(d);this.isCompatibleString(l)&&(d=l)}catch(m){}}catch(m){}a(this.isCompatibleString(d)?d:null)}))["catch"](function(b){a(null)})}))["catch"](function(b){a(null)});else if(null!=b&&0<b.length&&"text"==c&&0<=mxUtils.indexOf(b[0].types,"text/plain"))b[0].getType("text/plain").then(function(b){b.text().then(function(b){a(b)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var d=a.indexOf("&lt;mxGraphModel ");if(0<=d){var e=a.lastIndexOf("&lt;/mxGraphModel&gt;");e>d&&(b=a.substring(d,e+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(c){}return b};
+EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){if(null!=b){var d=decodeURIComponent(b);this.isCompatibleString(d)&&(b=d)}a(b)}),"text")}),"html")};
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(d){if(null!=d&&0<d.length&&"html"==b&&0<=mxUtils.indexOf(d[0].types,"text/html"))d[0].getType("text/html").then(mxUtils.bind(this,function(b){b.text().then(mxUtils.bind(this,function(b){try{var c=this.parseHtmlData(b),d="text/plain"!=c.getAttribute("data-type")?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):c.innerText);try{var e=d.lastIndexOf("%3E");
+0<=e&&e<d.length-3&&(d=d.substring(0,e+3))}catch(m){}try{var g=c.getElementsByTagName("span"),l=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(d);this.isCompatibleString(l)&&(d=l)}catch(m){}}catch(m){}a(this.isCompatibleString(d)?d:null)}))["catch"](function(b){a(null)})}))["catch"](function(b){a(null)});else if(null!=d&&0<d.length&&"text"==b&&0<=mxUtils.indexOf(d[0].types,"text/plain"))d[0].getType("text/plain").then(function(b){b.text().then(function(b){a(b)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
else a(null)}))["catch"](function(b){a(null)})};
-EditorUi.prototype.parseHtmlData=function(a){var c=null;if(null!=a&&0<a.length){var b="<meta "==a.substring(0,6),c=document.createElement("div");c.innerHTML=(b?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(a);asHtml=!0;a=c.getElementsByTagName("style");if(null!=a)for(;0<a.length;)a[0].parentNode.removeChild(a[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
-c.firstChild.nodeName&&"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(a=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,a==c.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(c,a),asHtml=!1));b=b&&null!=c.firstChild?c.firstChild.nextSibling:c.firstChild;null!=b&&null==b.nextSibling&&b.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==b.nodeName?(a=b.getAttribute("src"),
-null!=a&&("data:image/png;base64,"==a.substring(0,22)&&(b=this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(a=b)),mxUtils.setTextContent(c,a),asHtml=!1)):(b=c.getElementsByTagName("img"),1==b.length&&(b=b[0],a=b.getAttribute("src"),null!=a&&b.parentNode==c&&1==c.children.length&&("data:image/png;base64,"==a.substring(0,22)&&(b=this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(a=b)),mxUtils.setTextContent(c,a),asHtml=!1)));asHtml&&Graph.removePasteFormatting(c)}asHtml||c.setAttribute("data-type",
-"text/plain");return c};
-EditorUi.prototype.extractGraphModelFromEvent=function(a){var c=null,b=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?b=a.getData("Text"):(b=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==b||0==b.length)&&(b=a.getData("text/plain"))),null!=b&&(b=Graph.zapGremlins(mxUtils.trim(b)),a=this.extractGraphModelFromHtml(b),null!=a&&(b=a))));null!=b&&this.isCompatibleString(b)&&
-(c=b);return c};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
-EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var 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(b){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(a,c,b){var e=this.editor.graph;if(e.isEnabled()){e.getModel().beginUpdate();try{a()}catch(d){throw d;}finally{this.allowAnimation&&c&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(e),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=b&&b()})),a.startAnimation()):(e.getModel().endUpdate(),null!=b&&b())}}};
-EditorUi.prototype.showImageDialog=function(a,c,b,e){e=this.editor.graph.cellEditor;var d=e.saveSelection(),f=mxUtils.prompt(a,c);e.restoreSelection(d);if(null!=f&&0<f.length){var k=new Image;k.onload=function(){b(f,k.width,k.height)};k.onerror=function(){b(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=f}else b(null)};EditorUi.prototype.showLinkDialog=function(a,c,b){a=new LinkDialog(this,a,c,b);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.parseHtmlData=function(a){var b=null;if(null!=a&&0<a.length){var d="<meta "==a.substring(0,6),b=document.createElement("div");b.innerHTML=(d?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(a);asHtml=!0;a=b.getElementsByTagName("style");if(null!=a)for(;0<a.length;)a[0].parentNode.removeChild(a[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&&(a=null==b.firstChild.nextSibling.innerText?mxUtils.getTextContent(b.firstChild.nextSibling):b.firstChild.nextSibling.innerText,a==b.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(b,a),asHtml=!1));d=d&&null!=b.firstChild?b.firstChild.nextSibling:b.firstChild;null!=d&&null==d.nextSibling&&d.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==d.nodeName?(a=d.getAttribute("src"),
+null!=a&&("data:image/png;base64,"==a.substring(0,22)&&(d=this.extractGraphModelFromPng(a),null!=d&&0<d.length&&(a=d)),mxUtils.setTextContent(b,a),asHtml=!1)):(d=b.getElementsByTagName("img"),1==d.length&&(d=d[0],a=d.getAttribute("src"),null!=a&&d.parentNode==b&&1==b.children.length&&("data:image/png;base64,"==a.substring(0,22)&&(d=this.extractGraphModelFromPng(a),null!=d&&0<d.length&&(a=d)),mxUtils.setTextContent(b,a),asHtml=!1)));asHtml&&Graph.removePasteFormatting(b)}asHtml||b.setAttribute("data-type",
+"text/plain");return b};
+EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,d=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?d=a.getData("Text"):(d=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==d||0==d.length)&&(d=a.getData("text/plain"))),null!=d&&(d=Graph.zapGremlins(mxUtils.trim(d)),a=this.extractGraphModelFromHtml(d),null!=a&&(d=a))));null!=d&&this.isCompatibleString(d)&&
+(b=d);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
+EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
+"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(d){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
+EditorUi.prototype.executeLayout=function(a,b,d){var e=this.editor.graph;if(e.isEnabled()){e.getModel().beginUpdate();try{a()}catch(c){throw c;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(e),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=d&&d()})),a.startAnimation()):(e.getModel().endUpdate(),null!=d&&d())}}};
+EditorUi.prototype.showImageDialog=function(a,b,d,e){e=this.editor.graph.cellEditor;var c=e.saveSelection(),f=mxUtils.prompt(a,b);e.restoreSelection(c);if(null!=f&&0<f.length){var k=new Image;k.onload=function(){d(f,k.width,k.height)};k.onerror=function(){d(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=f}else d(null)};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d);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 b=mxUtils.prompt(mxResources.get("backgroundImage"),null!=c?c.src:"");null!=b&&0<b.length?(c=new Image,c.onload=function(){a(new mxImage(b,c.width,c.height),!1)},c.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},c.src=b):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,b){mxUtils.confirm(a)?null!=c&&c():null!=b&&b()};EditorUi.prototype.createOutline=function(a){var c=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){c.update(!1)});return c};
+EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var d=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=d&&0<d.length?(b=new Image,b.onload=function(){a(new mxImage(d,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=d):a(null)};
+EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,d){mxUtils.confirm(a)?null!=b&&b():null!=d&&d()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(a){function c(a,b,c){k.push(function(){if(!e.isSelectionEmpty()&&e.isEnabled())if(b=null!=b?b:1,c){e.getModel().beginUpdate();try{for(var d=e.getSelectionCells(),f=0;f<d.length;f++)if(e.getModel().isVertex(d[f])&&e.isCellResizable(d[f])){var g=e.getCellGeometry(d[f]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-b):38==a?g.height=Math.max(0,g.height-b):39==a?g.width+=b:40==a&&(g.height+=b),e.getModel().setGeometry(d[f],g))}}finally{e.getModel().endUpdate()}}else{var k=
+EditorUi.prototype.createKeyHandler=function(a){function b(a,b,c){k.push(function(){if(!e.isSelectionEmpty()&&e.isEnabled())if(b=null!=b?b:1,c){e.getModel().beginUpdate();try{for(var d=e.getSelectionCells(),f=0;f<d.length;f++)if(e.getModel().isVertex(d[f])&&e.isCellResizable(d[f])){var g=e.getCellGeometry(d[f]);null!=g&&(g=g.clone(),37==a?g.width=Math.max(0,g.width-b):38==a?g.height=Math.max(0,g.height-b):39==a?g.width+=b:40==a&&(g.height+=b),e.getModel().setGeometry(d[f],g))}}finally{e.getModel().endUpdate()}}else{var k=
e.getSelectionCell(),g=e.model.getParent(k),d=null;1==e.getSelectionCount()&&e.model.isVertex(k)&&null!=e.layoutManager&&!e.isCellLocked(k)&&(d=e.layoutManager.getLayout(g));if(null!=d&&d.constructor==mxStackLayout)d=g.getIndex(k),37==a||38==a?e.model.add(g,k,Math.max(0,d-1)):39!=a&&40!=a||e.model.add(g,k,Math.min(e.model.getChildCount(g),d+1));else{d=e.getMovableCells(e.getSelectionCells());k=[];for(f=0;f<d.length;f++)g=e.getCurrentCellStyle(d[f]),"1"==mxUtils.getValue(g,"part","0")?(g=e.model.getParent(d[f]),
-e.model.isVertex(g)&&0>mxUtils.indexOf(d,g)&&k.push(g)):k.push(d[f]);0<k.length&&(d=g=0,37==a?g=-b:38==a?d=-b:39==a?g=b:40==a&&(d=b),e.moveCells(k,g,d))}}});null!=h&&window.clearTimeout(h);h=window.setTimeout(function(){if(0<k.length){e.getModel().beginUpdate();try{for(var a=0;a<k.length;a++)k[a]();k=[]}finally{e.getModel().endUpdate()}}},200)}var b=this,e=this.editor.graph,d=new mxKeyHandler(e),f=d.isEventIgnored;d.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)&&f.apply(this,arguments)};d.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==b.dialogs||0==b.dialogs.length)};d.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var k=[],h=
-null,g={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=d.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(e.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var d=b.actions.get(b.altShiftActions[a.keyCode]);if(null!=d)return d.funct}if(null!=g[a.keyCode]&&!e.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(e.model.isVertex(e.getSelectionCell()))return function(){var c=
-e.connectVertex(e.getSelectionCell(),g[a.keyCode],e.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&e.model.isEdge(c[0])?e.setSelectionCell(e.model.getTerminal(c[0],!1)):e.setSelectionCell(c[c.length-1]),e.scrollCellToVisible(e.getSelectionCell()),null!=b.hoverIcons&&b.hoverIcons.update(e.view.getState(e.getSelectionCell())))}}else return this.isControlDown(a)?function(){c(a.keyCode,mxEvent.isShiftDown(a)?e.gridSize:null,!0)}:function(){c(a.keyCode,mxEvent.isShiftDown(a)?e.gridSize:null)}}return l.apply(this,
-arguments)};d.bindAction=mxUtils.bind(this,function(a,b,c,e){var f=this.actions.get(c);null!=f&&(c=function(){f.isEnabled()&&f.funct()},b?e?d.bindControlShiftKey(a,c):d.bindControlKey(a,c):e?d.bindShiftKey(a,c):d.bindKey(a,c))});var m=this,n=d.escape;d.escape=function(a){n.apply(this,arguments)};d.enter=function(){};d.bindControlShiftKey(36,function(){e.exitGroup()});d.bindControlShiftKey(35,function(){e.enterGroup()});d.bindShiftKey(36,function(){e.home()});d.bindKey(35,function(){e.refresh()});
-d.bindAction(107,!0,"zoomIn");d.bindAction(109,!0,"zoomOut");d.bindAction(80,!0,"print");d.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)d.bindControlKey(36,function(){e.isEnabled()&&e.foldCells(!0)}),d.bindControlKey(35,function(){e.isEnabled()&&e.foldCells(!1)}),d.bindControlKey(13,function(){m.ctrlEnter()}),d.bindAction(8,!1,"delete"),d.bindAction(8,!0,"deleteAll"),d.bindAction(8,!1,"deleteLabels",!0),d.bindAction(46,!1,"delete"),d.bindAction(46,!0,"deleteAll"),
-d.bindAction(46,!1,"deleteLabels",!0),d.bindAction(36,!1,"resetView"),d.bindAction(72,!0,"fitWindow",!0),d.bindAction(74,!0,"fitPage"),d.bindAction(74,!0,"fitTwoPages",!0),d.bindAction(48,!0,"customZoom"),d.bindAction(82,!0,"turn"),d.bindAction(82,!0,"clearDefaultStyle",!0),d.bindAction(83,!0,"save"),d.bindAction(83,!0,"saveAs",!0),d.bindAction(65,!0,"selectAll"),d.bindAction(65,!0,"selectNone",!0),d.bindAction(73,!0,"selectVertices",!0),d.bindAction(69,!0,"selectEdges",!0),d.bindAction(69,!0,"editStyle"),
-d.bindAction(66,!0,"bold"),d.bindAction(66,!0,"toBack",!0),d.bindAction(70,!0,"toFront",!0),d.bindAction(68,!0,"duplicate"),d.bindAction(68,!0,"setAsDefaultStyle",!0),d.bindAction(90,!0,"undo"),d.bindAction(89,!0,"autosize",!0),d.bindAction(88,!0,"cut"),d.bindAction(67,!0,"copy"),d.bindAction(86,!0,"paste"),d.bindAction(71,!0,"group"),d.bindAction(77,!0,"editData"),d.bindAction(71,!0,"grid",!0),d.bindAction(73,!0,"italic"),d.bindAction(76,!0,"lockUnlock"),d.bindAction(76,!0,"layers",!0),d.bindAction(80,
-!0,"formatPanel",!0),d.bindAction(85,!0,"underline"),d.bindAction(85,!0,"ungroup",!0),d.bindAction(190,!0,"superscript"),d.bindAction(188,!0,"subscript"),d.bindAction(13,!1,"keyPressEnter"),d.bindKey(113,function(){e.isEnabled()&&e.startEditingAtCell()});mxClient.IS_WIN?d.bindAction(89,!0,"redo"):d.bindAction(90,!0,"redo",!0);return d};
+e.model.isVertex(g)&&0>mxUtils.indexOf(d,g)&&k.push(g)):k.push(d[f]);0<k.length&&(d=g=0,37==a?g=-b:38==a?d=-b:39==a?g=b:40==a&&(d=b),e.moveCells(k,g,d))}}});null!=h&&window.clearTimeout(h);h=window.setTimeout(function(){if(0<k.length){e.getModel().beginUpdate();try{for(var a=0;a<k.length;a++)k[a]();k=[]}finally{e.getModel().endUpdate()}}},200)}var d=this,e=this.editor.graph,c=new mxKeyHandler(e),f=c.isEventIgnored;c.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)&&f.apply(this,arguments)};c.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==d.dialogs||0==d.dialogs.length)};c.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var k=[],h=
+null,g={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=c.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(e.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var c=d.actions.get(d.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(null!=g[a.keyCode]&&!e.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(e.model.isVertex(e.getSelectionCell()))return function(){var b=
+e.connectVertex(e.getSelectionCell(),g[a.keyCode],e.defaultEdgeLength,a,!0);null!=b&&0<b.length&&(1==b.length&&e.model.isEdge(b[0])?e.setSelectionCell(e.model.getTerminal(b[0],!1)):e.setSelectionCell(b[b.length-1]),e.scrollCellToVisible(e.getSelectionCell()),null!=d.hoverIcons&&d.hoverIcons.update(e.view.getState(e.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?e.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?e.gridSize:null)}}return l.apply(this,
+arguments)};c.bindAction=mxUtils.bind(this,function(a,b,d,e){var f=this.actions.get(d);null!=f&&(d=function(){f.isEnabled()&&f.funct()},b?e?c.bindControlShiftKey(a,d):c.bindControlKey(a,d):e?c.bindShiftKey(a,d):c.bindKey(a,d))});var m=this,n=c.escape;c.escape=function(a){n.apply(this,arguments)};c.enter=function(){};c.bindControlShiftKey(36,function(){e.exitGroup()});c.bindControlShiftKey(35,function(){e.enterGroup()});c.bindShiftKey(36,function(){e.home()});c.bindKey(35,function(){e.refresh()});
+c.bindAction(107,!0,"zoomIn");c.bindAction(109,!0,"zoomOut");c.bindAction(80,!0,"print");c.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)c.bindControlKey(36,function(){e.isEnabled()&&e.foldCells(!0)}),c.bindControlKey(35,function(){e.isEnabled()&&e.foldCells(!1)}),c.bindControlKey(13,function(){m.ctrlEnter()}),c.bindAction(8,!1,"delete"),c.bindAction(8,!0,"deleteAll"),c.bindAction(8,!1,"deleteLabels",!0),c.bindAction(46,!1,"delete"),c.bindAction(46,!0,"deleteAll"),
+c.bindAction(46,!1,"deleteLabels",!0),c.bindAction(36,!1,"resetView"),c.bindAction(72,!0,"fitWindow",!0),c.bindAction(74,!0,"fitPage"),c.bindAction(74,!0,"fitTwoPages",!0),c.bindAction(48,!0,"customZoom"),c.bindAction(82,!0,"turn"),c.bindAction(82,!0,"clearDefaultStyle",!0),c.bindAction(83,!0,"save"),c.bindAction(83,!0,"saveAs",!0),c.bindAction(65,!0,"selectAll"),c.bindAction(65,!0,"selectNone",!0),c.bindAction(73,!0,"selectVertices",!0),c.bindAction(69,!0,"selectEdges",!0),c.bindAction(69,!0,"editStyle"),
+c.bindAction(66,!0,"bold"),c.bindAction(66,!0,"toBack",!0),c.bindAction(70,!0,"toFront",!0),c.bindAction(68,!0,"duplicate"),c.bindAction(68,!0,"setAsDefaultStyle",!0),c.bindAction(90,!0,"undo"),c.bindAction(89,!0,"autosize",!0),c.bindAction(88,!0,"cut"),c.bindAction(67,!0,"copy"),c.bindAction(86,!0,"paste"),c.bindAction(71,!0,"group"),c.bindAction(77,!0,"editData"),c.bindAction(71,!0,"grid",!0),c.bindAction(73,!0,"italic"),c.bindAction(76,!0,"lockUnlock"),c.bindAction(76,!0,"layers",!0),c.bindAction(80,
+!0,"formatPanel",!0),c.bindAction(85,!0,"underline"),c.bindAction(85,!0,"ungroup",!0),c.bindAction(190,!0,"superscript"),c.bindAction(188,!0,"subscript"),c.bindAction(13,!1,"keyPressEnter"),c.bindKey(113,function(){e.isEnabled()&&e.startEditingAtCell()});mxClient.IS_WIN?c.bindAction(89,!0,"redo"):c.bindAction(90,!0,"redo",!0);return c};
EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&
(mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,
-"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var c=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<c.length;a++)null!=c[a]&&null!=c[a].parentNode&&c[a].parentNode.removeChild(c[a])};function Sidebar(a,c){this.editorUi=a;this.container=c;this.palettes={};this.taglist={};this.lastCreated=0;this.showTooltips=!0;this.graph=a.createTemporaryGraph(this.editorUi.editor.graph.getStylesheet());this.graph.cellRenderer.minSvgStrokeWidth=this.minThumbStrokeWidth;this.graph.cellRenderer.antiAlias=this.thumbAntiAlias;this.graph.container.style.visibility="hidden";this.graph.foldingEnabled=!1;document.body.appendChild(this.graph.container);this.pointerUpHandler=mxUtils.bind(this,function(){if(null==
+"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};function Sidebar(a,b){this.editorUi=a;this.container=b;this.palettes={};this.taglist={};this.lastCreated=0;this.showTooltips=!0;this.graph=a.createTemporaryGraph(this.editorUi.editor.graph.getStylesheet());this.graph.cellRenderer.minSvgStrokeWidth=this.minThumbStrokeWidth;this.graph.cellRenderer.antiAlias=this.thumbAntiAlias;this.graph.container.style.visibility="hidden";this.graph.foldingEnabled=!1;document.body.appendChild(this.graph.container);this.pointerUpHandler=mxUtils.bind(this,function(){if(null==
this.tooltipCloseImage||"none"==this.tooltipCloseImage.style.display)this.showTooltips=!0,this.hideTooltip()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler);this.pointerDownHandler=mxUtils.bind(this,function(){if(null==this.tooltipCloseImage||"none"==this.tooltipCloseImage.style.display)this.showTooltips=!1,this.hideTooltip()});mxEvent.addListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler);this.pointerMoveHandler=
mxUtils.bind(this,function(a){if(300<Date.now()-this.lastCreated&&(null==this.tooltipCloseImage||"none"==this.tooltipCloseImage.style.display)){for(a=mxEvent.getSource(a);null!=a;){if(a==this.currentElt)return;a=a.parentNode}this.hideTooltip()}});mxEvent.addListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler);this.pointerOutHandler=mxUtils.bind(this,function(a){null==a.toElement&&null==a.relatedTarget&&this.hideTooltip()});mxEvent.addListener(document,mxClient.IS_POINTER?
-"pointerout":"mouseout",this.pointerOutHandler);mxEvent.addListener(c,"scroll",mxUtils.bind(this,function(){this.showTooltips=!0;this.hideTooltip()}));this.init()}
+"pointerout":"mouseout",this.pointerOutHandler);mxEvent.addListener(b,"scroll",mxUtils.bind(this,function(){this.showTooltips=!0;this.hideTooltip()}));this.init()}
Sidebar.prototype.init=function(){var a=STENCIL_PATH;this.addSearchPalette(!0);this.addGeneralPalette(!0);this.addMiscPalette(!1);this.addAdvancedPalette(!1);this.addBasicPalette(a);this.setCurrentSearchEntryLibrary("arrows");this.addStencilPalette("arrows",mxResources.get("arrows"),a+"/arrows.xml",";whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#000000;strokeWidth=2");this.setCurrentSearchEntryLibrary();this.addUmlPalette(!1);this.addBpmnPalette(a,!1);this.setCurrentSearchEntryLibrary("flowchart");
this.addStencilPalette("flowchart","Flowchart",a+"/flowchart.xml",";whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#000000;strokeWidth=2");this.setCurrentSearchEntryLibrary();this.setCurrentSearchEntryLibrary("clipart");this.addImagePalette("clipart",mxResources.get("clipart"),a+"/clipart/","_128x128.png","Earth_globe Empty_Folder Full_Folder Gear Lock Software Virus Email Database Router_Icon iPad iMac Laptop MacBook Monitor_Tower Printer Server_Tower Workstation Firewall_02 Wireless_Router_N Credit_Card Piggy_Bank Graph Safe Shopping_Cart Suit1 Suit2 Suit3 Pilot1 Worker1 Soldier1 Doctor1 Tech1 Security1 Telesales1".split(" "),
null,{Wireless_Router_N:"wireless router switch wap wifi access point wlan",Router_Icon:"router switch"});this.setCurrentSearchEntryLibrary()};
@@ -2349,35 +2349,35 @@ Sidebar.prototype.searchImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
"/search.png";Sidebar.prototype.enableTooltips=!0;Sidebar.prototype.tooltipBorder=16;Sidebar.prototype.tooltipDelay=300;Sidebar.prototype.dropTargetDelay=200;Sidebar.prototype.gearImage=STENCIL_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.thumbWidth=42;Sidebar.prototype.thumbHeight=42;Sidebar.prototype.minThumbStrokeWidth=1;Sidebar.prototype.thumbAntiAlias=!1;Sidebar.prototype.thumbPadding=5<=document.documentMode?2:3;Sidebar.prototype.thumbBorder=2;
"large"!=urlParams["sidebar-entries"]&&(Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=1,Sidebar.prototype.thumbWidth=32,Sidebar.prototype.thumbHeight=30,Sidebar.prototype.minThumbStrokeWidth=1.3,Sidebar.prototype.thumbAntiAlias=!0);Sidebar.prototype.sidebarTitleSize=9;Sidebar.prototype.sidebarTitles=!1;Sidebar.prototype.tooltipTitles=!0;Sidebar.prototype.maxTooltipWidth=400;Sidebar.prototype.maxTooltipHeight=400;Sidebar.prototype.addStencilsToIndex=!0;
Sidebar.prototype.defaultImageWidth=80;Sidebar.prototype.defaultImageHeight=80;Sidebar.prototype.tooltipMouseDown=null;
-Sidebar.prototype.getTooltipOffset=function(a,c){var b=c.height+2*this.tooltipBorder;return new mxPoint(this.container.offsetWidth+this.editorUi.splitSize+10+this.editorUi.container.offsetLeft,Math.min(Math.max(document.body.clientHeight||0,document.documentElement.clientHeight)-b-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-b/2+16)))};
-Sidebar.prototype.createTooltip=function(a,c,b,e,d,f,k,h,g,l){this.tooltipMouseDown=g;null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.userSelect="none",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),mxEvent.addMouseWheelListener(mxUtils.bind(this,function(a){this.hideTooltip()}),this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
+Sidebar.prototype.getTooltipOffset=function(a,b){var d=b.height+2*this.tooltipBorder;return new mxPoint(this.container.offsetWidth+this.editorUi.splitSize+10+this.editorUi.container.offsetLeft,Math.min(Math.max(document.body.clientHeight||0,document.documentElement.clientHeight)-d-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-d/2+16)))};
+Sidebar.prototype.createTooltip=function(a,b,d,e,c,f,k,h,g,l){this.tooltipMouseDown=g;null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.userSelect="none",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),mxEvent.addMouseWheelListener(mxUtils.bind(this,function(a){this.hideTooltip()}),this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setPanning(!1),this.graph2.setEnabled(!1),this.graph2.openLink=mxUtils.bind(this,function(){this.hideTooltip()}),mxEvent.addGestureListeners(this.tooltip,mxUtils.bind(this,function(a){null!=this.tooltipMouseDown&&this.tooltipMouseDown(a);window.setTimeout(mxUtils.bind(this,function(){null!=this.tooltipCloseImage&&
"none"!=this.tooltipCloseImage.style.display||this.hideTooltip()}),0)}),null,mxUtils.bind(this,function(a){this.hideTooltip()})),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"),g=document.createElement("img"),g.setAttribute("src",Dialog.prototype.closeImage),g.setAttribute("title",mxResources.get("close")),g.style.position="absolute",g.style.cursor="default",g.style.padding="8px",g.style.right="2px",g.style.top="2px",this.tooltip.appendChild(g),this.tooltipCloseImage=g,mxEvent.addListener(g,
-"click",mxUtils.bind(this,function(a){this.hideTooltip();mxEvent.consume(a)})));this.tooltipCloseImage.style.display=l?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=!h&&(b>this.maxTooltipWidth||e>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/b,this.maxTooltipHeight/e))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==f||f;f=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;
-c=this.graph2.cloneCells(c);this.editorUi.insertHandler(c,null,this.graph2.model,null,null,!0);this.graph2.addCells(c);mxClient.NO_FO=f;c=this.graph2.getGraphBounds();h&&0<b&&0<e&&(c.width>b||c.height>e)?(b=Math.round(100*Math.min(b/c.width,e/c.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/c.width,this.maxTooltipHeight/c.height))/100),c=this.graph2.getGraphBounds()):(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+b+")",
-this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",c.width*=b,c.height*=b)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");b=c.width+2*this.tooltipBorder+4;e=c.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=b+"px";h=b;this.tooltipTitles&&null!=d&&0<d.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign=
-"center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,d),h=Math.min(this.maxTooltipWidth,Math.max(b,this.tooltipTitle.scrollWidth+4)),d=this.tooltipTitle.offsetHeight+10,e+=d,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=
-2-d+"px":(e-=6,this.tooltipTitle.style.top=e-d+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");h>b&&(this.tooltip.style.width=h+"px");this.tooltip.style.height=e+"px";d=-Math.round(c.x-this.tooltipBorder)+(h>b?(h-b)/2:0);b=-Math.round(c.y-this.tooltipBorder);k=null!=k?k:this.getTooltipOffset(a,c);a=k.x;k=k.y;mxClient.IS_SVG?0!=d||0!=b?this.graph2.view.canvas.setAttribute("transform","translate("+d+","+b+")"):this.graph2.view.canvas.removeAttribute("transform"):
-(this.graph2.view.drawPane.style.left=d+"px",this.graph2.view.drawPane.style.top=b+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=a+"px";this.tooltip.style.top=k+"px";mxUtils.fit(this.tooltip);this.lastCreated=Date.now()};
-Sidebar.prototype.showTooltip=function(a,c,b,e,d,f){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var k=mxUtils.bind(this,function(){this.createTooltip(a,c,b,e,d,f)});null!=this.tooltip&&"none"!=this.tooltip.style.display?k():this.thread=window.setTimeout(k,this.tooltipDelay);this.currentElt=a}};
-Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,c,b,e,d){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(d,c,b,e)}))};
-Sidebar.prototype.addEntries=function(a){for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var b=a.data,c=null!=a.title?a.title:"";null!=a.tags&&(c+=" "+a.tags);null!=b&&0<c.length?this.addEntry(c,mxUtils.bind(this,function(){b=this.editorUi.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&0<c.length&&this.addEntry(c,
-mxUtils.bind(this,function(){var b=this.editorUi.stringToCells(Graph.decompress(a.xml));return this.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(a[c])};Sidebar.prototype.setCurrentSearchEntryLibrary=function(a,c){this.currentSearchEntryLibrary=null!=a?{id:a,lib:c}:null};
-Sidebar.prototype.addEntry=function(a,c){if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(c.parentLibraries=[this.currentSearchEntryLibrary]);for(var b=a.toLowerCase().replace(/[\/\,\(\)]/g," ").split(" "),e=[],d={},f=0;f<b.length;f++){null==d[b[f]]&&(d[b[f]]=!0,e.push(b[f]));var k=b[f].replace(/\.*\d*$/,"");k!=b[f]&&null==d[k]&&(d[k]=!0,e.push(k))}for(f=0;f<e.length;f++)this.addEntryForTag(e[f],c)}return c};
-Sidebar.prototype.addEntryForTag=function(a,c){if(null!=a&&1<a.length){var b=this.taglist[a];"object"!==typeof b&&(b={entries:[]},this.taglist[a]=b);b.entries.push(c)}};
-Sidebar.prototype.searchEntries=function(a,c,b,e,d){if(null!=this.taglist&&null!=a){var f=a.toLowerCase().split(" ");d=new mxDictionary;var k=(b+1)*c;a=[];for(var h=0,g=0;g<f.length;g++)if(0<f[g].length){var l=this.taglist[f[g]],m=new mxDictionary;if(null!=l){var n=l.entries;a=[];for(var p=0;p<n.length;p++)if(l=n[p],0==h==(null==d.get(l))&&(m.put(l,l),a.push(l),g==f.length-1&&a.length==k)){e(a.slice(b*c,k),k,!0,f);return}}else a=[];d=m;h++}d=a.length;e(a.slice(b*c,(b+1)*c),d,!1,f)}else e([],null,
-null,f)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var c=[],b={},e=0;e<a.length;e++)null==b[a[e]]&&(b[a[e]]="1",c.push(a[e]));return c.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,c){var b=a.clone();null!=c&&(b.value=c);return b};Sidebar.prototype.showPopupMenuForEntry=function(a,c,b){};
-Sidebar.prototype.addSearchPalette=function(a){var c=document.createElement("div");c.style.visibility="hidden";this.container.appendChild(c);var b=document.createElement("div");b.className="geSidebar";b.style.boxSizing="border-box";b.style.overflow="hidden";b.style.width="100%";b.style.padding="8px";b.style.paddingTop="14px";b.style.paddingBottom="0px";a||(b.style.display="none");var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.paddingBottom="8px";
-e.style.cursor="default";var d=document.createElement("input");d.setAttribute("placeholder",mxResources.get("searchShapes"));d.setAttribute("type","text");d.style.fontSize="12px";d.style.overflow="hidden";d.style.boxSizing="border-box";d.style.border="solid 1px #d5d5d5";d.style.borderRadius="4px";d.style.width="100%";d.style.outline="none";d.style.padding="6px";d.style.paddingRight="20px";e.appendChild(d);var f=document.createElement("img");f.setAttribute("src",Sidebar.prototype.searchImage);f.setAttribute("title",
-mxResources.get("search"));f.style.position="relative";f.style.left="-18px";f.style.top="1px";f.style.background="url('"+this.editorUi.editor.transparentImage+"')";var k;e.appendChild(f);b.appendChild(e);var h=document.createElement("center"),g=mxUtils.button(mxResources.get("moreResults"),function(){k()});g.style.display="none";g.style.lineHeight="normal";g.style.fontSize="12px";g.style.padding="6px 12px 6px 12px";g.style.marginTop="4px";g.style.marginBottom="8px";h.style.paddingTop="4px";h.style.paddingBottom=
-"4px";h.appendChild(g);b.appendChild(h);var l="",m=!1,n=!1,p=0,q={},t=12,v=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=b.firstChild;null!=a;){var c=a.nextSibling;a!=e&&a!=h&&a.parentNode.removeChild(a);a=c}});mxEvent.addListener(f,"click",function(){f.getAttribute("src")==Dialog.prototype.closeImage&&(f.setAttribute("src",Sidebar.prototype.searchImage),f.setAttribute("title",mxResources.get("search")),g.style.display="none",l=d.value="",v());d.focus()});k=mxUtils.bind(this,
-function(){t=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=d.value){if(null!=h.parentNode&&(l!=d.value&&(v(),l=d.value,q={},n=!1,p=0),!m&&!n)){g.setAttribute("disabled","true");g.style.display="";g.style.cursor="wait";g.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,t,p,mxUtils.bind(this,function(c,d,e,f){if(this.currentSearch==a){c=null!=c?c:[];m=!1;p++;this.insertSearchHint(b,l,t,p,c,d,e,f);
-0==c.length&&1==p&&(l="");null!=h.parentNode&&h.parentNode.removeChild(h);for(d=0;d<c.length;d++)mxUtils.bind(this,function(a){try{var c=a();null==q[c.innerHTML]?(q[c.innerHTML]=null!=a.parentLibraries?a.parentLibraries.slice():[],b.appendChild(c)):null!=a.parentLibraries&&(q[c.innerHTML]=q[c.innerHTML].concat(a.parentLibraries));mxEvent.addGestureListeners(c,null,null,mxUtils.bind(this,function(a){var b=q[c.innerHTML];mxEvent.isPopupTrigger(a)&&this.showPopupMenuForEntry(c,b,a)}));mxEvent.disableContextMenu(c)}catch(F){}})(c[d]);
-e?(g.removeAttribute("disabled"),g.innerHTML=mxResources.get("moreResults")):(g.innerHTML=mxResources.get("reset"),g.style.display="none",n=!0);g.style.cursor="";b.appendChild(h)}}),mxUtils.bind(this,function(){g.style.cursor=""}))}}else v(),l=d.value="",q={},g.style.display="none",n=!1,d.focus()});this.searchShapes=function(a){d.value=a;k()};mxEvent.addListener(d,"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(k(),mxEvent.consume(a))}));mxEvent.addListener(d,"keyup",mxUtils.bind(this,function(a){""==
-d.value?(f.setAttribute("src",Sidebar.prototype.searchImage),f.setAttribute("title",mxResources.get("search"))):(f.setAttribute("src",Dialog.prototype.closeImage),f.setAttribute("title",mxResources.get("reset")));""==d.value?(n=!0,g.style.display="none"):d.value!=l?(g.style.display="none",n=!1):m||(g.style.display=n?"none":"")}));mxEvent.addListener(d,"mousedown",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});mxEvent.addListener(d,"selectstart",function(a){a.stopPropagation&&
-a.stopPropagation();a.cancelBubble=!0});a=document.createElement("div");a.appendChild(b);this.container.appendChild(a);this.palettes.search=[c,a]};
-Sidebar.prototype.insertSearchHint=function(a,c,b,e,d,f,k,h){0==d.length&&1==e&&(b=document.createElement("div"),b.className="geTitle",b.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(b,mxResources.get("noResultsFor",[c])),a.appendChild(b))};
-Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var c=this,b=parseInt(this.editorUi.editor.graph.defaultVertexStyle.fontSize),b=isNaN(b)?"":"fontSize="+Math.min(16,b)+";",e=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;"+b);e.vertex=!0;b=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",
+"click",mxUtils.bind(this,function(a){this.hideTooltip();mxEvent.consume(a)})));this.tooltipCloseImage.style.display=l?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=!h&&(d>this.maxTooltipWidth||e>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/d,this.maxTooltipHeight/e))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==f||f;f=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;
+b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,null,null,!0);this.graph2.addCells(b);mxClient.NO_FO=f;b=this.graph2.getGraphBounds();h&&0<d&&0<e&&(b.width>d||b.height>e)?(d=Math.round(100*Math.min(d/b.width,e/b.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/b.width,this.maxTooltipHeight/b.height))/100),b=this.graph2.getGraphBounds()):(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+d+")",
+this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",b.width*=d,b.height*=d)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");d=b.width+2*this.tooltipBorder+4;e=b.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=d+"px";h=d;this.tooltipTitles&&null!=c&&0<c.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign=
+"center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,c),h=Math.min(this.maxTooltipWidth,Math.max(d,this.tooltipTitle.scrollWidth+4)),c=this.tooltipTitle.offsetHeight+10,e+=c,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=
+2-c+"px":(e-=6,this.tooltipTitle.style.top=e-c+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");h>d&&(this.tooltip.style.width=h+"px");this.tooltip.style.height=e+"px";c=-Math.round(b.x-this.tooltipBorder)+(h>d?(h-d)/2:0);d=-Math.round(b.y-this.tooltipBorder);k=null!=k?k:this.getTooltipOffset(a,b);a=k.x;k=k.y;mxClient.IS_SVG?0!=c||0!=d?this.graph2.view.canvas.setAttribute("transform","translate("+c+","+d+")"):this.graph2.view.canvas.removeAttribute("transform"):
+(this.graph2.view.drawPane.style.left=c+"px",this.graph2.view.drawPane.style.top=d+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=a+"px";this.tooltip.style.top=k+"px";mxUtils.fit(this.tooltip);this.lastCreated=Date.now()};
+Sidebar.prototype.showTooltip=function(a,b,d,e,c,f){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var k=mxUtils.bind(this,function(){this.createTooltip(a,b,d,e,c,f)});null!=this.tooltip&&"none"!=this.tooltip.style.display?k():this.thread=window.setTimeout(k,this.tooltipDelay);this.currentElt=a}};
+Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,d,e,c){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(c,b,d,e)}))};
+Sidebar.prototype.addEntries=function(a){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=a.data,c=null!=a.title?a.title:"";null!=a.tags&&(c+=" "+a.tags);null!=b&&0<c.length?this.addEntry(c,mxUtils.bind(this,function(){b=this.editorUi.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&0<c.length&&this.addEntry(c,
+mxUtils.bind(this,function(){var b=this.editorUi.stringToCells(Graph.decompress(a.xml));return this.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(a[b])};Sidebar.prototype.setCurrentSearchEntryLibrary=function(a,b){this.currentSearchEntryLibrary=null!=a?{id:a,lib:b}:null};
+Sidebar.prototype.addEntry=function(a,b){if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);for(var d=a.toLowerCase().replace(/[\/\,\(\)]/g," ").split(" "),e=[],c={},f=0;f<d.length;f++){null==c[d[f]]&&(c[d[f]]=!0,e.push(d[f]));var k=d[f].replace(/\.*\d*$/,"");k!=d[f]&&null==c[k]&&(c[k]=!0,e.push(k))}for(f=0;f<e.length;f++)this.addEntryForTag(e[f],b)}return b};
+Sidebar.prototype.addEntryForTag=function(a,b){if(null!=a&&1<a.length){var d=this.taglist[a];"object"!==typeof d&&(d={entries:[]},this.taglist[a]=d);d.entries.push(b)}};
+Sidebar.prototype.searchEntries=function(a,b,d,e,c){if(null!=this.taglist&&null!=a){var f=a.toLowerCase().split(" ");c=new mxDictionary;var k=(d+1)*b;a=[];for(var h=0,g=0;g<f.length;g++)if(0<f[g].length){var l=this.taglist[f[g]],m=new mxDictionary;if(null!=l){var n=l.entries;a=[];for(var p=0;p<n.length;p++)if(l=n[p],0==h==(null==c.get(l))&&(m.put(l,l),a.push(l),g==f.length-1&&a.length==k)){e(a.slice(d*b,k),k,!0,f);return}}else a=[];c=m;h++}c=a.length;e(a.slice(d*b,(d+1)*b),c,!1,f)}else e([],null,
+null,f)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],d={},e=0;e<a.length;e++)null==d[a[e]]&&(d[a[e]]="1",b.push(a[e]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){var d=a.clone();null!=b&&(d.value=b);return d};Sidebar.prototype.showPopupMenuForEntry=function(a,b,d){};
+Sidebar.prototype.addSearchPalette=function(a){var b=document.createElement("div");b.style.visibility="hidden";this.container.appendChild(b);var d=document.createElement("div");d.className="geSidebar";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.width="100%";d.style.padding="8px";d.style.paddingTop="14px";d.style.paddingBottom="0px";a||(d.style.display="none");var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.paddingBottom="8px";
+e.style.cursor="default";var c=document.createElement("input");c.setAttribute("placeholder",mxResources.get("searchShapes"));c.setAttribute("type","text");c.style.fontSize="12px";c.style.overflow="hidden";c.style.boxSizing="border-box";c.style.border="solid 1px #d5d5d5";c.style.borderRadius="4px";c.style.width="100%";c.style.outline="none";c.style.padding="6px";c.style.paddingRight="20px";e.appendChild(c);var f=document.createElement("img");f.setAttribute("src",Sidebar.prototype.searchImage);f.setAttribute("title",
+mxResources.get("search"));f.style.position="relative";f.style.left="-18px";f.style.top="1px";f.style.background="url('"+this.editorUi.editor.transparentImage+"')";var k;e.appendChild(f);d.appendChild(e);var h=document.createElement("center"),g=mxUtils.button(mxResources.get("moreResults"),function(){k()});g.style.display="none";g.style.lineHeight="normal";g.style.fontSize="12px";g.style.padding="6px 12px 6px 12px";g.style.marginTop="4px";g.style.marginBottom="8px";h.style.paddingTop="4px";h.style.paddingBottom=
+"4px";h.appendChild(g);d.appendChild(h);var l="",m=!1,n=!1,p=0,q={},u=12,v=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var a=d.firstChild;null!=a;){var b=a.nextSibling;a!=e&&a!=h&&a.parentNode.removeChild(a);a=b}});mxEvent.addListener(f,"click",function(){f.getAttribute("src")==Dialog.prototype.closeImage&&(f.setAttribute("src",Sidebar.prototype.searchImage),f.setAttribute("title",mxResources.get("search")),g.style.display="none",l=c.value="",v());c.focus()});k=mxUtils.bind(this,
+function(){u=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=c.value){if(null!=h.parentNode&&(l!=c.value&&(v(),l=c.value,q={},n=!1,p=0),!m&&!n)){g.setAttribute("disabled","true");g.style.display="";g.style.cursor="wait";g.innerHTML=mxResources.get("loading")+"...";m=!0;var a={};this.currentSearch=a;this.searchEntries(l,u,p,mxUtils.bind(this,function(b,c,e,f){if(this.currentSearch==a){b=null!=b?b:[];m=!1;p++;this.insertSearchHint(d,l,u,p,b,c,e,f);
+0==b.length&&1==p&&(l="");null!=h.parentNode&&h.parentNode.removeChild(h);for(c=0;c<b.length;c++)mxUtils.bind(this,function(a){try{var b=a();null==q[b.innerHTML]?(q[b.innerHTML]=null!=a.parentLibraries?a.parentLibraries.slice():[],d.appendChild(b)):null!=a.parentLibraries&&(q[b.innerHTML]=q[b.innerHTML].concat(a.parentLibraries));mxEvent.addGestureListeners(b,null,null,mxUtils.bind(this,function(a){var c=q[b.innerHTML];mxEvent.isPopupTrigger(a)&&this.showPopupMenuForEntry(b,c,a)}));mxEvent.disableContextMenu(b)}catch(F){}})(b[c]);
+e?(g.removeAttribute("disabled"),g.innerHTML=mxResources.get("moreResults")):(g.innerHTML=mxResources.get("reset"),g.style.display="none",n=!0);g.style.cursor="";d.appendChild(h)}}),mxUtils.bind(this,function(){g.style.cursor=""}))}}else v(),l=c.value="",q={},g.style.display="none",n=!1,c.focus()});this.searchShapes=function(a){c.value=a;k()};mxEvent.addListener(c,"keydown",mxUtils.bind(this,function(a){13==a.keyCode&&(k(),mxEvent.consume(a))}));mxEvent.addListener(c,"keyup",mxUtils.bind(this,function(a){""==
+c.value?(f.setAttribute("src",Sidebar.prototype.searchImage),f.setAttribute("title",mxResources.get("search"))):(f.setAttribute("src",Dialog.prototype.closeImage),f.setAttribute("title",mxResources.get("reset")));""==c.value?(n=!0,g.style.display="none"):c.value!=l?(g.style.display="none",n=!1):m||(g.style.display=n?"none":"")}));mxEvent.addListener(c,"mousedown",function(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0});mxEvent.addListener(c,"selectstart",function(a){a.stopPropagation&&
+a.stopPropagation();a.cancelBubble=!0});a=document.createElement("div");a.appendChild(d);this.container.appendChild(a);this.palettes.search=[b,a]};
+Sidebar.prototype.insertSearchHint=function(a,b,d,e,c,f,k,h){0==c.length&&1==e&&(d=document.createElement("div"),d.className="geTitle",d.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(d,mxResources.get("noResultsFor",[b])),a.appendChild(d))};
+Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var b=this,d=parseInt(this.editorUi.editor.graph.defaultVertexStyle.fontSize),d=isNaN(d)?"":"fontSize="+Math.min(16,d)+";",e=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;"+d);e.vertex=!0;d=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",
120,60,"","Rectangle",null,null,"rect rectangle box"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;",120,60,"","Rounded Rectangle",null,null,"rounded rect rectangle box"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text","Text",null,null,"text textbox textarea label"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;",
190,120,"<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>","Textbox",null,null,"text textbox textarea"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",120,80,"","Ellipse",null,null,"oval ellipse state"),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Square",null,null,"square"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;aspect=fixed;",
80,80,"","Circle",null,null,"circle"),this.createVertexTemplateEntry("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;",120,60,"","Process",null,null,"process task"),this.createVertexTemplateEntry("rhombus;whiteSpace=wrap;html=1;",80,80,"","Diamond",null,null,"diamond rhombus if condition decision conditional question test"),this.createVertexTemplateEntry("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60,"","Parallelogram"),this.createVertexTemplateEntry("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",
@@ -2386,7 +2386,7 @@ Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrar
120,60,"","Trapezoid"),this.createVertexTemplateEntry("shape=tape;whiteSpace=wrap;html=1;",120,100,"","Tape"),this.createVertexTemplateEntry("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;",80,100,"","Note"),this.createVertexTemplateEntry("shape=card;whiteSpace=wrap;html=1;",80,100,"","Card"),this.createVertexTemplateEntry("shape=callout;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;",120,80,"","Callout",null,null,"bubble chat thought speech message"),this.createVertexTemplateEntry("shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;",
30,60,"Actor","Actor",!1,null,"user person human stickman"),this.createVertexTemplateEntry("shape=xor;whiteSpace=wrap;html=1;",60,80,"","Or",null,null,"logic or"),this.createVertexTemplateEntry("shape=or;whiteSpace=wrap;html=1;",60,80,"","And",null,null,"logic and"),this.createVertexTemplateEntry("shape=dataStorage;whiteSpace=wrap;html=1;fixedSize=1;",100,80,"","Data Storage"),this.createVertexTemplateEntry("swimlane;startSize=0;",200,200,"","Container",null,null,"container swimlane lane pool group"),
this.createVertexTemplateEntry("swimlane;",200,200,"Vertical Container","Container",null,null,"container swimlane lane pool group"),this.createVertexTemplateEntry("swimlane;horizontal=0;",200,200,"Horizontal Container","Horizontal Container",null,null,"container swimlane lane pool group"),this.addEntry("list group erd table",function(){var a=new mxCell("List",new mxGeometry(0,0,140,120),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
-a.vertex=!0;a.insert(c.cloneCell(e,"Item 1"));a.insert(c.cloneCell(e,"Item 2"));a.insert(c.cloneCell(e,"Item 3"));return c.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return c.createVertexTemplateFromCells([c.cloneCell(e,"List Item")],e.geometry.width,e.geometry.height,"List Item")}),this.addEntry("curve",mxUtils.bind(this,function(){var a=new mxCell("",new mxGeometry(0,0,50,50),"curved=1;endArrow=classic;html=1;");
+a.vertex=!0;a.insert(b.cloneCell(e,"Item 1"));a.insert(b.cloneCell(e,"Item 2"));a.insert(b.cloneCell(e,"Item 3"));return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return b.createVertexTemplateFromCells([b.cloneCell(e,"List Item")],e.geometry.width,e.geometry.height,"List Item")}),this.addEntry("curve",mxUtils.bind(this,function(){var a=new mxCell("",new mxGeometry(0,0,50,50),"curved=1;endArrow=classic;html=1;");
a.geometry.setTerminalPoint(new mxPoint(0,50),!0);a.geometry.setTerminalPoint(new mxPoint(50,0),!1);a.geometry.points=[new mxPoint(50,50),new mxPoint(0,0)];a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],a.geometry.width,a.geometry.height,"Curve")})),this.createEdgeTemplateEntry("shape=flexArrow;endArrow=classic;startArrow=classic;html=1;",100,100,"","Bidirectional Arrow",null,"line lines connector connectors connection connections arrow arrows bidirectional"),this.createEdgeTemplateEntry("shape=flexArrow;endArrow=classic;html=1;",
50,50,"","Arrow",null,"line lines connector connectors connection connections arrow arrows directional directed"),this.createEdgeTemplateEntry("endArrow=none;dashed=1;html=1;",50,50,"","Dashed Line",null,"line lines connector connectors connection connections arrow arrows dashed undirected no"),this.createEdgeTemplateEntry("endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;",50,50,"","Dotted Line",null,"line lines connector connectors connection connections arrow arrows dotted undirected no"),
this.createEdgeTemplateEntry("endArrow=none;html=1;",50,50,"","Line",null,"line lines connector connectors connection connections arrow arrows simple undirected plain blank no"),this.createEdgeTemplateEntry("endArrow=classic;startArrow=classic;html=1;",50,50,"","Bidirectional Connector",null,"line lines connector connectors connection connections arrow arrows bidirectional"),this.createEdgeTemplateEntry("endArrow=classic;html=1;",50,50,"","Directional Connector",null,"line lines connector connectors connection connections arrow arrows directional directed"),
@@ -2395,8 +2395,8 @@ new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign
0),!1);a.geometry.relative=!0;a.edge=!0;var b=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;a.insert(b);b=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;a.insert(b);return this.createEdgeTemplateFromCells([a],160,0,"Connector with 2 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",
mxUtils.bind(this,function(){var a=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(160,0),!1);a.geometry.relative=!0;a.edge=!0;var b=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;a.insert(b);b=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;a.insert(b);b=new mxCell("Target",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;a.insert(b);return this.createEdgeTemplateFromCells([a],160,0,"Connector with 3 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge shape symbol message mail email",mxUtils.bind(this,function(){var a=new mxCell("",new mxGeometry(0,
-0,0,0),"endArrow=classic;html=1;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(100,0),!1);a.geometry.relative=!0;a.edge=!0;var b=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;outlineConnect=0;");b.geometry.relative=!0;b.vertex=!0;b.geometry.offset=new mxPoint(-10,-7);a.insert(b);return this.createEdgeTemplateFromCells([a],100,0,"Connector with Symbol")}))];this.addPaletteFunctions("general",mxResources.get("general"),null!=a?a:!0,b);this.setCurrentSearchEntryLibrary()};
-Sidebar.prototype.addMiscPalette=function(a){var c=this;this.setCurrentSearchEntryLibrary("general","misc");var b=[this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;fontSize=24;fontStyle=1;verticalAlign=middle;align=center;",100,40,"Title","Title",null,null,"text heading title"),this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;",100,80,"<ul><li>Value 1</li><li>Value 2</li><li>Value 3</li></ul>",
+0,0,0),"endArrow=classic;html=1;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(100,0),!1);a.geometry.relative=!0;a.edge=!0;var b=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;outlineConnect=0;");b.geometry.relative=!0;b.vertex=!0;b.geometry.offset=new mxPoint(-10,-7);a.insert(b);return this.createEdgeTemplateFromCells([a],100,0,"Connector with Symbol")}))];this.addPaletteFunctions("general",mxResources.get("general"),null!=a?a:!0,d);this.setCurrentSearchEntryLibrary()};
+Sidebar.prototype.addMiscPalette=function(a){var b=this;this.setCurrentSearchEntryLibrary("general","misc");var d=[this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;fontSize=24;fontStyle=1;verticalAlign=middle;align=center;",100,40,"Title","Title",null,null,"text heading title"),this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;",100,80,"<ul><li>Value 1</li><li>Value 2</li><li>Value 3</li></ul>",
"Unordered List"),this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;",100,80,"<ol><li>Value 1</li><li>Value 2</li><li>Value 3</li></ol>","Ordered List"),this.addDataEntry("table",180,120,"Table 1","7ZjBTuMwEIafJtdVnFDoXhtYLnBZeAHTTGtLjieyB9Lu0zNO3FYVVM0upMASKZU8Y49jf3+tX06SF9Xq2sla3WIJJsmvkrxwiNS1qlUBxiRZqsskv0yyLOVfkv060Cva3rSWDiz1Kci6gidpHqHLdAlPaxMTXsk6NEk+hNRMUcXLvBTcbJQmuKvlPPQ3vAnOeZKO7vSfkEo5nqMlqS24WDNHY2TtdTtZN0JpU97INT7S5jWbaBaXB45gdXCLbSru7xqwAnJrHtLoklQcMe0wpAr0Um3KIptU+i6x3NbuiHEjQnsdYN4fIC+ZtDS/YU7SLvuwfMmqdFjfS7cEiokatSVwV09Mw8fcQhtToMGA3KINLyKsY6eBxab2AYmwioGLYLaTtlAmM34YU5H+mCQT3k3BsdjF/IThjgq0nhwLHeYA6akB31vA7N8EPHsH/c6G1c/aMHqn35ulQUa5MNhwqHRZgn3lPyD6cs+Pcj8fCPtkxP4C+2of+QlUOB9VOKTC1hxOIMPF6CGDech6X6ZTWMr0O5+qiw+zlJ8j9k9gKSIdZfgMniLEaCpDm8r0hKYi/uKm/v+dK3H8ij/YQRr4hv81wX+AsXzrm/oRHQZ0Fg53nyPbvr2vlc8="),
this.addDataEntry("table",180,120,"Table 2","7ZhRb5swEMc/Da+TDSFJX0u7vrQv7bR3NzjBkvEhcynJPv3OYDeLUlS0JURTkUDyne+M+f05nXCUZOXuwYqqeIJc6ii5j5LMAmA3KneZ1DqKmcqj5C6KY0Z3FH/vmeXtLKuElQaHJMRdwpvQW9l5OkeNe+0ddSEqN0Tx6ly3BZa0zTtOw6ZQKF8qsXLzDb0E+WoUFl/UL+diZK/AoFBGWp+zAq1FVat2sS6iUDp/FHvYYnhMsFz0tjSPlF/7aAvNn6bfv7Qod70MWpcH8CChlGj3FNKoHAsfsew4sUKqTRHSPDwm6s6xec89IKWBp/ox4WQ4YdoyKqGf5QqF2QyBfQozt1D9EHYj0TsqUAalvX8jGgHaWmmdgQaniQHjHoRQ+Ukt1yH3FRChDOA9mPdFWyjpLV2EKWPf0iilt8nI5gebLhduMQNTo6Uvwa0hRY2NrHGogPHfCTg7g36zE/1+tsOY8bMKaYyLPgj5zxoBMV1raMgsVJ5L88HHwIcKkHwqwPxC/NNe/uctpP+S/+6Y/QhyzHvlSCY5QkI8nh6Lqb1crL3sj2Uao9sse8tr9oXKa3G1bnPTyz+d+I/fbTjr1WM+6XGFdsP51G8u3W+WI/YbfnoAEAps8YUKjH9+QnCxijo9IAgKLCcFrtFz+v/4byZBRmg6ZB4OQNu5o/PR3w=="),
this.addDataEntry("table title",180,150,"Table with Title 1","7VjBbqMwEP0arisMpeleQ7u9tJemP+CGCbZkbGRPQtKv37FxGnWTKJVa0q6CBJLnecbg9xg9mSQvm/W95a14NBWoJL9L8tIag/2oWZegVJKlskry2yTLUrqT7M+RWRZm05Zb0PiRgqwvWHG1hB555i8KetThRkXUCd76IYbZfOqQW5zJV4/lKQFzo5FLDZYAFmKleOtkSL8NGUKq6oFvzBK3C22j6YKqZ/FpvporWWsaz2kbfslpa6Qf3a0IcDEpvjpYhPXR7Qco7v0eTANoN5TSyQpFzLjpKUoFyFpsy4oIctcD9Vvtjk0aREIPk5vvkXuUV3pllFw9wRy5rgPFAhsVd9oJiTBr+dyndvSxHCS4sqZ95rYGjMC/pHlsIZUqjTJeJ220fxCaNk4qWGxrXwyiaWJgIzFviwZSiildRFOZ/iqSgnZTUsx2MV0+3WJptENLX4dfA7jDDhx+VMDssICbSHGU6ZSeV18g59Wwcmrts3dyflopQ8wulOkoFLKqQH+mj/KTfXQ9EO3FSPse7ev3lJ9BhetRhWMqsOx8MkxGSxnaUiZntJSbS+6qybdZyu+R9h9gKSwdZfgJnsLYaCpDmwpjZ3QVtn+qv6DGYqeP/IN10sAn/v+T+G9wlos+qp/QYUBroXD36zLMvfuz+Rc="),
@@ -2416,148 +2416,148 @@ this.createVertexTemplateEntry("html=1;whiteSpace=wrap;shape=isoCube2;background
160,10,"","Horizontal Backbone",!1,null,"backbone bus network"),this.createVertexTemplateEntry("line;strokeWidth=4;direction=south;html=1;perimeter=backbonePerimeter;points=[];outlineConnect=0;",10,160,"","Vertical Backbone",!1,null,"backbone bus network"),this.createVertexTemplateEntry("shape=crossbar;whiteSpace=wrap;html=1;rounded=1;",120,20,"","Horizontal Crossbar",!1,null,"crossbar distance measure dimension unit"),this.createVertexTemplateEntry("shape=crossbar;whiteSpace=wrap;html=1;rounded=1;direction=south;",
20,120,"","Vertical Crossbar",!1,null,"crossbar distance measure dimension unit"),this.createVertexTemplateEntry("shape=image;html=1;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=1;aspect=fixed;image="+this.gearImage,52,61,"","Image (Fixed Aspect)",!1,null,"fixed image icon symbol"),this.createVertexTemplateEntry("shape=image;html=1;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;image="+this.gearImage,50,60,"","Image (Variable Aspect)",!1,null,"strechted image icon symbol"),
this.createVertexTemplateEntry("icon;html=1;image="+this.gearImage,60,60,"Icon","Icon",!1,null,"icon image symbol"),this.createVertexTemplateEntry("label;whiteSpace=wrap;html=1;image="+this.gearImage,140,60,"Label","Label 1",null,null,"label image icon symbol"),this.createVertexTemplateEntry("label;whiteSpace=wrap;html=1;align=center;verticalAlign=bottom;spacingLeft=0;spacingBottom=4;imageAlign=center;imageVerticalAlign=top;image="+this.gearImage,120,80,"Label","Label 2",null,null,"label image icon symbol"),
-this.addEntry("shape group container",function(){var a=new mxCell("Label",new mxGeometry(0,0,160,70),"html=1;whiteSpace=wrap;container=1;recursiveResize=0;collapsible=0;");a.vertex=!0;var b=new mxCell("",new mxGeometry(20,20,20,30),"triangle;html=1;whiteSpace=wrap;");b.vertex=!0;a.insert(b);return c.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Shape Group")}),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;left=0;right=0;fillColor=none;",120,
+this.addEntry("shape group container",function(){var a=new mxCell("Label",new mxGeometry(0,0,160,70),"html=1;whiteSpace=wrap;container=1;recursiveResize=0;collapsible=0;");a.vertex=!0;var c=new mxCell("",new mxGeometry(20,20,20,30),"triangle;html=1;whiteSpace=wrap;");c.vertex=!0;a.insert(c);return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Shape Group")}),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;left=0;right=0;fillColor=none;",120,
60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;top=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=1;right=1;left=1;top=0;fillColor=none;routingCenterX=-0.5;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",
40,40,"","Waypoint"),this.createEdgeTemplateEntry("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;",50,50,"","Manual Line",null,"line lines connector connectors connection connections arrow arrows manual"),this.createEdgeTemplateEntry("shape=filledEdge;rounded=0;fixDash=1;endArrow=none;strokeWidth=10;fillColor=#ffffff;edgeStyle=orthogonalEdgeStyle;",60,40,"","Filled Edge"),this.createEdgeTemplateEntry("edgeStyle=elbowEdgeStyle;elbow=horizontal;endArrow=classic;html=1;",50,50,"","Horizontal Elbow",
-null,"line lines connector connectors connection connections arrow arrows elbow horizontal"),this.createEdgeTemplateEntry("edgeStyle=elbowEdgeStyle;elbow=vertical;endArrow=classic;html=1;",50,50,"","Vertical Elbow",null,"line lines connector connectors connection connections arrow arrows elbow vertical")];this.addPaletteFunctions("misc",mxResources.get("misc"),null!=a?a:!0,b);this.setCurrentSearchEntryLibrary()};
+null,"line lines connector connectors connection connections arrow arrows elbow horizontal"),this.createEdgeTemplateEntry("edgeStyle=elbowEdgeStyle;elbow=vertical;endArrow=classic;html=1;",50,50,"","Vertical Elbow",null,"line lines connector connectors connection connections arrow arrows elbow vertical")];this.addPaletteFunctions("misc",mxResources.get("misc"),null!=a?a:!0,d);this.setCurrentSearchEntryLibrary()};
Sidebar.prototype.addAdvancedPalette=function(a){this.setCurrentSearchEntryLibrary("general","advanced");this.addPaletteFunctions("advanced",mxResources.get("advanced"),null!=a?a:!1,this.createAdvancedShapes());this.setCurrentSearchEntryLibrary()};
Sidebar.prototype.addBasicPalette=function(a){this.setCurrentSearchEntryLibrary("basic");this.addStencilPalette("basic",mxResources.get("basic"),a+"/basic.xml",";whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#000000;strokeWidth=2",null,null,null,null,[this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;top=0;bottom=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;right=0;top=0;bottom=0;fillColor=none;routingCenterX=-0.5;",
120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;top=0;left=0;fillColor=none;",120,60,"","Partial Rectangle")]);this.setCurrentSearchEntryLibrary()};
-Sidebar.prototype.createAdvancedShapes=function(){var a=this,c=new mxCell("List Item",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;");c.vertex=!0;return[this.createVertexTemplateEntry("shape=tapeData;whiteSpace=wrap;html=1;perimeter=ellipsePerimeter;",80,80,"","Tape Data"),this.createVertexTemplateEntry("shape=manualInput;whiteSpace=wrap;html=1;",
+Sidebar.prototype.createAdvancedShapes=function(){var a=this,b=new mxCell("List Item",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;");b.vertex=!0;return[this.createVertexTemplateEntry("shape=tapeData;whiteSpace=wrap;html=1;perimeter=ellipsePerimeter;",80,80,"","Tape Data"),this.createVertexTemplateEntry("shape=manualInput;whiteSpace=wrap;html=1;",
80,80,"","Manual Input"),this.createVertexTemplateEntry("shape=loopLimit;whiteSpace=wrap;html=1;",100,80,"","Loop Limit"),this.createVertexTemplateEntry("shape=offPageConnector;whiteSpace=wrap;html=1;",80,80,"","Off Page Connector"),this.createVertexTemplateEntry("shape=delay;whiteSpace=wrap;html=1;",80,40,"","Delay"),this.createVertexTemplateEntry("shape=display;whiteSpace=wrap;html=1;",80,40,"","Display"),this.createVertexTemplateEntry("shape=singleArrow;direction=west;whiteSpace=wrap;html=1;",
100,60,"","Arrow Left"),this.createVertexTemplateEntry("shape=singleArrow;whiteSpace=wrap;html=1;",100,60,"","Arrow Right"),this.createVertexTemplateEntry("shape=singleArrow;direction=north;whiteSpace=wrap;html=1;",60,100,"","Arrow Up"),this.createVertexTemplateEntry("shape=singleArrow;direction=south;whiteSpace=wrap;html=1;",60,100,"","Arrow Down"),this.createVertexTemplateEntry("shape=doubleArrow;whiteSpace=wrap;html=1;",100,60,"","Double Arrow"),this.createVertexTemplateEntry("shape=doubleArrow;direction=south;whiteSpace=wrap;html=1;",
60,100,"","Double Arrow Vertical",null,null,"double arrow"),this.createVertexTemplateEntry("shape=actor;whiteSpace=wrap;html=1;",40,60,"","User",null,null,"user person human"),this.createVertexTemplateEntry("shape=cross;whiteSpace=wrap;html=1;",80,80,"","Cross"),this.createVertexTemplateEntry("shape=corner;whiteSpace=wrap;html=1;",80,80,"","Corner"),this.createVertexTemplateEntry("shape=tee;whiteSpace=wrap;html=1;",80,80,"","Tee"),this.createVertexTemplateEntry("shape=datastore;whiteSpace=wrap;html=1;",
60,60,"","Data Store",null,null,"data store cylinder database"),this.createVertexTemplateEntry("shape=orEllipse;perimeter=ellipsePerimeter;whiteSpace=wrap;html=1;backgroundOutline=1;",80,80,"","Or",null,null,"or circle oval ellipse"),this.createVertexTemplateEntry("shape=sumEllipse;perimeter=ellipsePerimeter;whiteSpace=wrap;html=1;backgroundOutline=1;",80,80,"","Sum",null,null,"sum circle oval ellipse"),this.createVertexTemplateEntry("shape=lineEllipse;perimeter=ellipsePerimeter;whiteSpace=wrap;html=1;backgroundOutline=1;",
80,80,"","Ellipse with horizontal divider",null,null,"circle oval ellipse"),this.createVertexTemplateEntry("shape=lineEllipse;line=vertical;perimeter=ellipsePerimeter;whiteSpace=wrap;html=1;backgroundOutline=1;",80,80,"","Ellipse with vertical divider",null,null,"circle oval ellipse"),this.createVertexTemplateEntry("shape=sortShape;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;",80,80,"","Sort",null,null,"sort"),this.createVertexTemplateEntry("shape=collate;whiteSpace=wrap;html=1;",80,80,"","Collate",
null,null,"collate"),this.createVertexTemplateEntry("shape=switch;whiteSpace=wrap;html=1;",60,60,"","Switch",null,null,"switch router"),this.addEntry("process bar",function(){return a.createVertexTemplateFromData("zZXRaoMwFIafJpcDjbNrb2233rRQ8AkyPdPQaCRJV+3T7yTG2rUVBoOtgpDzn/xJzncCIdGyateKNeVW5iBI9EqipZLS9KOqXYIQhAY8J9GKUBrgT+jbRDZ02aBhCmrzEwPtDZ9MHKBXdkpmoDWKCVN9VptO+Kw+8kqwGqMkK7nIN6yTB7uTNizbD1FSSsVPsjYMC1qFKHxwIZZSSIVxLZ1/nJNar5+oQPMT7IYCrqUta1ENzuqGaeOFTArBGs3f3Vmtoo2Se7ja1h00kSoHK4bBIKUNy3hdoPYU0mF91i9mT8EEL2ocZ3gKa00ayWujLZY4IfHKFonVDLsRGgXuQ90zBmWgneyTk3yT1iArMKrDKUeem9L3ajHrbSXwohxsQd/ggOleKM7ese048J2/fwuim1uQGmhQCW8vQMkacP3GCQgBFMftHEsr7cYYe95CnmKTPMFbYD8CQ++DGQy+/M5X4ku5wHYmdIktfvk9tecpavThqS3m/0YtnqIWPTy1cD77K2wYjo+Ay317I74A",
-296,100,"Process Bar")}),this.createVertexTemplateEntry("swimlane;",200,200,"Container","Container",null,null,"container swimlane lane pool group"),this.addEntry("list group erd table",function(){var b=new mxCell("List",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");b.vertex=!0;b.insert(a.cloneCell(c,"Item 1"));b.insert(a.cloneCell(c,"Item 2"));
-b.insert(a.cloneCell(c,"Item 3"));return a.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return a.createVertexTemplateFromCells([a.cloneCell(c,"List Item")],c.geometry.width,c.geometry.height,"List Item")})]};
-Sidebar.prototype.createAdvancedShapes=function(){var a=this,c=new mxCell("List Item",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;");c.vertex=!0;return[this.createVertexTemplateEntry("shape=tapeData;whiteSpace=wrap;html=1;perimeter=ellipsePerimeter;",80,80,"","Tape Data"),this.createVertexTemplateEntry("shape=manualInput;whiteSpace=wrap;html=1;",
+296,100,"Process Bar")}),this.createVertexTemplateEntry("swimlane;",200,200,"Container","Container",null,null,"container swimlane lane pool group"),this.addEntry("list group erd table",function(){var d=new mxCell("List",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");d.vertex=!0;d.insert(a.cloneCell(b,"Item 1"));d.insert(a.cloneCell(b,"Item 2"));
+d.insert(a.cloneCell(b,"Item 3"));return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return a.createVertexTemplateFromCells([a.cloneCell(b,"List Item")],b.geometry.width,b.geometry.height,"List Item")})]};
+Sidebar.prototype.createAdvancedShapes=function(){var a=this,b=new mxCell("List Item",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;");b.vertex=!0;return[this.createVertexTemplateEntry("shape=tapeData;whiteSpace=wrap;html=1;perimeter=ellipsePerimeter;",80,80,"","Tape Data"),this.createVertexTemplateEntry("shape=manualInput;whiteSpace=wrap;html=1;",
80,80,"","Manual Input"),this.createVertexTemplateEntry("shape=loopLimit;whiteSpace=wrap;html=1;",100,80,"","Loop Limit"),this.createVertexTemplateEntry("shape=offPageConnector;whiteSpace=wrap;html=1;",80,80,"","Off Page Connector"),this.createVertexTemplateEntry("shape=delay;whiteSpace=wrap;html=1;",80,40,"","Delay"),this.createVertexTemplateEntry("shape=display;whiteSpace=wrap;html=1;",80,40,"","Display"),this.createVertexTemplateEntry("shape=singleArrow;direction=west;whiteSpace=wrap;html=1;",
100,60,"","Arrow Left"),this.createVertexTemplateEntry("shape=singleArrow;whiteSpace=wrap;html=1;",100,60,"","Arrow Right"),this.createVertexTemplateEntry("shape=singleArrow;direction=north;whiteSpace=wrap;html=1;",60,100,"","Arrow Up"),this.createVertexTemplateEntry("shape=singleArrow;direction=south;whiteSpace=wrap;html=1;",60,100,"","Arrow Down"),this.createVertexTemplateEntry("shape=doubleArrow;whiteSpace=wrap;html=1;",100,60,"","Double Arrow"),this.createVertexTemplateEntry("shape=doubleArrow;direction=south;whiteSpace=wrap;html=1;",
60,100,"","Double Arrow Vertical",null,null,"double arrow"),this.createVertexTemplateEntry("shape=actor;whiteSpace=wrap;html=1;",40,60,"","User",null,null,"user person human"),this.createVertexTemplateEntry("shape=cross;whiteSpace=wrap;html=1;",80,80,"","Cross"),this.createVertexTemplateEntry("shape=corner;whiteSpace=wrap;html=1;",80,80,"","Corner"),this.createVertexTemplateEntry("shape=tee;whiteSpace=wrap;html=1;",80,80,"","Tee"),this.createVertexTemplateEntry("shape=datastore;whiteSpace=wrap;html=1;",
60,60,"","Data Store",null,null,"data store cylinder database"),this.createVertexTemplateEntry("shape=orEllipse;perimeter=ellipsePerimeter;whiteSpace=wrap;html=1;backgroundOutline=1;",80,80,"","Or",null,null,"or circle oval ellipse"),this.createVertexTemplateEntry("shape=sumEllipse;perimeter=ellipsePerimeter;whiteSpace=wrap;html=1;backgroundOutline=1;",80,80,"","Sum",null,null,"sum circle oval ellipse"),this.createVertexTemplateEntry("shape=lineEllipse;perimeter=ellipsePerimeter;whiteSpace=wrap;html=1;backgroundOutline=1;",
80,80,"","Ellipse with horizontal divider",null,null,"circle oval ellipse"),this.createVertexTemplateEntry("shape=lineEllipse;line=vertical;perimeter=ellipsePerimeter;whiteSpace=wrap;html=1;backgroundOutline=1;",80,80,"","Ellipse with vertical divider",null,null,"circle oval ellipse"),this.createVertexTemplateEntry("shape=sortShape;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;",80,80,"","Sort",null,null,"sort"),this.createVertexTemplateEntry("shape=collate;whiteSpace=wrap;html=1;",80,80,"","Collate",
null,null,"collate"),this.createVertexTemplateEntry("shape=switch;whiteSpace=wrap;html=1;",60,60,"","Switch",null,null,"switch router"),this.addEntry("process bar",function(){return a.createVertexTemplateFromData("zZXRaoMwFIafJpcDjbNrb2233rRQ8AkyPdPQaCRJV+3T7yTG2rUVBoOtgpDzn/xJzncCIdGyateKNeVW5iBI9EqipZLS9KOqXYIQhAY8J9GKUBrgT+jbRDZ02aBhCmrzEwPtDZ9MHKBXdkpmoDWKCVN9VptO+Kw+8kqwGqMkK7nIN6yTB7uTNizbD1FSSsVPsjYMC1qFKHxwIZZSSIVxLZ1/nJNar5+oQPMT7IYCrqUta1ENzuqGaeOFTArBGs3f3Vmtoo2Se7ja1h00kSoHK4bBIKUNy3hdoPYU0mF91i9mT8EEL2ocZ3gKa00ayWujLZY4IfHKFonVDLsRGgXuQ90zBmWgneyTk3yT1iArMKrDKUeem9L3ajHrbSXwohxsQd/ggOleKM7ese048J2/fwuim1uQGmhQCW8vQMkacP3GCQgBFMftHEsr7cYYe95CnmKTPMFbYD8CQ++DGQy+/M5X4ku5wHYmdIktfvk9tecpavThqS3m/0YtnqIWPTy1cD77K2wYjo+Ay317I74A",
-296,100,"Process Bar")}),this.createVertexTemplateEntry("swimlane;",200,200,"Container","Container",null,null,"container swimlane lane pool group"),this.addEntry("list group erd table",function(){var b=new mxCell("List",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");b.vertex=!0;b.insert(a.cloneCell(c,"Item 1"));b.insert(a.cloneCell(c,"Item 2"));
-b.insert(a.cloneCell(c,"Item 3"));return a.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return a.createVertexTemplateFromCells([a.cloneCell(c,"List Item")],c.geometry.width,c.geometry.height,"List Item")})]};
+296,100,"Process Bar")}),this.createVertexTemplateEntry("swimlane;",200,200,"Container","Container",null,null,"container swimlane lane pool group"),this.addEntry("list group erd table",function(){var d=new mxCell("List",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");d.vertex=!0;d.insert(a.cloneCell(b,"Item 1"));d.insert(a.cloneCell(b,"Item 2"));
+d.insert(a.cloneCell(b,"Item 3"));return a.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return a.createVertexTemplateFromCells([a.cloneCell(b,"List Item")],b.geometry.width,b.geometry.height,"List Item")})]};
Sidebar.prototype.addBasicPalette=function(a){this.setCurrentSearchEntryLibrary("basic");this.addStencilPalette("basic",mxResources.get("basic"),a+"/basic.xml",";whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#000000;strokeWidth=2",null,null,null,null,[this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;top=0;bottom=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;right=0;top=0;bottom=0;fillColor=none;routingCenterX=-0.5;",
120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;top=0;left=0;fillColor=none;",120,60,"","Partial Rectangle")]);this.setCurrentSearchEntryLibrary()};
-Sidebar.prototype.addUmlPalette=function(a){var c=this,b=new mxCell("+ field: type",new mxGeometry(0,0,100,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;");b.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");
-e.vertex=!0;this.setCurrentSearchEntryLibrary("uml");var d=[this.createVertexTemplateEntry("html=1;",110,50,"Object","Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("html=1;",110,50,"&laquo;interface&raquo;<br><b>Name</b>","Interface",null,null,"uml static class interface object instance annotated annotation"),this.addEntry("uml static class object instance",function(){var a=new mxCell("Classname",new mxGeometry(0,0,160,90),"swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
-a.vertex=!0;a.insert(b.clone());a.insert(e.clone());a.insert(c.cloneCell(b,"+ method(type): type"));return c.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Class")}),this.addEntry("uml static class section subsection",function(){var a=new mxCell("Classname",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");a.vertex=
-!0;a.insert(b.clone());a.insert(b.clone());a.insert(b.clone());return c.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Class 2")}),this.addEntry("uml static class item member method function variable field attribute label",function(){return c.createVertexTemplateFromCells([c.cloneCell(b,"+ item: attribute")],b.geometry.width,b.geometry.height,"Item 1")}),this.addEntry("uml static class item member method function variable field attribute label",function(){var a=new mxCell("item: attribute",
-new mxGeometry(0,0,120,b.geometry.height),"label;fontStyle=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;overflow=hidden;spacingLeft=28;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;imageWidth=16;imageHeight=16;image="+c.gearImage);a.vertex=!0;return c.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Item 2")}),this.addEntry("uml static class divider hline line separator",function(){return c.createVertexTemplateFromCells([e.clone()],
-e.geometry.width,e.geometry.height,"Divider")}),this.addEntry("uml static class spacer space gap separator",function(){var a=new mxCell("",new mxGeometry(0,0,20,14),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");a.vertex=!0;return c.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Spacer")}),this.createVertexTemplateEntry("text;align=center;fontStyle=1;verticalAlign=middle;spacingLeft=3;spacingRight=3;strokeColor=none;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;",
-80,26,"Title","Title",null,null,"uml static class title label"),this.addEntry("uml static class component",function(){var a=new mxCell("&laquo;Annotation&raquo;<br/><b>Component</b>",new mxGeometry(0,0,180,90),"html=1;dropTarget=0;");a.vertex=!0;var b=new mxCell("",new mxGeometry(1,0,20,20),"shape=module;jettyWidth=8;jettyHeight=4;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-27,7);a.insert(b);return c.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Component")}),
-this.addEntry("uml static class component",function(){var a=new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p><hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>',new mxGeometry(0,0,180,90),"align=left;overflow=fill;html=1;dropTarget=0;");a.vertex=!0;var b=new mxCell("",new mxGeometry(1,0,20,20),"shape=component;jettyWidth=8;jettyHeight=4;");b.vertex=!0;b.geometry.relative=!0;b.geometry.offset=new mxPoint(-24,4);a.insert(b);
-return c.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Component with Attributes")}),this.createVertexTemplateEntry("verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;html=1;",180,120,"Block","Block",null,null,"uml static class block"),this.createVertexTemplateEntry("shape=module;align=left;spacingLeft=20;align=center;verticalAlign=top;",100,50,"Module","Module",null,null,"uml static class module component"),
+Sidebar.prototype.addUmlPalette=function(a){var b=this,d=new mxCell("+ field: type",new mxGeometry(0,0,100,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;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");
+e.vertex=!0;this.setCurrentSearchEntryLibrary("uml");var c=[this.createVertexTemplateEntry("html=1;",110,50,"Object","Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("html=1;",110,50,"&laquo;interface&raquo;<br><b>Name</b>","Interface",null,null,"uml static class interface object instance annotated annotation"),this.addEntry("uml static class object instance",function(){var a=new mxCell("Classname",new mxGeometry(0,0,160,90),"swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
+a.vertex=!0;a.insert(d.clone());a.insert(e.clone());a.insert(b.cloneCell(d,"+ method(type): type"));return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Class")}),this.addEntry("uml static class section subsection",function(){var a=new mxCell("Classname",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");a.vertex=
+!0;a.insert(d.clone());a.insert(d.clone());a.insert(d.clone());return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Class 2")}),this.addEntry("uml static class item member method function variable field attribute label",function(){return b.createVertexTemplateFromCells([b.cloneCell(d,"+ item: attribute")],d.geometry.width,d.geometry.height,"Item 1")}),this.addEntry("uml static class item member method function variable field attribute label",function(){var a=new mxCell("item: attribute",
+new mxGeometry(0,0,120,d.geometry.height),"label;fontStyle=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;overflow=hidden;spacingLeft=28;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;imageWidth=16;imageHeight=16;image="+b.gearImage);a.vertex=!0;return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Item 2")}),this.addEntry("uml static class divider hline line separator",function(){return b.createVertexTemplateFromCells([e.clone()],
+e.geometry.width,e.geometry.height,"Divider")}),this.addEntry("uml static class spacer space gap separator",function(){var a=new mxCell("",new mxGeometry(0,0,20,14),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");a.vertex=!0;return b.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Spacer")}),this.createVertexTemplateEntry("text;align=center;fontStyle=1;verticalAlign=middle;spacingLeft=3;spacingRight=3;strokeColor=none;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;",
+80,26,"Title","Title",null,null,"uml static class title label"),this.addEntry("uml static class component",function(){var a=new mxCell("&laquo;Annotation&raquo;<br/><b>Component</b>",new mxGeometry(0,0,180,90),"html=1;dropTarget=0;");a.vertex=!0;var c=new mxCell("",new mxGeometry(1,0,20,20),"shape=module;jettyWidth=8;jettyHeight=4;");c.vertex=!0;c.geometry.relative=!0;c.geometry.offset=new mxPoint(-27,7);a.insert(c);return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Component")}),
+this.addEntry("uml static class component",function(){var a=new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p><hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>',new mxGeometry(0,0,180,90),"align=left;overflow=fill;html=1;dropTarget=0;");a.vertex=!0;var c=new mxCell("",new mxGeometry(1,0,20,20),"shape=component;jettyWidth=8;jettyHeight=4;");c.vertex=!0;c.geometry.relative=!0;c.geometry.offset=new mxPoint(-24,4);a.insert(c);
+return b.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,"Component with Attributes")}),this.createVertexTemplateEntry("verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;html=1;",180,120,"Block","Block",null,null,"uml static class block"),this.createVertexTemplateEntry("shape=module;align=left;spacingLeft=20;align=center;verticalAlign=top;",100,50,"Module","Module",null,null,"uml static class module component"),
this.createVertexTemplateEntry("shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;",70,50,"package","Package",null,null,"uml static class package"),this.createVertexTemplateEntry("verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;",160,90,'<p style="margin:0px;margin-top:4px;text-align:center;text-decoration:underline;"><b>Object:Type</b></p><hr/><p style="margin:0px;margin-left:8px;">field1 = value1<br/>field2 = value2<br>field3 = value3</p>',
"Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("verticalAlign=top;align=left;overflow=fill;html=1;",180,90,'<div style="box-sizing:border-box;width:100%;background:#e4e4e4;padding:2px;">Tablename</div><table style="width:100%;font-size:1em;" cellpadding="2" cellspacing="0"><tr><td>PK</td><td>uniqueId</td></tr><tr><td>FK1</td><td>foreignKey</td></tr><tr><td></td><td>fieldname</td></tr></table>',"Entity",null,null,"er entity table"),this.addEntry("uml static class object instance",
-function(){var a=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div>',new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");a.vertex=!0;return c.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Class 3")}),this.addEntry("uml static class object instance",function(){var a=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div><hr size="1"/><div style="height:2px;"></div>',
-new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");a.vertex=!0;return c.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Class 4")}),this.addEntry("uml static class object instance",function(){var a=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method(): Type</p>',
-new mxGeometry(0,0,160,90),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");a.vertex=!0;return c.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Class 5")}),this.addEntry("uml static class object instance",function(){var a=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>+ field2: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method1(Type): Type<br/>+ method2(Type, Type): Type</p>',
-new mxGeometry(0,0,190,140),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");a.vertex=!0;return c.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Interface 2")}),this.createVertexTemplateEntry("shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",20,20,"","Provided/Required Interface",null,null,"uml provided required interface lollipop notation"),this.createVertexTemplateEntry("shape=requiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",
-10,20,"","Required Interface",null,null,"uml required interface lollipop notation"),this.addEntry("uml lollipop notation provided required interface",function(){return c.createVertexTemplateFromData("zVRNT8MwDP01uaLSMu6sfFxAmrQDcAytaQJZXLnu2u7XkzQZXTUmuIA4VIqf/ZzkvdQiyzf9HclaPWAJRmQ3IssJkcNq0+dgjEgTXYrsWqRp4j6R3p7Ino/ZpJYEln9CSANhK00LAQlAw4OJAGFrS/D1iciWSKywQivNPWLtwHMHvgHzsNY7z5Ato4MUb0zMgi2viLBzoUULAbnVxsSWzTtwofYBtlTACkhvgIHWtSy0rWKSJVXAJ5Lh4FBWMNMicAJ0cSzPWBW1uQN0fWlwJQRGst7OW8kmhNVn3Sd1hdp1TJMhVCzmhHipUDO54RYHm07Q6NHXfmV/65eS5jXXVJhj15yCNDz54GyxD58PwjL2v/SmMuE7POqSVdxj5vm/cK6PG4X/5deNvPjeSEfQdeOV75Rm8K/dZzo3LOaGSaMr69aF0wbIA00NhZfpVff+JSwJGr2TL2Nnr3jtbzDeabEUi2v/Tlo22kKO1gbq0Z8ZDwzE0J+cNidM2ROinF18CR6KeivQleI59pVrM8knfV04Dc1gx+FM/QA=",
+function(){var a=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div>',new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");a.vertex=!0;return b.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Class 3")}),this.addEntry("uml static class object instance",function(){var a=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div><hr size="1"/><div style="height:2px;"></div>',
+new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");a.vertex=!0;return b.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Class 4")}),this.addEntry("uml static class object instance",function(){var a=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method(): Type</p>',
+new mxGeometry(0,0,160,90),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");a.vertex=!0;return b.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Class 5")}),this.addEntry("uml static class object instance",function(){var a=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>+ field2: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method1(Type): Type<br/>+ method2(Type, Type): Type</p>',
+new mxGeometry(0,0,190,140),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");a.vertex=!0;return b.createVertexTemplateFromCells([a.clone()],a.geometry.width,a.geometry.height,"Interface 2")}),this.createVertexTemplateEntry("shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",20,20,"","Provided/Required Interface",null,null,"uml provided required interface lollipop notation"),this.createVertexTemplateEntry("shape=requiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",
+10,20,"","Required Interface",null,null,"uml required interface lollipop notation"),this.addEntry("uml lollipop notation provided required interface",function(){return b.createVertexTemplateFromData("zVRNT8MwDP01uaLSMu6sfFxAmrQDcAytaQJZXLnu2u7XkzQZXTUmuIA4VIqf/ZzkvdQiyzf9HclaPWAJRmQ3IssJkcNq0+dgjEgTXYrsWqRp4j6R3p7Ino/ZpJYEln9CSANhK00LAQlAw4OJAGFrS/D1iciWSKywQivNPWLtwHMHvgHzsNY7z5Ato4MUb0zMgi2viLBzoUULAbnVxsSWzTtwofYBtlTACkhvgIHWtSy0rWKSJVXAJ5Lh4FBWMNMicAJ0cSzPWBW1uQN0fWlwJQRGst7OW8kmhNVn3Sd1hdp1TJMhVCzmhHipUDO54RYHm07Q6NHXfmV/65eS5jXXVJhj15yCNDz54GyxD58PwjL2v/SmMuE7POqSVdxj5vm/cK6PG4X/5deNvPjeSEfQdeOV75Rm8K/dZzo3LOaGSaMr69aF0wbIA00NhZfpVff+JSwJGr2TL2Nnr3jtbzDeabEUi2v/Tlo22kKO1gbq0Z8ZDwzE0J+cNidM2ROinF18CR6KeivQleI59pVrM8knfV04Dc1gx+FM/QA=",
40,10,"Lollipop Notation")}),this.createVertexTemplateEntry("shape=umlBoundary;whiteSpace=wrap;html=1;",100,80,"Boundary Object","Boundary Object",null,null,"uml boundary object"),this.createVertexTemplateEntry("ellipse;shape=umlEntity;whiteSpace=wrap;html=1;",80,80,"Entity Object","Entity Object",null,null,"uml entity object"),this.createVertexTemplateEntry("ellipse;shape=umlControl;whiteSpace=wrap;html=1;",70,80,"Control Object","Control Object",null,null,"uml control object"),this.createVertexTemplateEntry("shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;",
-30,60,"Actor","Actor",!1,null,"uml actor"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",140,70,"Use Case","Use Case",null,null,"uml use case usecase"),this.addEntry("uml activity state start",function(){var a=new mxCell("",new mxGeometry(0,0,30,30),"ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
-b.geometry.setTerminalPoint(new mxPoint(15,90),!1);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!0);return c.createVertexTemplateFromCells([a,b],30,90,"Start")}),this.addEntry("uml activity state",function(){var a=new mxCell("Activity",new mxGeometry(0,0,120,40),"rounded=1;whiteSpace=wrap;html=1;arcSize=40;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
-b.geometry.setTerminalPoint(new mxPoint(60,100),!1);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!0);return c.createVertexTemplateFromCells([a,b],120,100,"Activity")}),this.addEntry("uml activity composite state",function(){var a=new mxCell("Composite State",new mxGeometry(0,0,160,60),"swimlane;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;fontColor=#000000;collapsible=0;rounded=1;arcSize=30;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;dropTarget=0;");
-a.vertex=!0;var b=new mxCell("Subtitle",new mxGeometry(0,0,200,26),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;fontColor=#000000;");b.vertex=!0;a.insert(b);b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");b.geometry.setTerminalPoint(new mxPoint(80,120),!1);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,
-!0);return c.createVertexTemplateFromCells([a,b],160,120,"Composite State")}),this.addEntry("uml activity condition",function(){var a=new mxCell("Condition",new mxGeometry(0,0,80,40),"rhombus;whiteSpace=wrap;html=1;fillColor=#ffffc0;strokeColor=#ff0000;");a.vertex=!0;var b=new mxCell("no",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");b.geometry.setTerminalPoint(new mxPoint(180,20),!1);b.geometry.relative=
-!0;b.geometry.x=-1;b.edge=!0;a.insertEdge(b,!0);var d=new mxCell("yes",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;");d.geometry.setTerminalPoint(new mxPoint(40,100),!1);d.geometry.relative=!0;d.geometry.x=-1;d.edge=!0;a.insertEdge(d,!0);return c.createVertexTemplateFromCells([a,b,d],180,100,"Condition")}),this.addEntry("uml activity fork join",function(){var a=new mxCell("",new mxGeometry(0,0,200,10),"shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;");
-a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");b.geometry.setTerminalPoint(new mxPoint(100,80),!1);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!0);return c.createVertexTemplateFromCells([a,b],200,80,"Fork/Join")}),this.createVertexTemplateEntry("ellipse;html=1;shape=endState;fillColor=#000000;strokeColor=#ff0000;",30,30,"","End",null,null,"uml activity state end"),this.createVertexTemplateEntry("shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;",
+30,60,"Actor","Actor",!1,null,"uml actor"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",140,70,"Use Case","Use Case",null,null,"uml use case usecase"),this.addEntry("uml activity state start",function(){var a=new mxCell("",new mxGeometry(0,0,30,30),"ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;");a.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+c.geometry.setTerminalPoint(new mxPoint(15,90),!1);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!0);return b.createVertexTemplateFromCells([a,c],30,90,"Start")}),this.addEntry("uml activity state",function(){var a=new mxCell("Activity",new mxGeometry(0,0,120,40),"rounded=1;whiteSpace=wrap;html=1;arcSize=40;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;");a.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+c.geometry.setTerminalPoint(new mxPoint(60,100),!1);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!0);return b.createVertexTemplateFromCells([a,c],120,100,"Activity")}),this.addEntry("uml activity composite state",function(){var a=new mxCell("Composite State",new mxGeometry(0,0,160,60),"swimlane;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;fontColor=#000000;collapsible=0;rounded=1;arcSize=30;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;dropTarget=0;");
+a.vertex=!0;var c=new mxCell("Subtitle",new mxGeometry(0,0,200,26),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;fontColor=#000000;");c.vertex=!0;a.insert(c);c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");c.geometry.setTerminalPoint(new mxPoint(80,120),!1);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,
+!0);return b.createVertexTemplateFromCells([a,c],160,120,"Composite State")}),this.addEntry("uml activity condition",function(){var a=new mxCell("Condition",new mxGeometry(0,0,80,40),"rhombus;whiteSpace=wrap;html=1;fillColor=#ffffc0;strokeColor=#ff0000;");a.vertex=!0;var c=new mxCell("no",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");c.geometry.setTerminalPoint(new mxPoint(180,20),!1);c.geometry.relative=
+!0;c.geometry.x=-1;c.edge=!0;a.insertEdge(c,!0);var d=new mxCell("yes",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;");d.geometry.setTerminalPoint(new mxPoint(40,100),!1);d.geometry.relative=!0;d.geometry.x=-1;d.edge=!0;a.insertEdge(d,!0);return b.createVertexTemplateFromCells([a,c,d],180,100,"Condition")}),this.addEntry("uml activity fork join",function(){var a=new mxCell("",new mxGeometry(0,0,200,10),"shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;");
+a.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");c.geometry.setTerminalPoint(new mxPoint(100,80),!1);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!0);return b.createVertexTemplateFromCells([a,c],200,80,"Fork/Join")}),this.createVertexTemplateEntry("ellipse;html=1;shape=endState;fillColor=#000000;strokeColor=#ff0000;",30,30,"","End",null,null,"uml activity state end"),this.createVertexTemplateEntry("shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;",
100,300,":Object","Lifeline",null,null,"uml sequence participant lifeline"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlActor;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",20,300,"","Actor Lifeline",null,null,"uml sequence participant lifeline actor"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlBoundary;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",
50,300,"","Boundary Lifeline",null,null,"uml sequence participant lifeline boundary"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlEntity;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",40,300,"","Entity Lifeline",null,null,"uml sequence participant lifeline entity"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlControl;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",
40,300,"","Control Lifeline",null,null,"uml sequence participant lifeline control"),this.createVertexTemplateEntry("shape=umlFrame;whiteSpace=wrap;html=1;",300,200,"frame","Frame",null,null,"uml sequence frame"),this.createVertexTemplateEntry("shape=umlDestroy;whiteSpace=wrap;html=1;strokeWidth=3;",30,30,"","Destruction",null,null,"uml sequence destruction destroy"),this.addEntry("uml sequence invoke invocation call activation",function(){var a=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
-a.vertex=!0;var b=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;startArrow=oval;endArrow=block;startSize=8;");b.geometry.setTerminalPoint(new mxPoint(-60,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return c.createVertexTemplateFromCells([a,b],10,80,"Found Message")}),this.addEntry("uml sequence invoke call delegation synchronous invocation activation",function(){var a=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
-a.vertex=!0;var b=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=block;entryX=0;entryY=0;");b.geometry.setTerminalPoint(new mxPoint(-70,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var d=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;exitX=0;exitY=0.95;");d.geometry.setTerminalPoint(new mxPoint(-70,76),!1);d.geometry.relative=!0;d.edge=!0;a.insertEdge(d,!0);return c.createVertexTemplateFromCells([a,
-b,d],10,80,"Synchronous Invocation")}),this.addEntry("uml sequence self call recursion delegation activation",function(){var a=new mxCell("",new mxGeometry(-5,20,10,40),"html=1;points=[];perimeter=orthogonalPerimeter;");a.vertex=!0;var b=new mxCell("self call",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;spacingLeft=2;endArrow=block;rounded=0;entryX=1;entryY=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.points=[new mxPoint(30,0)];b.geometry.relative=
-!0;b.edge=!0;a.insertEdge(b,!1);return c.createVertexTemplateFromCells([a,b],10,60,"Self Call")}),this.addEntry("uml sequence invoke call delegation callback activation",function(){return c.createVertexTemplateFromData("xZRNT8MwDIZ/Ta6oaymD47rBTkiTuMAxW6wmIm0q19s6fj1OE3V0Y2iCA4dK8euP2I+riGxedUuUjX52CqzIHkU2R+conKpuDtaKNDFKZAuRpgl/In264J303qSRCDVdk5CGhJ20WwhKEFo62ChoqritxURkReNMTa2X80LkC68AmgoIkEWHpF3pamlXR7WIFwASdBeb7KXY4RIc5+KBQ/ZGkY4RYY5Egyl1zLqLmmyDXQ6Zx4n5EIf+HkB2BmAjrV3LzftPIPw4hgNn1pQ1a2tH5Cp2QK1miG7vNeu4iJe4pdeY2BtvbCQDGlAljMCQxBJotJ8rWCFYSWY3LvUdmZi68rvkkLiU6QnL1m1xAzHoBOdw61WEb88II9AW67/ydQ2wq1Cy1aAGvOrFfPh6997qDA3g+dxzv3nIL6MPU/8T+kMw8+m4QPgdfrEJNo8PSQj/+s58Ag==",
+a.vertex=!0;var c=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;startArrow=oval;endArrow=block;startSize=8;");c.geometry.setTerminalPoint(new mxPoint(-60,0),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);return b.createVertexTemplateFromCells([a,c],10,80,"Found Message")}),this.addEntry("uml sequence invoke call delegation synchronous invocation activation",function(){var a=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
+a.vertex=!0;var c=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=block;entryX=0;entryY=0;");c.geometry.setTerminalPoint(new mxPoint(-70,0),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);var d=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;exitX=0;exitY=0.95;");d.geometry.setTerminalPoint(new mxPoint(-70,76),!1);d.geometry.relative=!0;d.edge=!0;a.insertEdge(d,!0);return b.createVertexTemplateFromCells([a,
+c,d],10,80,"Synchronous Invocation")}),this.addEntry("uml sequence self call recursion delegation activation",function(){var a=new mxCell("",new mxGeometry(-5,20,10,40),"html=1;points=[];perimeter=orthogonalPerimeter;");a.vertex=!0;var c=new mxCell("self call",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;spacingLeft=2;endArrow=block;rounded=0;entryX=1;entryY=0;");c.geometry.setTerminalPoint(new mxPoint(0,0),!0);c.geometry.points=[new mxPoint(30,0)];c.geometry.relative=
+!0;c.edge=!0;a.insertEdge(c,!1);return b.createVertexTemplateFromCells([a,c],10,60,"Self Call")}),this.addEntry("uml sequence invoke call delegation callback activation",function(){return b.createVertexTemplateFromData("xZRNT8MwDIZ/Ta6oaymD47rBTkiTuMAxW6wmIm0q19s6fj1OE3V0Y2iCA4dK8euP2I+riGxedUuUjX52CqzIHkU2R+conKpuDtaKNDFKZAuRpgl/In264J303qSRCDVdk5CGhJ20WwhKEFo62ChoqritxURkReNMTa2X80LkC68AmgoIkEWHpF3pamlXR7WIFwASdBeb7KXY4RIc5+KBQ/ZGkY4RYY5Egyl1zLqLmmyDXQ6Zx4n5EIf+HkB2BmAjrV3LzftPIPw4hgNn1pQ1a2tH5Cp2QK1miG7vNeu4iJe4pdeY2BtvbCQDGlAljMCQxBJotJ8rWCFYSWY3LvUdmZi68rvkkLiU6QnL1m1xAzHoBOdw61WEb88II9AW67/ydQ2wq1Cy1aAGvOrFfPh6997qDA3g+dxzv3nIL6MPU/8T+kMw8+m4QPgdfrEJNo8PSQj/+s58Ag==",
10,60,"Callback")}),this.createVertexTemplateEntry("html=1;points=[];perimeter=orthogonalPerimeter;",10,80,"","Activation",null,null,"uml sequence activation"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;startArrow=oval;startFill=1;endArrow=block;startSize=8;",60,0,"dispatch","Found Message 1",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;startArrow=circle;startFill=1;endArrow=open;startSize=6;endSize=8;",80,0,"dispatch",
"Found Message 2",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;endArrow=block;",80,0,"dispatch","Message",null,"uml sequence message call invoke dispatch"),this.addEntry("uml sequence return message",function(){var a=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;");a.geometry.setTerminalPoint(new mxPoint(80,0),!0);a.geometry.setTerminalPoint(new mxPoint(0,0),!1);a.geometry.relative=
-!0;a.edge=!0;return c.createEdgeTemplateFromCells([a],80,0,"Return")}),this.addEntry("uml relation",function(){var a=new mxCell("name",new mxGeometry(0,0,0,0),"endArrow=block;endFill=1;html=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(160,0),!1);a.geometry.relative=!0;a.geometry.x=-1;a.edge=!0;var b=new mxCell("1",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;a.insert(b);return c.createEdgeTemplateFromCells([a],160,0,"Relation 1")}),this.addEntry("uml association",function(){var a=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(160,0),!1);a.geometry.relative=!0;a.edge=!0;var b=new mxCell("parent",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;a.insert(b);b=new mxCell("child",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;a.insert(b);return c.createEdgeTemplateFromCells([a],160,0,"Association 1")}),this.addEntry("uml aggregation",function(){var a=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");
-a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(160,0),!1);a.geometry.relative=!0;a.geometry.x=-1;a.geometry.y=3;a.edge=!0;return c.createEdgeTemplateFromCells([a],160,0,"Aggregation 1")}),this.addEntry("uml composition",function(){var a=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");a.geometry.setTerminalPoint(new mxPoint(0,
-0),!0);a.geometry.setTerminalPoint(new mxPoint(160,0),!1);a.geometry.relative=!0;a.geometry.x=-1;a.geometry.y=3;a.edge=!0;return c.createEdgeTemplateFromCells([a],160,0,"Composition 1")}),this.addEntry("uml relation",function(){var a=new mxCell("Relation",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(160,0),!1);a.geometry.relative=
-!0;a.edge=!0;var b=new mxCell("0..n",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=top;");b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;a.insert(b);b=new mxCell("1",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=top;");b.geometry.relative=!0;b.setConnectable(!1);b.vertex=!0;a.insert(b);return c.createEdgeTemplateFromCells([a],160,0,"Relation 2")}),this.createEdgeTemplateEntry("endArrow=open;endSize=12;dashed=1;html=1;",160,
+!0;a.edge=!0;return b.createEdgeTemplateFromCells([a],80,0,"Return")}),this.addEntry("uml relation",function(){var a=new mxCell("name",new mxGeometry(0,0,0,0),"endArrow=block;endFill=1;html=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(160,0),!1);a.geometry.relative=!0;a.geometry.x=-1;a.edge=!0;var c=new mxCell("1",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+c.geometry.relative=!0;c.setConnectable(!1);c.vertex=!0;a.insert(c);return b.createEdgeTemplateFromCells([a],160,0,"Relation 1")}),this.addEntry("uml association",function(){var a=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(160,0),!1);a.geometry.relative=!0;a.edge=!0;var c=new mxCell("parent",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+c.geometry.relative=!0;c.setConnectable(!1);c.vertex=!0;a.insert(c);c=new mxCell("child",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");c.geometry.relative=!0;c.setConnectable(!1);c.vertex=!0;a.insert(c);return b.createEdgeTemplateFromCells([a],160,0,"Association 1")}),this.addEntry("uml aggregation",function(){var a=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");
+a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(160,0),!1);a.geometry.relative=!0;a.geometry.x=-1;a.geometry.y=3;a.edge=!0;return b.createEdgeTemplateFromCells([a],160,0,"Aggregation 1")}),this.addEntry("uml composition",function(){var a=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");a.geometry.setTerminalPoint(new mxPoint(0,
+0),!0);a.geometry.setTerminalPoint(new mxPoint(160,0),!1);a.geometry.relative=!0;a.geometry.x=-1;a.geometry.y=3;a.edge=!0;return b.createEdgeTemplateFromCells([a],160,0,"Composition 1")}),this.addEntry("uml relation",function(){var a=new mxCell("Relation",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;");a.geometry.setTerminalPoint(new mxPoint(0,0),!0);a.geometry.setTerminalPoint(new mxPoint(160,0),!1);a.geometry.relative=
+!0;a.edge=!0;var c=new mxCell("0..n",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=top;");c.geometry.relative=!0;c.setConnectable(!1);c.vertex=!0;a.insert(c);c=new mxCell("1",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=top;");c.geometry.relative=!0;c.setConnectable(!1);c.vertex=!0;a.insert(c);return b.createEdgeTemplateFromCells([a],160,0,"Relation 2")}),this.createEdgeTemplateEntry("endArrow=open;endSize=12;dashed=1;html=1;",160,
0,"Use","Dependency",null,"uml dependency use"),this.createEdgeTemplateEntry("endArrow=block;endSize=16;endFill=0;html=1;",160,0,"Extends","Generalization",null,"uml generalization extend"),this.createEdgeTemplateEntry("endArrow=block;startArrow=block;endFill=1;startFill=1;html=1;",160,0,"","Association 2",null,"uml association"),this.createEdgeTemplateEntry("endArrow=open;startArrow=circlePlus;endFill=0;startFill=0;endSize=8;html=1;",160,0,"","Inner Class",null,"uml inner class"),this.createEdgeTemplateEntry("endArrow=open;startArrow=cross;endFill=0;startFill=0;endSize=8;startSize=10;html=1;",
160,0,"","Terminate",null,"uml terminate"),this.createEdgeTemplateEntry("endArrow=block;dashed=1;endFill=0;endSize=12;html=1;",160,0,"","Implementation",null,"uml realization implementation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=0;endSize=24;html=1;",160,0,"","Aggregation 2",null,"uml aggregation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=1;endSize=24;html=1;",160,0,"","Composition 2",null,"uml composition"),this.createEdgeTemplateEntry("endArrow=open;endFill=1;endSize=12;html=1;",
-160,0,"","Association 3",null,"uml association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,d);this.setCurrentSearchEntryLibrary()};Sidebar.prototype.createTitle=function(a){var c=document.createElement("a");c.setAttribute("title",mxResources.get("sidebarTooltip"));c.className="geTitle";mxUtils.write(c,a);return c};
-Sidebar.prototype.createThumb=function(a,c,b,e,d,f,k,h,g){this.graph.labelsVisible=null==f||f;f=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();h=Math.floor(100*Math.min((c-2*this.thumbBorder)/a.width,(b-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(h,Math.floor((c-a.width*h)/2/h-a.x),Math.floor((b-a.height*h)/2/h-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG||
-mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(h=this.graph.container.cloneNode(!1),h.innerHTML=this.graph.container.innerHTML):h=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=f;h.style.position="relative";h.style.overflow="hidden";h.style.left=this.thumbBorder+"px";h.style.top=this.thumbBorder+"px";h.style.width=c+"px";h.style.height=b+"px";h.style.visibility="";h.style.minWidth="";h.style.minHeight="";e.appendChild(h);
-this.sidebarTitles&&null!=d&&0!=k&&(e.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",c=document.createElement("div"),c.style.fontSize=this.sidebarTitleSize+"px",c.style.color="#303030",c.style.textAlign="center",c.style.whiteSpace="nowrap",mxClient.IS_IE&&(c.style.height=this.sidebarTitleSize+12+"px"),c.style.paddingTop="4px",mxUtils.write(c,d),e.appendChild(c));return a};
-Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var c=document.createElement("div");c.setAttribute("title",a);c.style.textOverflow="ellipsis";c.style.whiteSpace="nowrap";c.style.textAlign="center";c.style.overflow="hidden";c.style.width="100%";c.style.padding="14px 0";mxUtils.write(c,a);return c})};
-Sidebar.prototype.createItem=function(a,c,b,e,d,f,k,h){h=null!=h?h:!0;var g=document.createElement("a");g.className="geItem";g.style.overflow="hidden";var l=2*this.thumbBorder;g.style.width=this.thumbWidth+l+"px";g.style.height=this.thumbHeight+l+"px";g.style.padding=this.thumbPadding+"px";mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});l=a;a=this.graph.cloneCells(a);this.editorUi.insertHandler(l,null,this.graph.model,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,
-!0,!0);this.createThumb(l,this.thumbWidth,this.thumbHeight,g,c,b,e,d,f);var m=new mxRectangle(0,0,d,f);1<a.length||a[0].vertex?(e=this.createDragSource(g,this.createDropHandler(a,!0,k,m),this.createDragPreview(d,f),a,m),this.addClickHandler(g,e,a),e.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(e=this.createDragSource(g,this.createDropHandler(a,!1,k,m),this.createDragPreview(d,f),a,m),this.addClickHandler(g,e,a));
-!mxClient.IS_IOS&&h&&mxEvent.addGestureListeners(g,null,mxUtils.bind(this,function(d){mxEvent.isMouseEvent(d)&&this.showTooltip(g,a,m.width,m.height,c,b)}));return g};
-Sidebar.prototype.updateShapes=function(a,c){var b=this.editorUi.editor.graph,e=b.getCellStyle(a),d=[];b.model.beginUpdate();try{for(var f=b.getModel().getStyle(a),k="shadow dashed dashPattern fontFamily fontSize fontColor align startFill startSize endFill endSize strokeColor strokeWidth fillColor gradientColor html part noEdgeStyle edgeStyle elbow childLayout recursiveResize container collapsible connectable comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),h=
-0;h<c.length;h++){var g=c[h];if(b.getModel().isVertex(g)==b.getModel().isVertex(a)||b.getModel().isEdge(g)==b.getModel().isEdge(a)){var l=b.getCurrentCellStyle(c[h]);b.getModel().setStyle(g,f);if("1"==mxUtils.getValue(l,"composite","0"))for(var m=b.model.getChildCount(g);0<=m;m--)b.model.remove(b.model.getChildAt(g,m));"umlLifeline"==l[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=e[mxConstants.STYLE_SHAPE]&&(b.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[g]),b.setCellStyles("participant",e[mxConstants.STYLE_SHAPE],
-[g]));for(m=0;m<k.length;m++){var n=l[k[m]];null!=n&&b.setCellStyles(k[m],n,[g])}d.push(g)}}}finally{b.model.endUpdate()}return d};
-Sidebar.prototype.createDropHandler=function(a,c,b,e){b=null!=b?b:!0;return mxUtils.bind(this,function(d,f,k,h,g,l){for(l=l?null:mxEvent.isTouchEvent(f)||mxEvent.isPenEvent(f)?document.elementFromPoint(mxEvent.getClientX(f),mxEvent.getClientY(f)):mxEvent.getSource(f);null!=l&&l!=this.container;)l=l.parentNode;if(null==l&&d.isEnabled()){a=d.getImportableCells(a);if(0<a.length){d.stopEditing();l=null==k||mxEvent.isAltDown(f)?!1:d.isValidDropTarget(k,a,f);var m=null;null==k||l||(k=null);if(!d.isCellLocked(k||
-d.getDefaultParent())){d.model.beginUpdate();try{h=Math.round(h);g=Math.round(g);if(c&&d.isSplitTarget(k,a,f)){var n=d.view.scale,p=d.view.translate,q=(h+p.x)*n,t=(g+p.y)*n,v=d.cloneCells(a);d.splitEdge(k,v,null,h-e.width/2,g-e.height/2,q,t);m=v}else 0<a.length&&(m=d.importCells(a,h,g,k));if(null!=d.layoutManager){var u=d.layoutManager.getLayout(k);if(null!=u)for(n=d.view.scale,p=d.view.translate,q=(h+p.x)*n,t=(g+p.y)*n,k=0;k<m.length;k++)u.moveCell(m[k],q,t)}!b||null!=f&&mxEvent.isShiftDown(f)||
-d.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(x){this.editorUi.handleError(x)}finally{d.model.endUpdate()}null!=m&&0<m.length&&(d.scrollCellToVisible(m[0]),d.setSelectionCells(m));d.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=m&&1==m.length&&window.setTimeout(function(){d.startEditing(m[0])},0)}}mxEvent.consume(f)}})};
-Sidebar.prototype.createDragPreview=function(a,c){var b=document.createElement("div");b.className="geDragPreview";b.style.width=a+"px";b.style.height=c+"px";return b};
-Sidebar.prototype.dropAndConnect=function(a,c,b,e,d){var f=this.getDropAndConnectGeometry(a,c[e],b,c),k=[];if(null!=f){var h=this.editorUi.editor.graph,g=null;h.model.beginUpdate();try{var l=h.getCellGeometry(a),m=h.getCellGeometry(c[e]),n=h.model.getParent(a),p=!0;if(null!=h.layoutManager){var q=h.layoutManager.getLayout(n);null!=q&&q.constructor==mxStackLayout&&(p=!1)}var k=h.model.isEdge(a)?null:h.view.getState(n),t=q=0;if(null!=k){var v=k.origin,q=v.x,t=v.y,u=f.getTerminalPoint(!1);null!=u&&(u.x+=
-v.x,u.y+=v.y)}var x=!h.isTableRow(a)&&!h.isTableCell(a)&&(h.model.isEdge(a)||null!=l&&!l.relative&&p),w=h.getCellAt((f.x+q+h.view.translate.x)*h.view.scale,(f.y+t+h.view.translate.y)*h.view.scale,null,null,null,function(a,b,c){return!h.isContainer(a.cell)});if(null!=w&&w!=n)k=h.view.getState(w),null!=k&&(v=k.origin,n=w,x=!0,h.model.isEdge(a)||(f.x-=v.x-q,f.y-=v.y-t));else if(!p||h.isTableRow(a)||h.isTableCell(a))f.x+=q,f.y+=t;q=m.x;t=m.y;h.model.isEdge(c[e])&&(t=q=0);k=c=h.importCells(c,f.x-(x?q:
-0),f.y-(x?t:0),x?n:null);if(h.model.isEdge(a))h.model.setTerminal(a,c[e],b==mxConstants.DIRECTION_NORTH);else if(h.model.isEdge(c[e])){h.model.setTerminal(c[e],a,!0);var A=h.getCellGeometry(c[e]);A.points=null;if(null!=A.getTerminalPoint(!1))A.setTerminalPoint(f.getTerminalPoint(!1),!1);else if(x&&h.model.isVertex(n)){var E=h.view.getState(n),v=E.cell!=h.view.currentRoot?E.origin:new mxPoint(0,0);h.cellsMoved(c,v.x,v.y,null,null,!0)}}else m=h.getCellGeometry(c[e]),q=f.x-Math.round(m.x),t=f.y-Math.round(m.y),
-f.x=Math.round(m.x),f.y=Math.round(m.y),h.model.setGeometry(c[e],f),h.cellsMoved(c,q,t,null,null,!0),k=c.slice(),g=1==k.length?k[0]:null,c.push(h.insertEdge(null,null,"",a,c[e],h.createCurrentEdgeStyle()));null!=d&&mxEvent.isShiftDown(d)||h.fireEvent(new mxEventObject("cellsInserted","cells",c))}catch(H){this.editorUi.handleError(H)}finally{h.model.endUpdate()}h.editAfterInsert&&null!=d&&mxEvent.isMouseEvent(d)&&null!=g&&window.setTimeout(function(){h.startEditing(g)},0)}return k};
-Sidebar.prototype.getDropAndConnectGeometry=function(a,c,b,e){var d=this.editorUi.editor.graph,f=d.view,k=1<e.length,h=d.getCellGeometry(a);e=d.getCellGeometry(c);null!=h&&null!=e&&(e=e.clone(),d.model.isEdge(a)?(a=d.view.getState(a),h=a.absolutePoints,c=h[0],d=h[h.length-1],b==mxConstants.DIRECTION_NORTH?(e.x=c.x/f.scale-f.translate.x-e.width/2,e.y=c.y/f.scale-f.translate.y-e.height/2):(e.x=d.x/f.scale-f.translate.x-e.width/2,e.y=d.y/f.scale-f.translate.y-e.height/2)):(h.relative&&(a=d.view.getState(a),
-h=h.clone(),h.x=(a.x-f.translate.x)/f.scale,h.y=(a.y-f.translate.y)/f.scale),f=d.defaultEdgeLength,d.model.isEdge(c)&&null!=e.getTerminalPoint(!0)&&null!=e.getTerminalPoint(!1)?(c=e.getTerminalPoint(!0),d=e.getTerminalPoint(!1),f=d.x-c.x,c=d.y-c.y,f=Math.sqrt(f*f+c*c),e.x=h.getCenterX(),e.y=h.getCenterY(),e.width=1,e.height=1,b==mxConstants.DIRECTION_NORTH?(e.height=f,e.y=h.y-f,e.setTerminalPoint(new mxPoint(e.x,e.y),!1)):b==mxConstants.DIRECTION_EAST?(e.width=f,e.x=h.x+h.width,e.setTerminalPoint(new mxPoint(e.x+
-e.width,e.y),!1)):b==mxConstants.DIRECTION_SOUTH?(e.height=f,e.y=h.y+h.height,e.setTerminalPoint(new mxPoint(e.x,e.y+e.height),!1)):b==mxConstants.DIRECTION_WEST&&(e.width=f,e.x=h.x-f,e.setTerminalPoint(new mxPoint(e.x,e.y),!1))):(!k&&45<e.width&&45<e.height&&45<h.width&&45<h.height&&(e.width*=h.height/e.height,e.height=h.height),e.x=h.x+h.width/2-e.width/2,e.y=h.y+h.height/2-e.height/2,b==mxConstants.DIRECTION_NORTH?e.y=e.y-h.height/2-e.height/2-f:b==mxConstants.DIRECTION_EAST?e.x=e.x+h.width/2+
-e.width/2+f:b==mxConstants.DIRECTION_SOUTH?e.y=e.y+h.height/2+e.height/2+f:b==mxConstants.DIRECTION_WEST&&(e.x=e.x-h.width/2-e.width/2-f),d.model.isEdge(c)&&null!=e.getTerminalPoint(!0)&&null!=c.getTerminal(!1)&&(h=d.getCellGeometry(c.getTerminal(!1)),null!=h&&(b==mxConstants.DIRECTION_NORTH?(e.x-=h.getCenterX(),e.y-=h.getCenterY()+h.height/2):b==mxConstants.DIRECTION_EAST?(e.x-=h.getCenterX()-h.width/2,e.y-=h.getCenterY()):b==mxConstants.DIRECTION_SOUTH?(e.x-=h.getCenterX(),e.y-=h.getCenterY()-h.height/
-2):b==mxConstants.DIRECTION_WEST&&(e.x-=h.getCenterX()+h.width/2,e.y-=h.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,c){var b=!0;if(null!=c&&1==a.length){var e=this.graph.getCellStyle(a[c]);null!=e&&(b=mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE)}return b};
+160,0,"","Association 3",null,"uml association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,c);this.setCurrentSearchEntryLibrary()};Sidebar.prototype.createTitle=function(a){var b=document.createElement("a");b.setAttribute("title",mxResources.get("sidebarTooltip"));b.className="geTitle";mxUtils.write(b,a);return b};
+Sidebar.prototype.createThumb=function(a,b,d,e,c,f,k,h,g){this.graph.labelsVisible=null==f||f;f=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();h=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(d-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(h,Math.floor((b-a.width*h)/2/h-a.x),Math.floor((d-a.height*h)/2/h-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG||
+mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(h=this.graph.container.cloneNode(!1),h.innerHTML=this.graph.container.innerHTML):h=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=f;h.style.position="relative";h.style.overflow="hidden";h.style.left=this.thumbBorder+"px";h.style.top=this.thumbBorder+"px";h.style.width=b+"px";h.style.height=d+"px";h.style.visibility="";h.style.minWidth="";h.style.minHeight="";e.appendChild(h);
+this.sidebarTitles&&null!=c&&0!=k&&(e.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.fontSize=this.sidebarTitleSize+"px",b.style.color="#303030",b.style.textAlign="center",b.style.whiteSpace="nowrap",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,c),e.appendChild(b));return a};
+Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var b=document.createElement("div");b.setAttribute("title",a);b.style.textOverflow="ellipsis";b.style.whiteSpace="nowrap";b.style.textAlign="center";b.style.overflow="hidden";b.style.width="100%";b.style.padding="14px 0";mxUtils.write(b,a);return b})};
+Sidebar.prototype.createItem=function(a,b,d,e,c,f,k,h){h=null!=h?h:!0;var g=document.createElement("a");g.className="geItem";g.style.overflow="hidden";var l=2*this.thumbBorder;g.style.width=this.thumbWidth+l+"px";g.style.height=this.thumbHeight+l+"px";g.style.padding=this.thumbPadding+"px";mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});l=a;a=this.graph.cloneCells(a);this.editorUi.insertHandler(l,null,this.graph.model,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,
+!0,!0);this.createThumb(l,this.thumbWidth,this.thumbHeight,g,b,d,e,c,f);var m=new mxRectangle(0,0,c,f);1<a.length||a[0].vertex?(e=this.createDragSource(g,this.createDropHandler(a,!0,k,m),this.createDragPreview(c,f),a,m),this.addClickHandler(g,e,a),e.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(e=this.createDragSource(g,this.createDropHandler(a,!1,k,m),this.createDragPreview(c,f),a,m),this.addClickHandler(g,e,a));
+!mxClient.IS_IOS&&h&&mxEvent.addGestureListeners(g,null,mxUtils.bind(this,function(c){mxEvent.isMouseEvent(c)&&this.showTooltip(g,a,m.width,m.height,b,d)}));return g};
+Sidebar.prototype.updateShapes=function(a,b){var d=this.editorUi.editor.graph,e=d.getCellStyle(a),c=[];d.model.beginUpdate();try{for(var f=d.getModel().getStyle(a),k="shadow dashed dashPattern fontFamily fontSize fontColor align startFill startSize endFill endSize strokeColor strokeWidth fillColor gradientColor html part noEdgeStyle edgeStyle elbow childLayout recursiveResize container collapsible connectable comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),h=
+0;h<b.length;h++){var g=b[h];if(d.getModel().isVertex(g)==d.getModel().isVertex(a)||d.getModel().isEdge(g)==d.getModel().isEdge(a)){var l=d.getCurrentCellStyle(b[h]);d.getModel().setStyle(g,f);if("1"==mxUtils.getValue(l,"composite","0"))for(var m=d.model.getChildCount(g);0<=m;m--)d.model.remove(d.model.getChildAt(g,m));"umlLifeline"==l[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=e[mxConstants.STYLE_SHAPE]&&(d.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[g]),d.setCellStyles("participant",e[mxConstants.STYLE_SHAPE],
+[g]));for(m=0;m<k.length;m++){var n=l[k[m]];null!=n&&d.setCellStyles(k[m],n,[g])}c.push(g)}}}finally{d.model.endUpdate()}return c};
+Sidebar.prototype.createDropHandler=function(a,b,d,e){d=null!=d?d:!0;return mxUtils.bind(this,function(c,f,k,h,g,l){for(l=l?null:mxEvent.isTouchEvent(f)||mxEvent.isPenEvent(f)?document.elementFromPoint(mxEvent.getClientX(f),mxEvent.getClientY(f)):mxEvent.getSource(f);null!=l&&l!=this.container;)l=l.parentNode;if(null==l&&c.isEnabled()){a=c.getImportableCells(a);if(0<a.length){c.stopEditing();l=null==k||mxEvent.isAltDown(f)?!1:c.isValidDropTarget(k,a,f);var m=null;null==k||l||(k=null);if(!c.isCellLocked(k||
+c.getDefaultParent())){c.model.beginUpdate();try{h=Math.round(h);g=Math.round(g);if(b&&c.isSplitTarget(k,a,f)){var n=c.view.scale,p=c.view.translate,q=(h+p.x)*n,u=(g+p.y)*n,v=c.cloneCells(a);c.splitEdge(k,v,null,h-e.width/2,g-e.height/2,q,u);m=v}else 0<a.length&&(m=c.importCells(a,h,g,k));if(null!=c.layoutManager){var t=c.layoutManager.getLayout(k);if(null!=t)for(n=c.view.scale,p=c.view.translate,q=(h+p.x)*n,u=(g+p.y)*n,k=0;k<m.length;k++)t.moveCell(m[k],q,u)}!d||null!=f&&mxEvent.isShiftDown(f)||
+c.fireEvent(new mxEventObject("cellsInserted","cells",m))}catch(x){this.editorUi.handleError(x)}finally{c.model.endUpdate()}null!=m&&0<m.length&&(c.scrollCellToVisible(m[0]),c.setSelectionCells(m));c.editAfterInsert&&null!=f&&mxEvent.isMouseEvent(f)&&null!=m&&1==m.length&&window.setTimeout(function(){c.startEditing(m[0])},0)}}mxEvent.consume(f)}})};
+Sidebar.prototype.createDragPreview=function(a,b){var d=document.createElement("div");d.className="geDragPreview";d.style.width=a+"px";d.style.height=b+"px";return d};
+Sidebar.prototype.dropAndConnect=function(a,b,d,e,c){var f=this.getDropAndConnectGeometry(a,b[e],d,b),k=[];if(null!=f){var h=this.editorUi.editor.graph,g=null;h.model.beginUpdate();try{var l=h.getCellGeometry(a),m=h.getCellGeometry(b[e]),n=h.model.getParent(a),p=!0;if(null!=h.layoutManager){var q=h.layoutManager.getLayout(n);null!=q&&q.constructor==mxStackLayout&&(p=!1)}var k=h.model.isEdge(a)?null:h.view.getState(n),u=q=0;if(null!=k){var v=k.origin,q=v.x,u=v.y,t=f.getTerminalPoint(!1);null!=t&&(t.x+=
+v.x,t.y+=v.y)}var x=!h.isTableRow(a)&&!h.isTableCell(a)&&(h.model.isEdge(a)||null!=l&&!l.relative&&p),w=h.getCellAt((f.x+q+h.view.translate.x)*h.view.scale,(f.y+u+h.view.translate.y)*h.view.scale,null,null,null,function(a,b,c){return!h.isContainer(a.cell)});if(null!=w&&w!=n)k=h.view.getState(w),null!=k&&(v=k.origin,n=w,x=!0,h.model.isEdge(a)||(f.x-=v.x-q,f.y-=v.y-u));else if(!p||h.isTableRow(a)||h.isTableCell(a))f.x+=q,f.y+=u;q=m.x;u=m.y;h.model.isEdge(b[e])&&(u=q=0);k=b=h.importCells(b,f.x-(x?q:
+0),f.y-(x?u:0),x?n:null);if(h.model.isEdge(a))h.model.setTerminal(a,b[e],d==mxConstants.DIRECTION_NORTH);else if(h.model.isEdge(b[e])){h.model.setTerminal(b[e],a,!0);var z=h.getCellGeometry(b[e]);z.points=null;if(null!=z.getTerminalPoint(!1))z.setTerminalPoint(f.getTerminalPoint(!1),!1);else if(x&&h.model.isVertex(n)){var E=h.view.getState(n),v=E.cell!=h.view.currentRoot?E.origin:new mxPoint(0,0);h.cellsMoved(b,v.x,v.y,null,null,!0)}}else m=h.getCellGeometry(b[e]),q=f.x-Math.round(m.x),u=f.y-Math.round(m.y),
+f.x=Math.round(m.x),f.y=Math.round(m.y),h.model.setGeometry(b[e],f),h.cellsMoved(b,q,u,null,null,!0),k=b.slice(),g=1==k.length?k[0]:null,b.push(h.insertEdge(null,null,"",a,b[e],h.createCurrentEdgeStyle()));null!=c&&mxEvent.isShiftDown(c)||h.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(G){this.editorUi.handleError(G)}finally{h.model.endUpdate()}h.editAfterInsert&&null!=c&&mxEvent.isMouseEvent(c)&&null!=g&&window.setTimeout(function(){h.startEditing(g)},0)}return k};
+Sidebar.prototype.getDropAndConnectGeometry=function(a,b,d,e){var c=this.editorUi.editor.graph,f=c.view,k=1<e.length,h=c.getCellGeometry(a);e=c.getCellGeometry(b);null!=h&&null!=e&&(e=e.clone(),c.model.isEdge(a)?(a=c.view.getState(a),h=a.absolutePoints,b=h[0],c=h[h.length-1],d==mxConstants.DIRECTION_NORTH?(e.x=b.x/f.scale-f.translate.x-e.width/2,e.y=b.y/f.scale-f.translate.y-e.height/2):(e.x=c.x/f.scale-f.translate.x-e.width/2,e.y=c.y/f.scale-f.translate.y-e.height/2)):(h.relative&&(a=c.view.getState(a),
+h=h.clone(),h.x=(a.x-f.translate.x)/f.scale,h.y=(a.y-f.translate.y)/f.scale),f=c.defaultEdgeLength,c.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=e.getTerminalPoint(!1)?(b=e.getTerminalPoint(!0),c=e.getTerminalPoint(!1),f=c.x-b.x,b=c.y-b.y,f=Math.sqrt(f*f+b*b),e.x=h.getCenterX(),e.y=h.getCenterY(),e.width=1,e.height=1,d==mxConstants.DIRECTION_NORTH?(e.height=f,e.y=h.y-f,e.setTerminalPoint(new mxPoint(e.x,e.y),!1)):d==mxConstants.DIRECTION_EAST?(e.width=f,e.x=h.x+h.width,e.setTerminalPoint(new mxPoint(e.x+
+e.width,e.y),!1)):d==mxConstants.DIRECTION_SOUTH?(e.height=f,e.y=h.y+h.height,e.setTerminalPoint(new mxPoint(e.x,e.y+e.height),!1)):d==mxConstants.DIRECTION_WEST&&(e.width=f,e.x=h.x-f,e.setTerminalPoint(new mxPoint(e.x,e.y),!1))):(!k&&45<e.width&&45<e.height&&45<h.width&&45<h.height&&(e.width*=h.height/e.height,e.height=h.height),e.x=h.x+h.width/2-e.width/2,e.y=h.y+h.height/2-e.height/2,d==mxConstants.DIRECTION_NORTH?e.y=e.y-h.height/2-e.height/2-f:d==mxConstants.DIRECTION_EAST?e.x=e.x+h.width/2+
+e.width/2+f:d==mxConstants.DIRECTION_SOUTH?e.y=e.y+h.height/2+e.height/2+f:d==mxConstants.DIRECTION_WEST&&(e.x=e.x-h.width/2-e.width/2-f),c.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(h=c.getCellGeometry(b.getTerminal(!1)),null!=h&&(d==mxConstants.DIRECTION_NORTH?(e.x-=h.getCenterX(),e.y-=h.getCenterY()+h.height/2):d==mxConstants.DIRECTION_EAST?(e.x-=h.getCenterX()-h.width/2,e.y-=h.getCenterY()):d==mxConstants.DIRECTION_SOUTH?(e.x-=h.getCenterX(),e.y-=h.getCenterY()-h.height/
+2):d==mxConstants.DIRECTION_WEST&&(e.x-=h.getCenterX()+h.width/2,e.y-=h.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,b){var d=!0;if(null!=b&&1==a.length){var e=this.graph.getCellStyle(a[b]);null!=e&&(d=mxUtils.getValue(e,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(e,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE)}return d};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};
-Sidebar.prototype.createDragSource=function(a,c,b,e,d){function f(a,b){var c;c=mxUtils.createImage(a.src);c.style.width=a.width+"px";c.style.height=a.height+"px";null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function k(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),J=d):mxUtils.setOpacity(d,d==z?30:20));return c}for(var h=this.editorUi,g=h.editor.graph,l=null,m=
-null,n=this,p=0;p<e.length&&(null==m&&g.model.isVertex(e[p])?m=p:null==l&&g.model.isEdge(e[p])&&null==g.model.getTerminal(e[p],!0)&&(l=p),null==m||null==l);p++);var q=this.isDropStyleEnabled(e,m),t=mxUtils.makeDraggable(a,g,mxUtils.bind(this,function(a,b,d,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=w&&J==z){var k=a.isCellSelected(w.cell)?a.getSelectionCells():[w.cell],k=this.updateShapes(a.model.isEdge(w.cell)?e[0]:e[m],k);a.setSelectionCells(k)}else null!=
-e&&null!=J&&null!=u&&J!=z?(k=a.model.isEdge(u.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(u.cell,e,O,k,b))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),b,0,0,g.autoscroll,!0,!0);g.addListener(mxEvent.ESCAPE,function(a,b){t.isActive()&&t.reset()});var v=t.mouseDown;t.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||g.isCellLocked(g.getDefaultParent())||(g.stopEditing(),
-v.apply(this,arguments))};var u=null,x=null,w=null,A=!1,E=f(this.triangleUp,mxResources.get("connect")),H=f(this.triangleRight,mxResources.get("connect")),D=f(this.triangleDown,mxResources.get("connect")),F=f(this.triangleLeft,mxResources.get("connect")),z=f(this.refreshTarget,mxResources.get("replace")),I=null,K=f(this.roundDrop),L=f(this.roundDrop),O=mxConstants.DIRECTION_NORTH,J=null,P=t.createPreviewElement;t.createPreviewElement=function(a){var b=P.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
-"none");this.previewElementWidth=b.style.width;this.previewElementHeight=b.style.height;return b};var aa=t.dragEnter;t.dragEnter=function(a,b){null!=h.hoverIcons&&h.hoverIcons.setDisplay("none");aa.apply(this,arguments)};var X=t.dragExit;t.dragExit=function(a,b){null!=h.hoverIcons&&h.hoverIcons.setDisplay("");X.apply(this,arguments)};t.dragOver=function(a,b){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=J&&this.currentGuide.hide();if(null!=this.previewElement){var c=
-a.view;if(null!=w&&J==z)this.previewElement.style.display=a.model.isEdge(w.cell)?"none":"",this.previewElement.style.left=w.x+"px",this.previewElement.style.top=w.y+"px",this.previewElement.style.width=w.width+"px",this.previewElement.style.height=w.height+"px";else if(null!=u&&null!=J){null!=t.currentHighlight&&null!=t.currentHighlight.state&&t.currentHighlight.hide();var f=a.model.isEdge(u.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(u.cell,e[f],O,e),k=a.model.isEdge(u.cell)?null:a.getCellGeometry(u.cell),
-h=a.getCellGeometry(e[f]),p=a.model.getParent(u.cell),q=c.translate.x*c.scale,v=c.translate.y*c.scale;null!=k&&!k.relative&&a.model.isVertex(p)&&p!=c.currentRoot&&(v=c.getState(p),q=v.x,v=v.y);k=h.x;h=h.y;a.model.isEdge(e[f])&&(h=k=0);this.previewElement.style.left=(g.x-k)*c.scale+q+"px";this.previewElement.style.top=(g.y-h)*c.scale+v+"px";1==e.length&&(this.previewElement.style.width=g.width*c.scale+"px",this.previewElement.style.height=g.height*c.scale+"px");this.previewElement.style.display=""}else null!=
-t.currentHighlight.state&&a.model.isEdge(t.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-d.width*c.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-d.height*c.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var Q=(new Date).getTime(),S=0,R=null,U=this.editorUi.editor.graph.getCellStyle(e[0]);
-t.getDropTarget=mxUtils.bind(this,function(a,b,c,d){var f=mxEvent.isAltDown(d)||null==e?null:a.getCellAt(b,c,null,null,null,function(b,c,d){return a.isContainer(b.cell)});if(null!=f&&!this.graph.isCellConnectable(f)&&!this.graph.model.isEdge(f)){var g=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(f=g)}a.isCellLocked(f)&&(f=null);var h=a.view.getState(f),g=J=null;R!=h?(Q=(new Date).getTime(),S=0,R=h,null!=this.updateThread&&window.clearTimeout(this.updateThread),
-null!=h&&(this.updateThread=window.setTimeout(function(){null==J&&(R=h,t.getDropTarget(a,b,c,d))},this.dropTargetDelay+10))):S=(new Date).getTime()-Q;if(q&&2500>S&&null!=h&&!mxEvent.isShiftDown(d)&&(mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(U,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(h.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,
+Sidebar.prototype.createDragSource=function(a,b,d,e,c){function f(a,b){var c;c=mxUtils.createImage(a.src);c.style.width=a.width+"px";c.style.height=a.height+"px";null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function k(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),J=d):mxUtils.setOpacity(d,d==y?30:20));return c}for(var h=this.editorUi,g=h.editor.graph,l=null,m=
+null,n=this,p=0;p<e.length&&(null==m&&g.model.isVertex(e[p])?m=p:null==l&&g.model.isEdge(e[p])&&null==g.model.getTerminal(e[p],!0)&&(l=p),null==m||null==l);p++);var q=this.isDropStyleEnabled(e,m),u=mxUtils.makeDraggable(a,g,mxUtils.bind(this,function(a,c,d,f,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=w&&J==y){var k=a.isCellSelected(w.cell)?a.getSelectionCells():[w.cell],k=this.updateShapes(a.model.isEdge(w.cell)?e[0]:e[m],k);a.setSelectionCells(k)}else null!=
+e&&null!=J&&null!=t&&J!=y?(k=a.model.isEdge(t.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(t.cell,e,O,k,c))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,g.autoscroll,!0,!0);g.addListener(mxEvent.ESCAPE,function(a,b){u.isActive()&&u.reset()});var v=u.mouseDown;u.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||g.isCellLocked(g.getDefaultParent())||(g.stopEditing(),
+v.apply(this,arguments))};var t=null,x=null,w=null,z=!1,E=f(this.triangleUp,mxResources.get("connect")),G=f(this.triangleRight,mxResources.get("connect")),D=f(this.triangleDown,mxResources.get("connect")),F=f(this.triangleLeft,mxResources.get("connect")),y=f(this.refreshTarget,mxResources.get("replace")),I=null,K=f(this.roundDrop),L=f(this.roundDrop),O=mxConstants.DIRECTION_NORTH,J=null,P=u.createPreviewElement;u.createPreviewElement=function(a){var b=P.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
+"none");this.previewElementWidth=b.style.width;this.previewElementHeight=b.style.height;return b};var ba=u.dragEnter;u.dragEnter=function(a,b){null!=h.hoverIcons&&h.hoverIcons.setDisplay("none");ba.apply(this,arguments)};var Y=u.dragExit;u.dragExit=function(a,b){null!=h.hoverIcons&&h.hoverIcons.setDisplay("");Y.apply(this,arguments)};u.dragOver=function(a,b){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=J&&this.currentGuide.hide();if(null!=this.previewElement){var d=
+a.view;if(null!=w&&J==y)this.previewElement.style.display=a.model.isEdge(w.cell)?"none":"",this.previewElement.style.left=w.x+"px",this.previewElement.style.top=w.y+"px",this.previewElement.style.width=w.width+"px",this.previewElement.style.height=w.height+"px";else if(null!=t&&null!=J){null!=u.currentHighlight&&null!=u.currentHighlight.state&&u.currentHighlight.hide();var f=a.model.isEdge(t.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(t.cell,e[f],O,e),k=a.model.isEdge(t.cell)?null:a.getCellGeometry(t.cell),
+h=a.getCellGeometry(e[f]),p=a.model.getParent(t.cell),q=d.translate.x*d.scale,v=d.translate.y*d.scale;null!=k&&!k.relative&&a.model.isVertex(p)&&p!=d.currentRoot&&(v=d.getState(p),q=v.x,v=v.y);k=h.x;h=h.y;a.model.isEdge(e[f])&&(h=k=0);this.previewElement.style.left=(g.x-k)*d.scale+q+"px";this.previewElement.style.top=(g.y-h)*d.scale+v+"px";1==e.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=
+u.currentHighlight.state&&a.model.isEdge(u.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-c.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-c.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var Q=(new Date).getTime(),S=0,R=null,U=this.editorUi.editor.graph.getCellStyle(e[0]);
+u.getDropTarget=mxUtils.bind(this,function(a,b,c,d){var f=mxEvent.isAltDown(d)||null==e?null:a.getCellAt(b,c,null,null,null,function(b,c,d){return a.isContainer(b.cell)});if(null!=f&&!this.graph.isCellConnectable(f)&&!this.graph.model.isEdge(f)){var g=this.graph.getModel().getParent(f);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(f=g)}a.isCellLocked(f)&&(f=null);var h=a.view.getState(f),g=J=null;R!=h?(Q=(new Date).getTime(),S=0,R=h,null!=this.updateThread&&window.clearTimeout(this.updateThread),
+null!=h&&(this.updateThread=window.setTimeout(function(){null==J&&(R=h,u.getDropTarget(a,b,c,d))},this.dropTargetDelay+10))):S=(new Date).getTime()-Q;if(q&&2500>S&&null!=h&&!mxEvent.isShiftDown(d)&&(mxUtils.getValue(h.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(U,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(h.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(h.style,
mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(U,mxConstants.STYLE_SHAPE)||1500<S||a.model.isEdge(h.cell))&&S>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(h)&&(a.model.isVertex(h.cell)&&null!=m||a.model.isEdge(h.cell)&&a.model.isEdge(e[0]))){if(a.isCellEditable(h.cell)){w=h;var l=a.model.isEdge(h.cell)?a.view.getPoint(h):new mxPoint(h.getCenterX(),h.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/
-2,this.refreshTarget.width,this.refreshTarget.height);z.style.left=Math.floor(l.x)+"px";z.style.top=Math.floor(l.y)+"px";null==I&&(a.container.appendChild(z),I=z.parentNode);k(b,c,l,z)}}else null==w||!mxUtils.contains(w,b,c)||1500<S&&!mxEvent.isShiftDown(d)?(w=null,null!=I&&(z.parentNode.removeChild(z),I=null)):null!=w&&null!=I&&(l=a.model.isEdge(w.cell)?a.view.getPoint(w):new mxPoint(w.getCenterX(),w.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,
-this.refreshTarget.height),k(b,c,l,z));if(A&&null!=u&&!mxEvent.isAltDown(d)&&null==J){g=mxRectangle.fromRectangle(u);if(a.model.isEdge(u.cell)){var n=u.absolutePoints;null!=K.parentNode&&(l=n[0],g.add(k(b,c,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)));null!=L.parentNode&&(n=n[n.length-1],g.add(k(b,c,new mxRectangle(n.x-this.roundDrop.width/2,n.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)))}else l=
-mxRectangle.fromRectangle(u),null!=u.shape&&null!=u.shape.boundingBox&&(l=mxRectangle.fromRectangle(u.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),n=this.graph.selectionCellsHandler.getHandler(u.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/2,l.width+=n.horizontalOffset,l.height+=n.verticalOffset,null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&
-null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),g.add(k(b,c,new mxRectangle(u.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),E)),g.add(k(b,c,new mxRectangle(l.x+l.width,u.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),H)),g.add(k(b,c,new mxRectangle(u.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),D)),g.add(k(b,c,
-new mxRectangle(l.x-this.triangleLeft.width,u.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),F));null!=g&&g.grow(10)}O=mxConstants.DIRECTION_NORTH;J==H?O=mxConstants.DIRECTION_EAST:J==D||J==L?O=mxConstants.DIRECTION_SOUTH:J==F&&(O=mxConstants.DIRECTION_WEST);null!=w&&J==z&&(h=w);l=(null==m||a.isCellConnectable(e[m]))&&(a.model.isEdge(f)&&null!=m||a.model.isVertex(f)&&a.isCellConnectable(f));if(null!=u&&5E3<=S||u!=h&&(null==g||!mxUtils.contains(g,b,c)||500<
-S&&null==J&&l))if(A=!1,u=5E3>S&&S>this.dropTargetDelay||a.model.isEdge(f)?h:null,null!=u&&l){g=[K,L,E,H,D,F];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(f)?(n=h.absolutePoints,null!=n&&(l=n[0],n=n[n.length-1],g=a.tolerance,new mxRectangle(b-g,c-g,2*g,2*g),K.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",L.style.left=Math.floor(n.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(n.y-
+2,this.refreshTarget.width,this.refreshTarget.height);y.style.left=Math.floor(l.x)+"px";y.style.top=Math.floor(l.y)+"px";null==I&&(a.container.appendChild(y),I=y.parentNode);k(b,c,l,y)}}else null==w||!mxUtils.contains(w,b,c)||1500<S&&!mxEvent.isShiftDown(d)?(w=null,null!=I&&(y.parentNode.removeChild(y),I=null)):null!=w&&null!=I&&(l=a.model.isEdge(w.cell)?a.view.getPoint(w):new mxPoint(w.getCenterX(),w.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,
+this.refreshTarget.height),k(b,c,l,y));if(z&&null!=t&&!mxEvent.isAltDown(d)&&null==J){g=mxRectangle.fromRectangle(t);if(a.model.isEdge(t.cell)){var n=t.absolutePoints;null!=K.parentNode&&(l=n[0],g.add(k(b,c,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)));null!=L.parentNode&&(n=n[n.length-1],g.add(k(b,c,new mxRectangle(n.x-this.roundDrop.width/2,n.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)))}else l=
+mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(l=mxRectangle.fromRectangle(t.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),n=this.graph.selectionCellsHandler.getHandler(t.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/2,l.width+=n.horizontalOffset,l.height+=n.verticalOffset,null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&
+null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),g.add(k(b,c,new mxRectangle(t.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),E)),g.add(k(b,c,new mxRectangle(l.x+l.width,t.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),G)),g.add(k(b,c,new mxRectangle(t.getCenterX()-this.triangleDown.width/2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),D)),g.add(k(b,c,
+new mxRectangle(l.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),F));null!=g&&g.grow(10)}O=mxConstants.DIRECTION_NORTH;J==G?O=mxConstants.DIRECTION_EAST:J==D||J==L?O=mxConstants.DIRECTION_SOUTH:J==F&&(O=mxConstants.DIRECTION_WEST);null!=w&&J==y&&(h=w);l=(null==m||a.isCellConnectable(e[m]))&&(a.model.isEdge(f)&&null!=m||a.model.isVertex(f)&&a.isCellConnectable(f));if(null!=t&&5E3<=S||t!=h&&(null==g||!mxUtils.contains(g,b,c)||500<
+S&&null==J&&l))if(z=!1,t=5E3>S&&S>this.dropTargetDelay||a.model.isEdge(f)?h:null,null!=t&&l){g=[K,L,E,G,D,F];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(f)?(n=h.absolutePoints,null!=n&&(l=n[0],n=n[n.length-1],g=a.tolerance,new mxRectangle(b-g,c-g,2*g,2*g),K.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",L.style.left=Math.floor(n.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(n.y-
this.roundDrop.height/2)+"px",null==a.model.getTerminal(f,!0)&&a.container.appendChild(K),null==a.model.getTerminal(f,!1)&&a.container.appendChild(L))):(l=mxRectangle.fromRectangle(h),null!=h.shape&&null!=h.shape.boundingBox&&(l=mxRectangle.fromRectangle(h.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),n=this.graph.selectionCellsHandler.getHandler(h.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/2,l.width+=n.horizontalOffset,l.height+=n.verticalOffset,
-null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),E.style.left=Math.floor(h.getCenterX()-this.triangleUp.width/2)+"px",E.style.top=Math.floor(l.y-this.triangleUp.height)+"px",H.style.left=Math.floor(l.x+l.width)+"px",H.style.top=Math.floor(h.getCenterY()-this.triangleRight.height/2)+"px",D.style.left=E.style.left,D.style.top=Math.floor(l.y+
-l.height)+"px",F.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",F.style.top=H.style.top,"eastwest"!=h.style.portConstraint&&(a.container.appendChild(E),a.container.appendChild(D)),a.container.appendChild(H),a.container.appendChild(F));null!=h&&(x=a.selectionCellsHandler.getHandler(h.cell),null!=x&&null!=x.setHandlesVisible&&x.setHandlesVisible(!1));A=!0}else for(g=[K,L,E,H,D,F],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);A||null==x||x.setHandlesVisible(!0);
-f=mxEvent.isAltDown(d)&&!mxEvent.isShiftDown(d)||null!=w&&J==z?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=f&&(null!=J||!a.isSplitTarget(f,e,d))){for(;null!=f&&!a.isValidDropTarget(f,e,d)&&g.isVertex(g.getParent(f));)f=g.getParent(f);null!=f&&(a.view.currentRoot==f||!a.isValidRoot(f)&&0==a.getModel().getChildCount(f)||a.isCellLocked(f)||g.isEdge(f)||!a.isValidDropTarget(f,e,d))&&(f=null)}a.isCellLocked(f)&&(f=null);return f});t.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
-arguments);for(var a=[K,L,z,E,H,D,F],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=u&&null!=x&&x.reset();J=I=w=u=x=null};return t};
-Sidebar.prototype.itemClicked=function(a,c,b,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(b)&&1==e.getSelectionCount()&&e.model.isVertex(e.getSelectionCell())){c=null;for(var d=0;d<a.length&&null==c;d++)e.model.isVertex(a[d])&&(c=d);null!=c&&(e.setSelectionCells(this.dropAndConnect(e.getSelectionCell(),a,mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)?mxEvent.isShiftDown(b)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(b)?mxConstants.DIRECTION_EAST:
-mxConstants.DIRECTION_SOUTH,c,b)),e.scrollCellToVisible(e.getSelectionCell()))}else mxEvent.isShiftDown(b)&&!e.isSelectionEmpty()?(b=e.getEditableCells(e.getSelectionCells()),this.updateShapes(a[0],b),e.scrollCellToVisible(b)):(a=mxEvent.isAltDown(b)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(a,!0)),c.drop(e,b,null,a.x,a.y,!0))};
-Sidebar.prototype.addClickHandler=function(a,c,b){var e=c.mouseDown,d=c.mouseMove,f=c.mouseUp,k=this.editorUi.editor.graph.tolerance,h=null,g=this;c.mouseDown=function(b){e.apply(this,arguments);h=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};c.mouseMove=function(b){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=h&&(Math.abs(h.x-mxEvent.getClientX(b))>k||Math.abs(h.y-mxEvent.getClientY(b))>
-k)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));d.apply(this,arguments)};c.mouseUp=function(d){try{mxEvent.isPopupTrigger(d)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||g.itemClicked(b,c,d,a),f.apply(c,arguments),mxUtils.setOpacity(a,100),h=null,g.currentElt=a}catch(m){c.reset(),g.editorUi.handleError(m)}}};
-Sidebar.prototype.createVertexTemplateEntry=function(a,c,b,e,d,f,k,h){h=null!=h&&0<h.length?h:null!=d?d.toLowerCase():"";return this.addEntry(h,mxUtils.bind(this,function(){return this.createVertexTemplate(a,c,b,e,d,f,k)}))};Sidebar.prototype.createVertexTemplate=function(a,c,b,e,d,f,k,h,g){a=[new mxCell(null!=e?e:"",new mxGeometry(0,0,c,b),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,c,b,d,f,k,h,g)};
-Sidebar.prototype.createVertexTemplateFromData=function(a,c,b,e,d,f,k,h){a=mxUtils.parseXml(Graph.decompress(a));var g=new mxCodec(a),l=new mxGraphModel;g.decode(a.documentElement,l);a=this.graph.cloneCells(l.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,c,b,e,d,f,k,h)};Sidebar.prototype.createVertexTemplateFromCells=function(a,c,b,e,d,f,k,h){return this.createItem(a,e,d,f,c,b,k,h)};
-Sidebar.prototype.createEdgeTemplateEntry=function(a,c,b,e,d,f,k,h,g){k=null!=k&&0<k.length?k:d.toLowerCase();return this.addEntry(k,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,c,b,e,d,f,h,g)}))};
-Sidebar.prototype.createEdgeTemplate=function(a,c,b,e,d,f,k,h){a=new mxCell(null!=e?e:"",new mxGeometry(0,0,c,b),a);a.geometry.setTerminalPoint(new mxPoint(0,b),!0);a.geometry.setTerminalPoint(new mxPoint(c,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],c,b,d,f,k,h)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,c,b,e,d,f,k){return this.createItem(a,e,d,!0,c,b,f,k)};
-Sidebar.prototype.addPaletteFunctions=function(a,c,b,e){this.addPalette(a,c,b,mxUtils.bind(this,function(a){for(var b=0;b<e.length;b++)a.appendChild(e[b](a))}))};
-Sidebar.prototype.addPalette=function(a,c,b,e){c=this.createTitle(c);this.container.appendChild(c);var d=document.createElement("div");d.className="geSidebar";mxClient.IS_POINTER&&(d.style.touchAction="none");b?(e(d),e=null):d.style.display="none";this.addFoldingHandler(c,d,e);b=document.createElement("div");b.appendChild(d);this.container.appendChild(b);null!=a&&(this.palettes[a]=[c,b]);return d};
-Sidebar.prototype.addFoldingHandler=function(a,c,b){var e=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==c.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(d){if("none"==c.style.display){if(e)c.style.display="block";else if(e=!0,null!=b){a.style.cursor="wait";var f=a.innerHTML;a.innerHTML=mxResources.get("loading")+
-"...";window.setTimeout(function(){c.style.display="block";a.style.cursor="";a.innerHTML=f;var d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;b(c,a);mxClient.NO_FO=d},mxClient.IS_FF?20:0)}else c.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",c.style.display="none";mxEvent.consume(d)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}))};
-Sidebar.prototype.removePalette=function(a){var c=this.palettes[a];if(null!=c){this.palettes[a]=null;for(a=0;a<c.length;a++)this.container.removeChild(c[a]);return!0}return!1};
-Sidebar.prototype.addImagePalette=function(a,c,b,e,d,f,k){for(var h=[],g=0;g<d.length;g++)mxUtils.bind(this,function(a,c,d){if(null==d){d=a.lastIndexOf("/");var f=a.lastIndexOf(".");d=a.substring(0<=d?d+1:0,0<=f?f:a.length).replace(/[-_]/g," ")}h.push(this.createVertexTemplateEntry("image;html=1;image="+b+a+e,this.defaultImageWidth,this.defaultImageHeight,"",c,null!=c,null,this.filterTags(d)))})(d[g],null!=f?f[g]:null,null!=k?k[d[g]]:null);this.addPaletteFunctions(a,c,!1,h)};
-Sidebar.prototype.getTagsForStencil=function(a,c,b){a=a.split(".");for(var e=1;e<a.length;e++)a[e]=a[e].replace(/_/g," ");a.push(c.replace(/_/g," "));null!=b&&a.push(b);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,c,b,e,d,f,k,h,g,l){k=null!=k?k:1;if(this.addStencilsToIndex){var m=[];if(null!=g)for(l=0;l<g.length;l++)m.push(g[l]);mxStencilRegistry.loadStencilSet(b,mxUtils.bind(this,function(a,b,c,f,g){if(null==d||0>mxUtils.indexOf(d,b)){c=this.getTagsForStencil(a,b);var l=null!=h?h[b]:null;null!=l&&c.push(l);m.push(this.createVertexTemplateEntry("shape="+a+b.toLowerCase()+e,Math.round(f*k),Math.round(g*k),"",b.replace(/_/g," "),null,null,this.filterTags(c.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,c,!1,m)}else this.addPalette(a,c,!1,mxUtils.bind(this,function(a){null==e&&(e="");null!=f&&f.call(this,a);if(null!=g)for(var c=0;c<g.length;c++)g[c](a);mxStencilRegistry.loadStencilSet(b,mxUtils.bind(this,function(b,c,f,g,h){(null==d||0>mxUtils.indexOf(d,c))&&a.appendChild(this.createVertexTemplate("shape="+b+c.toLowerCase()+e,Math.round(g*k),Math.round(h*k),"",c.replace(/_/g," "),!0))}),!0)}))};
+null!=n.rotationShape&&null!=n.rotationShape.node&&"hidden"!=n.rotationShape.node.style.visibility&&"none"!=n.rotationShape.node.style.display&&null!=n.rotationShape.boundingBox&&l.add(n.rotationShape.boundingBox)),E.style.left=Math.floor(h.getCenterX()-this.triangleUp.width/2)+"px",E.style.top=Math.floor(l.y-this.triangleUp.height)+"px",G.style.left=Math.floor(l.x+l.width)+"px",G.style.top=Math.floor(h.getCenterY()-this.triangleRight.height/2)+"px",D.style.left=E.style.left,D.style.top=Math.floor(l.y+
+l.height)+"px",F.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",F.style.top=G.style.top,"eastwest"!=h.style.portConstraint&&(a.container.appendChild(E),a.container.appendChild(D)),a.container.appendChild(G),a.container.appendChild(F));null!=h&&(x=a.selectionCellsHandler.getHandler(h.cell),null!=x&&null!=x.setHandlesVisible&&x.setHandlesVisible(!1));z=!0}else for(g=[K,L,E,G,D,F],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);z||null==x||x.setHandlesVisible(!0);
+f=mxEvent.isAltDown(d)&&!mxEvent.isShiftDown(d)||null!=w&&J==y?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=f&&(null!=J||!a.isSplitTarget(f,e,d))){for(;null!=f&&!a.isValidDropTarget(f,e,d)&&g.isVertex(g.getParent(f));)f=g.getParent(f);null!=f&&(a.view.currentRoot==f||!a.isValidRoot(f)&&0==a.getModel().getChildCount(f)||a.isCellLocked(f)||g.isEdge(f)||!a.isValidDropTarget(f,e,d))&&(f=null)}a.isCellLocked(f)&&(f=null);return f});u.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
+arguments);for(var a=[K,L,y,E,G,D,F],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=t&&null!=x&&x.reset();J=I=w=t=x=null};return u};
+Sidebar.prototype.itemClicked=function(a,b,d,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(d)&&1==e.getSelectionCount()&&e.model.isVertex(e.getSelectionCell())){b=null;for(var c=0;c<a.length&&null==b;c++)e.model.isVertex(a[c])&&(b=c);null!=b&&(e.setSelectionCells(this.dropAndConnect(e.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:
+mxConstants.DIRECTION_SOUTH,b,d)),e.scrollCellToVisible(e.getSelectionCell()))}else mxEvent.isShiftDown(d)&&!e.isSelectionEmpty()?(d=e.getEditableCells(e.getSelectionCells()),this.updateShapes(a[0],d),e.scrollCellToVisible(d)):(a=mxEvent.isAltDown(d)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(a,!0)),b.drop(e,d,null,a.x,a.y,!0))};
+Sidebar.prototype.addClickHandler=function(a,b,d){var e=b.mouseDown,c=b.mouseMove,f=b.mouseUp,k=this.editorUi.editor.graph.tolerance,h=null,g=this;b.mouseDown=function(b){e.apply(this,arguments);h=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(b){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=h&&(Math.abs(h.x-mxEvent.getClientX(b))>k||Math.abs(h.y-mxEvent.getClientY(b))>
+k)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));c.apply(this,arguments)};b.mouseUp=function(c){try{mxEvent.isPopupTrigger(c)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||g.itemClicked(d,b,c,a),f.apply(b,arguments),mxUtils.setOpacity(a,100),h=null,g.currentElt=a}catch(m){b.reset(),g.editorUi.handleError(m)}}};
+Sidebar.prototype.createVertexTemplateEntry=function(a,b,d,e,c,f,k,h){h=null!=h&&0<h.length?h:null!=c?c.toLowerCase():"";return this.addEntry(h,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,d,e,c,f,k)}))};Sidebar.prototype.createVertexTemplate=function(a,b,d,e,c,f,k,h,g){a=[new mxCell(null!=e?e:"",new mxGeometry(0,0,b,d),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,d,c,f,k,h,g)};
+Sidebar.prototype.createVertexTemplateFromData=function(a,b,d,e,c,f,k,h){a=mxUtils.parseXml(Graph.decompress(a));var g=new mxCodec(a),l=new mxGraphModel;g.decode(a.documentElement,l);a=this.graph.cloneCells(l.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,b,d,e,c,f,k,h)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,d,e,c,f,k,h){return this.createItem(a,e,c,f,b,d,k,h)};
+Sidebar.prototype.createEdgeTemplateEntry=function(a,b,d,e,c,f,k,h,g){k=null!=k&&0<k.length?k:c.toLowerCase();return this.addEntry(k,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,d,e,c,f,h,g)}))};
+Sidebar.prototype.createEdgeTemplate=function(a,b,d,e,c,f,k,h){a=new mxCell(null!=e?e:"",new mxGeometry(0,0,b,d),a);a.geometry.setTerminalPoint(new mxPoint(0,d),!0);a.geometry.setTerminalPoint(new mxPoint(b,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],b,d,c,f,k,h)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,d,e,c,f,k){return this.createItem(a,e,c,!0,b,d,f,k)};
+Sidebar.prototype.addPaletteFunctions=function(a,b,d,e){this.addPalette(a,b,d,mxUtils.bind(this,function(a){for(var b=0;b<e.length;b++)a.appendChild(e[b](a))}))};
+Sidebar.prototype.addPalette=function(a,b,d,e){b=this.createTitle(b);this.container.appendChild(b);var c=document.createElement("div");c.className="geSidebar";mxClient.IS_POINTER&&(c.style.touchAction="none");d?(e(c),e=null):c.style.display="none";this.addFoldingHandler(b,c,e);d=document.createElement("div");d.appendChild(c);this.container.appendChild(d);null!=a&&(this.palettes[a]=[b,d]);return c};
+Sidebar.prototype.addFoldingHandler=function(a,b,d){var e=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==b.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(c){if("none"==b.style.display){if(e)b.style.display="block";else if(e=!0,null!=d){a.style.cursor="wait";var f=a.innerHTML;a.innerHTML=mxResources.get("loading")+
+"...";window.setTimeout(function(){b.style.display="block";a.style.cursor="";a.innerHTML=f;var c=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;d(b,a);mxClient.NO_FO=c},mxClient.IS_FF?20:0)}else b.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",b.style.display="none";mxEvent.consume(c)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}))};
+Sidebar.prototype.removePalette=function(a){var b=this.palettes[a];if(null!=b){this.palettes[a]=null;for(a=0;a<b.length;a++)this.container.removeChild(b[a]);return!0}return!1};
+Sidebar.prototype.addImagePalette=function(a,b,d,e,c,f,k){for(var h=[],g=0;g<c.length;g++)mxUtils.bind(this,function(a,b,c){if(null==c){c=a.lastIndexOf("/");var f=a.lastIndexOf(".");c=a.substring(0<=c?c+1:0,0<=f?f:a.length).replace(/[-_]/g," ")}h.push(this.createVertexTemplateEntry("image;html=1;image="+d+a+e,this.defaultImageWidth,this.defaultImageHeight,"",b,null!=b,null,this.filterTags(c)))})(c[g],null!=f?f[g]:null,null!=k?k[c[g]]:null);this.addPaletteFunctions(a,b,!1,h)};
+Sidebar.prototype.getTagsForStencil=function(a,b,d){a=a.split(".");for(var e=1;e<a.length;e++)a[e]=a[e].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=d&&a.push(d);return a.slice(1,a.length)};
+Sidebar.prototype.addStencilPalette=function(a,b,d,e,c,f,k,h,g,l){k=null!=k?k:1;if(this.addStencilsToIndex){var m=[];if(null!=g)for(l=0;l<g.length;l++)m.push(g[l]);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(a,b,d,f,g){if(null==c||0>mxUtils.indexOf(c,b)){d=this.getTagsForStencil(a,b);var l=null!=h?h[b]:null;null!=l&&d.push(l);m.push(this.createVertexTemplateEntry("shape="+a+b.toLowerCase()+e,Math.round(f*k),Math.round(g*k),"",b.replace(/_/g," "),null,null,this.filterTags(d.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,b,!1,m)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(a){null==e&&(e="");null!=f&&f.call(this,a);if(null!=g)for(var b=0;b<g.length;b++)g[b](a);mxStencilRegistry.loadStencilSet(d,mxUtils.bind(this,function(b,d,f,g,h){(null==c||0>mxUtils.indexOf(c,d))&&a.appendChild(this.createVertexTemplate("shape="+b+d.toLowerCase()+e,Math.round(g*k),Math.round(h*k),"",d.replace(/_/g," "),!0))}),!0)}))};
Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),
-this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var a=[["nbsp","160"],["shy","173"]],c=mxUtils.parseXml;mxUtils.parseXml=function(b){for(var e=0;e<a.length;e++)b=b.replace(new RegExp("&"+a[e][0]+";","g"),"&#"+a[e][1]+";");return c(b)}})();
+this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(d){for(var e=0;e<a.length;e++)d=d.replace(new RegExp("&"+a[e][0]+";","g"),"&#"+a[e][1]+";");return b(d)}})();
Date.prototype.toISOString||function(){function a(a){a=String(a);1===a.length&&(a="0"+a);return a}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var a=Object.prototype.toString,c=function(b){return"function"===typeof b||"[object Function]"===a.call(b)},b=Math.pow(2,53)-1;return function(a){var d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var e=1<arguments.length?arguments[1]:void 0,k;if("undefined"!==typeof e){if(!c(e))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(k=
-arguments[2])}var h;h=Number(d.length);h=isNaN(h)?0:0!==h&&isFinite(h)?(0<h?1:-1)*Math.floor(Math.abs(h)):h;h=Math.min(Math.max(h,0),b);for(var g=c(this)?Object(new this(h)):Array(h),l=0,m;l<h;)m=d[l],g[l]=e?"undefined"===typeof k?e(m,l):e.call(k,m,l):m,l+=1;g.length=h;return g}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
-mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(c){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
+Uint8Array.from||(Uint8Array.from=function(){var a=Object.prototype.toString,b=function(b){return"function"===typeof b||"[object Function]"===a.call(b)},d=Math.pow(2,53)-1;return function(a){var c=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var e=1<arguments.length?arguments[1]:void 0,k;if("undefined"!==typeof e){if(!b(e))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(k=
+arguments[2])}var h;h=Number(c.length);h=isNaN(h)?0:0!==h&&isFinite(h)?(0<h?1:-1)*Math.floor(Math.abs(h)):h;h=Math.min(Math.max(h,0),d);for(var g=b(this)?Object(new this(h)):Array(h),l=0,m;l<h;)m=c[l],g[l]=e?"undefined"===typeof k?e(m,l):e.call(k,m,l):m,l+=1;g.length=h;return g}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";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,b){return null};
+mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,d){return null};
mxImageShape.prototype.getImageDataUri=function(){var a=this.image;if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a),this.clippedImage=a;a=this.clippedSvg}return a};
-Graph=function(a,c,b,e,d,f){mxGraph.call(this,a,c,b,e);this.themes=d||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=f?f:!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,b,d,e,c,f){mxGraph.call(this,a,b,d,e);this.themes=c||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=f?f:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var k=null,h=null,g=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event"),d=c.getState(),e=this.view.scale;if(!mxEvent.isAltDown(c.getEvent())&&null!=d)if(this.model.isEdge(d.cell))if(k=new mxPoint(c.getGraphX(),c.getGraphY()),m=this.isCellSelected(d.cell),g=d,h=c,null!=d.text&&null!=
d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,c.getGraphX(),c.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var f=this.selectionCellsHandler.getHandler(d.cell);null!=f&&null!=f.bends&&0<f.bends.length&&(l=f.getHandleForEvent(c))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(c.getEvent())&&(f=this.selectionCellsHandler.getHandler(d.cell),null==f||null==f.getHandleForEvent(c))){var n=new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);n.grow(mxEvent.isTouchEvent(c.getEvent())?mxShape.prototype.svgStrokeTolerance-
1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(d.cell)&&!this.isCellSelected(d.cell)){var p=this.model.getParent(d.cell),f=this.model.getParent(p);if(!this.isCellSelected(f)){var q=this.getCellGeometry(d.cell),q=null!=q.alternateBounds?q.alternateBounds:q;if(mxUtils.intersects(n,new mxRectangle(d.x,d.y-2,q.width*e,3))&&this.model.getChildAt(f,0)!=p||mxUtils.intersects(n,new mxRectangle(d.x,d.y+q.height-2,q.width,3))||mxUtils.intersects(n,new mxRectangle(d.x-2,d.y,2,q.height*e))&&
@@ -2575,39 +2575,39 @@ this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPa
function(){var a=n.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,d=this.graph.pageScale,e=c.width*d,c=c.height*d,d=this.graph.view.translate,f=this.graph.view.scale,g=this.graph.getPageLayout(),k=0;k<g.width;k++)b.push(new mxRectangle(((g.x+k)*e+d.x)*f,(g.y*c+d.y)*f,e*f,c*f));for(k=1;k<g.height;k++)b.push(new mxRectangle((g.x*e+d.x)*f,((g.y+k)*c+d.y)*f,e*f,c*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 p=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var b=p.apply(this,arguments),c=new mxDictionary,d=[],e=0;e<b.length;e++){var f=this.graph.isTableCell(a)&&this.graph.isTableCell(b[e])&&
this.graph.isCellSelected(b[e])?this.graph.model.getParent(b[e]):this.graph.isTableRow(a)&&this.graph.isTableRow(b[e])&&this.graph.isCellSelected(b[e])?b[e]:this.graph.getCompositeParent(b[e]);null==f||c.get(f)||(c.put(f,!0),d.push(f))}return d};var q=this.graphHandler.start;this.graphHandler.start=function(a,b,c,d){var e=!1;this.graph.isTableCell(a)&&(this.graph.isCellSelected(a)?e=!0:a=this.graph.model.getParent(a));e||this.graph.isTableRow(a)&&this.graph.isCellSelected(a)||(a=this.graph.getCompositeParent(a));
-q.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 v=(new Date).getTime(),u=0,x=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;x.apply(this,arguments);a!=this.currentState?(v=(new Date).getTime(),u=0):u=(new Date).getTime()-v};var w=
-this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<u||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&w.apply(this,arguments)};var A=this.isToggleEvent;this.isToggleEvent=function(a){return A.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var E=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return E.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 H=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(H=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=H)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var D=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 D.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getClickableLinkForCell(c),null!=c&&(this.isCustomLink(c)?
+q.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,b){b=this.graph.getCompositeParent(b);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var v=(new Date).getTime(),t=0,x=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;x.apply(this,arguments);a!=this.currentState?(v=(new Date).getTime(),t=0):t=(new Date).getTime()-v};var w=
+this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<t||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&w.apply(this,arguments)};var z=this.isToggleEvent;this.isToggleEvent=function(a){return z.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var E=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(a){return E.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 G=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(G=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=G)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var D=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 D.apply(this,arguments);var c=b?a.sourceState.cell:a.getCell();null!=c&&(c=this.getClickableLinkForCell(c),null!=c&&(this.isCustomLink(c)?
this.customLinkClicked(c):this.openLink(c)));this.isEnabled()&&b&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};var F=this.tooltipHandler.show;this.tooltipHandler.show=function(){F.apply(this,arguments);if(null!=this.div)for(var a=this.div.getElementsByTagName("a"),b=0;b<a.length;b++)null!=a[b].getAttribute("href")&&null==a[b].getAttribute("target")&&a[b].setAttribute("target","_blank")};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 z=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 z.apply(this,arguments)};this.selectRegion=function(a,b){var c=mxEvent.isAltDown(b)?a:null,c=this.getCells(a.x,
+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 y=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 y.apply(this,arguments)};this.selectRegion=function(a,b){var c=mxEvent.isAltDown(b)?a:null,c=this.getCells(a.x,
a.y,a.width,a.height,null,null,c,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")},!0);if(this.isToggleEvent(b))for(var d=0;d<c.length;d++)this.selectCellForEvent(c[d],b);else this.selectCellsForEvent(c,b);return c};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(;null!=a;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(a),
"locked","0"))return!0;a=this.model.getParent(a)}return!1};var K=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();K=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,
-mxEvent.getClientX(c),mxEvent.getClientY(c)),t.start(c.x,c.y)):null!=K?this.addSelectionCells(K):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);K=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){var c=a.view.graph;return b&&(c.isCellSelected(a.cell)||c.isTableRow(a.cell)&&c.selectionCellsHandler.isHandled(c.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
+mxEvent.getClientX(c),mxEvent.getClientY(c)),u.start(c.x,c.y)):null!=K?this.addSelectionCells(K):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);K=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){var c=a.view.graph;return b&&(c.isCellSelected(a.cell)||c.isTableRow(a.cell)&&c.selectionCellsHandler.isHandled(c.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,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var L=this.updateMouseEvent;this.updateMouseEvent=function(a){a=L.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
-Graph.createOffscreenGraph=function(a){var c=new Graph(document.createElement("div"));c.stylesheet.styles=mxUtils.clone(a.styles);c.resetViewOnRootChange=!1;c.setConnectable(!1);c.gridEnabled=!1;c.autoScroll=!1;c.setTooltips(!1);c.setEnabled(!1);c.container.style.visibility="hidden";c.container.style.position="absolute";c.container.style.overflow="hidden";c.container.style.height="1px";c.container.style.width="1px";return c};
-Graph.createSvgImage=function(a,c,b,e,d){b=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+c+'px" '+(null!=e&&null!=d?'viewBox="0 0 '+e+" "+d+'" ':"")+'version="1.1">'+b+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(b):Base64.encode(b,!0)),a,c)};
-Graph.zapGremlins=function(a){for(var c=0,b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&65535!=d&&65534!=d||(b.push(a.substring(c,e)),c=e+1)}0<c&&c<a.length&&b.push(a.substring(c));return 0==b.length?a:b.join("")};Graph.stringToBytes=function(a){for(var c=Array(a.length),b=0;b<a.length;b++)c[b]=a.charCodeAt(b);return c};Graph.bytesToString=function(a){for(var c=Array(a.length),b=0;b<a.length;b++)c[b]=String.fromCharCode(a[b]);return c.join("")};
-Graph.base64EncodeUnicode=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(a,b){return String.fromCharCode(parseInt(b,16))}))};Graph.base64DecodeUnicode=function(a){return decodeURIComponent(Array.prototype.map.call(atob(a),function(a){return"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(a,c){var b=mxUtils.getXml(a);return Graph.compress(c?b:Graph.zapGremlins(b))};
-Graph.arrayBufferToString=function(a){var c="";a=new Uint8Array(a);for(var b=a.byteLength,e=0;e<b;e++)c+=String.fromCharCode(a[e]);return c};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(a){return a.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(a,c,b){var e=c.charCodeAt(0),d=1,f=-1;for(b=b||0;b<a.byteLength;b++)if(a[b]==e){f=b;break}for(b=f+1;-1<f&&b<a.byteLength&&b<f+c.length-1;b++){if(a[b]!=c.charCodeAt(d))return Graph.arrayBufferIndexOfString(a,c,f+1);d++}return d==c.length-1?f:-1};Graph.compress=function(a,c){if(null==a||0==a.length||"undefined"===typeof pako)return a;var b=c?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
-Graph.decompress=function(a,c,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));c=decodeURIComponent(c?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return b?c:Graph.zapGremlins(c)};
-Graph.fadeNodes=function(a,c,b,e,d){d=null!=d?d:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,c);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+d+"ms ease-in-out");Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=e&&e()},d)},0)};Graph.setTransitionForNodes=function(a,c){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"transition",c)};
-Graph.setOpacityForNodes=function(a,c){for(var b=0;b<a.length;b++)a[b].style.opacity=c};Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling};Graph.sanitizeHtml=function(a,c){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};
-Graph.sanitizeSvg=function(a){for(var c=a.getElementsByTagName("*"),b=0;b<c.length;b++)for(var e=0;e<c[b].attributes.length;e++){var d=c[b].attributes[e];2<d.name.length&&"on"==d.name.toLowerCase().substring(0,2)&&c[b].removeAttribute(d.name)}for(a=a.getElementsByTagName("script");0<a.length;)a[0].parentNode.removeChild(a[0])};
-Graph.clipSvgDataUri=function(a){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var c=document.createElement("div");c.style.position="absolute";c.style.visibility="hidden";var b=decodeURIComponent(escape(atob(a.substring(26)))),e=b.indexOf("<svg");if(0<=e){c.innerHTML=b.substring(e);Graph.sanitizeSvg(c);var d=c.getElementsByTagName("svg");if(0<d.length){document.body.appendChild(c);try{var f=d[0].getBBox();0<f.width&&0<f.height&&(c.getElementsByTagName("svg")[0].setAttribute("viewBox",
-f.x+" "+f.y+" "+f.width+" "+f.height),c.getElementsByTagName("svg")[0].setAttribute("width",f.width),c.getElementsByTagName("svg")[0].setAttribute("height",f.height))}catch(k){}finally{document.body.removeChild(c)}a=Editor.createSvgDataUri(mxUtils.getXml(d[0]))}}}catch(k){}return a};
+Graph.createOffscreenGraph=function(a){var b=new Graph(document.createElement("div"));b.stylesheet.styles=mxUtils.clone(a.styles);b.resetViewOnRootChange=!1;b.setConnectable(!1);b.gridEnabled=!1;b.autoScroll=!1;b.setTooltips(!1);b.setEnabled(!1);b.container.style.visibility="hidden";b.container.style.position="absolute";b.container.style.overflow="hidden";b.container.style.height="1px";b.container.style.width="1px";return b};
+Graph.createSvgImage=function(a,b,d,e,c){d=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=e&&null!=c?'viewBox="0 0 '+e+" "+c+'" ':"")+'version="1.1">'+d+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0)),a,b)};
+Graph.zapGremlins=function(a){for(var b=0,d=[],e=0;e<a.length;e++){var c=a.charCodeAt(e);(32<=c||9==c||10==c||13==c)&&65535!=c&&65534!=c||(d.push(a.substring(b,e)),b=e+1)}0<b&&b<a.length&&d.push(a.substring(b));return 0==d.length?a:d.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=a.charCodeAt(d);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),d=0;d<a.length;d++)b[d]=String.fromCharCode(a[d]);return b.join("")};
+Graph.base64EncodeUnicode=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(a,d){return String.fromCharCode(parseInt(d,16))}))};Graph.base64DecodeUnicode=function(a){return decodeURIComponent(Array.prototype.map.call(atob(a),function(a){return"%"+("00"+a.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(a,b){var d=mxUtils.getXml(a);return Graph.compress(b?d:Graph.zapGremlins(d))};
+Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var d=a.byteLength,e=0;e<d;e++)b+=String.fromCharCode(a[e]);return b};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(a){return a.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(a,b,d){var e=b.charCodeAt(0),c=1,f=-1;for(d=d||0;d<a.byteLength;d++)if(a[d]==e){f=d;break}for(d=f+1;-1<f&&d<a.byteLength&&d<f+b.length-1;d++){if(a[d]!=b.charCodeAt(c))return Graph.arrayBufferIndexOfString(a,b,f+1);c++}return c==b.length-1?f:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var d=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(d)))};
+Graph.decompress=function(a,b,d){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return d?b:Graph.zapGremlins(b)};
+Graph.fadeNodes=function(a,b,d,e,c){c=null!=c?c:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+c+"ms ease-in-out");Graph.setOpacityForNodes(a,d);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=e&&e()},c)},0)};Graph.setTransitionForNodes=function(a,b){for(var d=0;d<a.length;d++)mxUtils.setPrefixedStyle(a[d].style,"transition",b)};
+Graph.setOpacityForNodes=function(a,b){for(var d=0;d<a.length;d++)a[d].style.opacity=b};Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling};Graph.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};
+Graph.sanitizeSvg=function(a){for(var b=a.getElementsByTagName("*"),d=0;d<b.length;d++)for(var e=0;e<b[d].attributes.length;e++){var c=b[d].attributes[e];2<c.name.length&&"on"==c.name.toLowerCase().substring(0,2)&&b[d].removeAttribute(c.name)}for(a=a.getElementsByTagName("script");0<a.length;)a[0].parentNode.removeChild(a[0])};
+Graph.clipSvgDataUri=function(a){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var b=document.createElement("div");b.style.position="absolute";b.style.visibility="hidden";var d=decodeURIComponent(escape(atob(a.substring(26)))),e=d.indexOf("<svg");if(0<=e){b.innerHTML=d.substring(e);Graph.sanitizeSvg(b);var c=b.getElementsByTagName("svg");if(0<c.length){document.body.appendChild(b);try{var f=c[0].getBBox();0<f.width&&0<f.height&&(b.getElementsByTagName("svg")[0].setAttribute("viewBox",
+f.x+" "+f.y+" "+f.width+" "+f.height),b.getElementsByTagName("svg")[0].setAttribute("width",f.width),b.getElementsByTagName("svg")[0].setAttribute("height",f.height))}catch(k){}finally{document.body.removeChild(b)}a=Editor.createSvgDataUri(mxUtils.getXml(c[0]))}}}catch(k){}return a};
Graph.stripQuotes=function(a){null!=a&&("'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),'"'==a.charAt(0)&&(a=a.substring(1)),'"'==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)));return a};
-Graph.createRemoveIcon=function(a,c){var b=document.createElement("img");b.setAttribute("src",Dialog.prototype.clearImage);b.setAttribute("title",a);b.setAttribute("width","13");b.setAttribute("height","10");b.style.marginLeft="4px";b.style.marginBottom="-1px";b.style.cursor="pointer";mxEvent.addListener(b,"click",c);return b};Graph.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
+Graph.createRemoveIcon=function(a,b){var d=document.createElement("img");d.setAttribute("src",Dialog.prototype.clearImage);d.setAttribute("title",a);d.setAttribute("width","13");d.setAttribute("height","10");d.style.marginLeft="4px";d.style.marginBottom="-1px";d.style.cursor="pointer";mxEvent.addListener(d,"click",b);return d};Graph.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled=!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.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.enableFlowAnimation=!1;
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,c){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,e=!0,k=null,h=mxUtils.bind(this,function(a){e=!0;k=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),g=mxUtils.bind(this,function(a){e=e&&null!=k&&Math.abs(k.x-mxEvent.getClientX(a))<b&&Math.abs(k.y-mxEvent.getClientY(a))<b}),l=mxUtils.bind(this,function(b){if(e)for(var d=mxEvent.getSource(b);null!=
-d&&d!=c.node;){if("a"==d.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,d,b);break}d=d.parentNode}});mxEvent.addGestureListeners(c.node,h,g,l);mxEvent.addListener(c.node,"click",function(a){mxEvent.consume(a)})};if(null!=this.tooltipHandler){var c=this.tooltipHandler.init;this.tooltipHandler.init=function(){c.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);"A"==b.nodeName&&(b=b.getAttribute("href"),null!=
-b&&this.graph.isCustomLink(b)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&this.graph.customLinkClicked(b)&&mxEvent.consume(a))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,c){if(null!=this.container&&this.flowAnimationStyle){var b=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(b)}}));this.initLayoutManager()};
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,b){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var c=a.view.graph.tolerance,d=!0,e=null,h=mxUtils.bind(this,function(a){d=!0;e=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),g=mxUtils.bind(this,function(a){d=d&&null!=e&&Math.abs(e.x-mxEvent.getClientX(a))<c&&Math.abs(e.y-mxEvent.getClientY(a))<c}),l=mxUtils.bind(this,function(c){if(d)for(var e=mxEvent.getSource(c);null!=
+e&&e!=b.node;){if("a"==e.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,e,c);break}e=e.parentNode}});mxEvent.addGestureListeners(b.node,h,g,l);mxEvent.addListener(b.node,"click",function(a){mxEvent.consume(a)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);"A"==b.nodeName&&(b=b.getAttribute("href"),null!=
+b&&this.graph.isCustomLink(b)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&this.graph.customLinkClicked(b)&&mxEvent.consume(a))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,b){if(null!=this.container&&this.flowAnimationStyle){var c=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(c)}}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getVerticesAndEdges=function(a,b){a=null!=a?a:!0;b=null!=b?b:!0;var c=this.model;return c.filterDescendants(function(d){return a&&c.isVertex(d)||b&&c.isEdge(d)},c.getRoot())};Graph.prototype.getCommonStyle=function(a){for(var b={},c=0;c<a.length;c++){var d=this.view.getState(a[c]);this.mergeStyle(d.style,b,0==c)}return b};Graph.prototype.mergeStyle=function(a,
b,c){if(null!=a){var d={},e;for(e in a){var f=a[e];null!=f&&(d[e]=!0,null==b[e]&&c?b[e]=f:b[e]!=f&&delete b[e])}for(e in b)d[e]||delete b[e]}};Graph.prototype.getStartEditingCell=function(a,b){var c=this.getCellStyle(a),c=parseInt(mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE,0));this.isTable(a)&&(!this.isSwimlane(a)||0==c)&&""==this.getLabel(a)&&0<this.model.getChildCount(a)&&(a=this.model.getChildAt(a,0),c=this.getCellStyle(a),c=parseInt(mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(a)&&
(!this.isSwimlane(a)||0==c)&&""==this.getLabel(a)&&0<this.model.getChildCount(a))for(c=0;c<this.model.getChildCount(a);c++){var d=this.model.getChildAt(a,c);if(this.isCellEditable(d)){a=d;break}}return a};Graph.prototype.copyStyle=function(a){var b=null;if(null!=a){b=mxUtils.clone(this.getCurrentCellStyle(a));a=this.model.getStyle(a);a=null!=a?a.split(";"):[];for(var c=0;c<a.length;c++){var d=a[c],e=d.indexOf("=");if(0<=e){var f=d.substring(0,e),d=d.substring(e+1);null==b[f]&&d==mxConstants.NONE&&
@@ -2617,71 +2617,71 @@ null==c&&(c=this.getModel().getRoot()));if(null!=c)for(var f=this.model.getChild
"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(a){for(var b=this.getCellGeometry(a);null!=b&&b.relative;)a=this.getModel().getParent(a),b=this.getCellGeometry(a);return a};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 b=this.model.getParent(a);
if(!this.model.isVertex(b))break;a=b}return a};Graph.prototype.filterSelectionCells=function(a){var b=this.getSelectionCells();if(null!=a){for(var c=[],d=0;d<b.length;d++)a(b[d])||c.push(b[d]);b=c}return b};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,c=this.graph.currentScale,
a=new mxRectangle((a.x+b.x)*c,(a.y+b.y)*c,a.width*c,a.height*c);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(b){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=
-0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var c=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(a){a=c.apply(this,arguments);for(var b=[],d=0;d<a.length;d++)this.isTableRow(a[d])||this.isTableCell(a[d])||b.push(a[d]);return b};var b=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=
-function(a){a=b.apply(this,arguments);for(var c=[],d=0;d<a.length;d++)this.isTable(a[d])||this.isTableRow(a[d])||this.isTableCell(a[d])||c.push(a[d]);return c};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var c=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+c+","+c+")translate("+Math.round(100*this.currentTranslate.x)/
+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)};var b=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(a){a=b.apply(this,arguments);for(var c=[],d=0;d<a.length;d++)this.isTableRow(a[d])||this.isTableCell(a[d])||c.push(a[d]);return c};var d=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=
+function(a){a=d.apply(this,arguments);for(var b=[],c=0;c<a.length;c++)this.isTable(a[c])||this.isTableRow(a[c])||this.isTableCell(a[c])||b.push(a[c]);return b};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var c=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+c+","+c+")translate("+Math.round(100*this.currentTranslate.x)/
100+","+Math.round(100*this.currentTranslate.y)/100+")");b!=a.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",a.getAttribute("transform"))}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var e=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,b=this.scale,c=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);
-e.apply(this,arguments);a&&(this.scale=b,this.translate=c)};var d=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,c){var e=this.useCssTransforms,f=this.view.scale,k=this.view.translate;e&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);d.apply(this,arguments);e&&(this.view.scale=f,this.view.translate=k,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
-Graph.prototype.labelLinkClicked=function(a,c,b){c=c.getAttribute("href");if(null!=c&&!this.isCustomLink(c)&&(mxEvent.isLeftMouseButton(b)&&!mxEvent.isPopupTrigger(b)||mxEvent.isTouchEvent(b))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(c)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(c),a);mxEvent.consume(b)}};
-Graph.prototype.openLink=function(a,c,b){var e=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 d=a.split("#")[1];window.location.hash=="#"+d&&(window.location.hash="");window.location.hash=d}else e=window.open(a,null!=c?c:"_blank"),null==e||b||(e.opener=null)}catch(f){}return e};
+e.apply(this,arguments);a&&(this.scale=b,this.translate=c)};var c=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,d){var e=this.useCssTransforms,f=this.view.scale,k=this.view.translate;e&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);c.apply(this,arguments);e&&(this.view.scale=f,this.view.translate=k,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+Graph.prototype.labelLinkClicked=function(a,b,d){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&(mxEvent.isLeftMouseButton(d)&&!mxEvent.isPopupTrigger(d)||mxEvent.isTouchEvent(d))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(d)}};
+Graph.prototype.openLink=function(a,b,d){var e=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var c=a.split("#")[1];window.location.hash=="#"+c&&(window.location.hash="");window.location.hash=c}else e=window.open(a,null!=b?b:"_blank"),null==e||d||(e.opener=null)}catch(f){}return e};
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 b=this.graph.model.getParent(a);if(c!=mxEvent.BEGIN_UPDATE||this.hasLayout(b,c)){b=this.graph.getCellStyle(a);if("stackLayout"==b.childLayout){var e=new mxStackLayout(this.graph,!0);e.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax","1");e.horizontal="1"==mxUtils.getValue(b,
-"horizontalStack","1");e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1");e.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0");e.spacing=b.stackSpacing||e.spacing;e.border=b.stackBorder||e.border;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.fill=!0;e.allowGaps&&(e.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20)));return e}if("treeLayout"==b.childLayout)return e=new mxCompactTreeLayout(this.graph),
-e.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.groupPadding=mxUtils.getValue(b,"parentPadding",20),e.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==b.childLayout)return e=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.parentBorder=
-mxUtils.getValue(b,"parentPadding",20),e.maintainParentLocation=!0,e.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),e.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),e.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),e.parallelEdgeSpacing=mxUtils.getValue(b,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),
-e;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(a){for(var c=[],b=0;b<a.length;b++){var e=null!=a[b].value?a[b].value.attributes:null,d={};d.id=a[b].id;if(null!=e)for(var f=0;f<e.length;f++)d[e[f].nodeName]=e[f].nodeValue;else d.label=this.convertValueToString(a[b]);c.push(d)}return c};
-Graph.prototype.getNodesForCells=function(a){for(var c=[],b=0;b<a.length;b++){var e=this.view.getState(a[b]);if(null!=e){for(var d=this.cellRenderer.getShapesForState(e),f=0;f<d.length;f++)null!=d[f]&&null!=d[f].node&&c.push(d[f].node);null!=e.control&&null!=e.control.node&&c.push(e.control.node)}}return c};
-Graph.prototype.createWipeAnimations=function(a,c){for(var b=[],e=0;e<a.length;e++){var d=this.view.getState(a[e]);null!=d&&null!=d.shape&&(this.model.isEdge(d.cell)&&null!=d.absolutePoints&&1<d.absolutePoints.length?b.push(this.createEdgeWipeAnimation(d,c)):this.model.isVertex(d.cell)&&null!=d.shape.bounds&&b.push(this.createVertexWipeAnimation(d,c)))}return b};
-Graph.prototype.createEdgeWipeAnimation=function(a,c){var b=a.absolutePoints.slice(),e=a.segments,d=a.length,f=b.length;return{execute:mxUtils.bind(this,function(k,h){if(null!=a.shape){var g=[b[0]],l=k/h;c||(l=1-l);for(var m=d*l,n=1;n<f;n++)if(m<=e[n-1]){g.push(new mxPoint(b[n-1].x+(b[n].x-b[n-1].x)*m/e[n-1],b[n-1].y+(b[n].y-b[n-1].y)*m/e[n-1]));break}else m-=e[n-1],g.push(b[n]);a.shape.points=g;a.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=
-a.text.node&&(a.text.node.style.opacity=l)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.points=b,a.shape.redraw(),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),c?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(a,c){var b=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(e,d){if(null!=a.shape){var f=e/d;c||(f=1-f);a.shape.bounds=new mxRectangle(b.x,b.y,b.width*f,b.height);a.shape.redraw();0==e&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=f)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=b,a.shape.redraw(),null!=a.text&&null!=
-a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),c?1:0))})}};Graph.prototype.executeAnimations=function(a,c,b,e){b=null!=b?b:30;e=null!=e?e:30;var d=null,f=0,k=mxUtils.bind(this,function(){if(f==b||this.stoppingCustomActions){window.clearInterval(d);for(var e=0;e<a.length;e++)a[e].stop();null!=c&&c()}else for(e=0;e<a.length;e++)a[e].execute(f,b);f++}),d=window.setInterval(k,e);k()};
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a,b){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){var d=this.graph.model.getParent(a);if(b!=mxEvent.BEGIN_UPDATE||this.hasLayout(d,b)){d=this.graph.getCellStyle(a);if("stackLayout"==d.childLayout){var e=new mxStackLayout(this.graph,!0);e.resizeParentMax="1"==mxUtils.getValue(d,"resizeParentMax","1");e.horizontal="1"==mxUtils.getValue(d,
+"horizontalStack","1");e.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1");e.resizeLast="1"==mxUtils.getValue(d,"resizeLast","0");e.spacing=d.stackSpacing||e.spacing;e.border=d.stackBorder||e.border;e.marginLeft=d.marginLeft||0;e.marginRight=d.marginRight||0;e.marginTop=d.marginTop||0;e.marginBottom=d.marginBottom||0;e.allowGaps=d.allowGaps||0;e.fill=!0;e.allowGaps&&(e.gridSize=parseFloat(mxUtils.getValue(d,"stackUnitSize",20)));return e}if("treeLayout"==d.childLayout)return e=new mxCompactTreeLayout(this.graph),
+e.horizontal="1"==mxUtils.getValue(d,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),e.groupPadding=mxUtils.getValue(d,"parentPadding",20),e.levelDistance=mxUtils.getValue(d,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==d.childLayout)return e=new mxHierarchicalLayout(this.graph,mxUtils.getValue(d,"flowOrientation",mxConstants.DIRECTION_EAST)),e.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),e.parentBorder=
+mxUtils.getValue(d,"parentPadding",20),e.maintainParentLocation=!0,e.intraCellSpacing=mxUtils.getValue(d,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),e.interRankCellSpacing=mxUtils.getValue(d,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),e.interHierarchySpacing=mxUtils.getValue(d,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),e.parallelEdgeSpacing=mxUtils.getValue(d,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),
+e;if("circleLayout"==d.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==d.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==d.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(a){for(var b=[],d=0;d<a.length;d++){var e=null!=a[d].value?a[d].value.attributes:null,c={};c.id=a[d].id;if(null!=e)for(var f=0;f<e.length;f++)c[e[f].nodeName]=e[f].nodeValue;else c.label=this.convertValueToString(a[d]);b.push(c)}return b};
+Graph.prototype.getNodesForCells=function(a){for(var b=[],d=0;d<a.length;d++){var e=this.view.getState(a[d]);if(null!=e){for(var c=this.cellRenderer.getShapesForState(e),f=0;f<c.length;f++)null!=c[f]&&null!=c[f].node&&b.push(c[f].node);null!=e.control&&null!=e.control.node&&b.push(e.control.node)}}return b};
+Graph.prototype.createWipeAnimations=function(a,b){for(var d=[],e=0;e<a.length;e++){var c=this.view.getState(a[e]);null!=c&&null!=c.shape&&(this.model.isEdge(c.cell)&&null!=c.absolutePoints&&1<c.absolutePoints.length?d.push(this.createEdgeWipeAnimation(c,b)):this.model.isVertex(c.cell)&&null!=c.shape.bounds&&d.push(this.createVertexWipeAnimation(c,b)))}return d};
+Graph.prototype.createEdgeWipeAnimation=function(a,b){var d=a.absolutePoints.slice(),e=a.segments,c=a.length,f=d.length;return{execute:mxUtils.bind(this,function(k,h){if(null!=a.shape){var g=[d[0]],l=k/h;b||(l=1-l);for(var m=c*l,n=1;n<f;n++)if(m<=e[n-1]){g.push(new mxPoint(d[n-1].x+(d[n].x-d[n-1].x)*m/e[n-1],d[n-1].y+(d[n].y-d[n-1].y)*m/e[n-1]));break}else m-=e[n-1],g.push(d[n]);a.shape.points=g;a.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=
+a.text.node&&(a.text.node.style.opacity=l)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.points=d,a.shape.redraw(),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};
+Graph.prototype.createVertexWipeAnimation=function(a,b){var d=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(e,c){if(null!=a.shape){var f=e/c;b||(f=1-f);a.shape.bounds=new mxRectangle(d.x,d.y,d.width*f,d.height);a.shape.redraw();0==e&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=f)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=d,a.shape.redraw(),null!=a.text&&null!=
+a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};Graph.prototype.executeAnimations=function(a,b,d,e){d=null!=d?d:30;e=null!=e?e:30;var c=null,f=0,k=mxUtils.bind(this,function(){if(f==d||this.stoppingCustomActions){window.clearInterval(c);for(var e=0;e<a.length;e++)a[e].stop();null!=b&&b()}else for(e=0;e<a.length;e++)a[e].execute(f,d);f++}),c=window.setInterval(k,e);k()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),c=this.getGraphBounds();if(0==c.width||0==c.height)return new mxRectangle(0,0,1,1);var b=Math.floor(Math.ceil(c.x/this.view.scale-this.view.translate.x)/a.width),e=Math.floor(Math.ceil(c.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(b,e,Math.ceil((Math.floor((c.x+c.width)/this.view.scale)-this.view.translate.x)/a.width)-b,Math.ceil((Math.floor((c.y+c.height)/this.view.scale)-this.view.translate.y)/a.height)-
-e)};Graph.prototype.sanitizeHtml=function(a,c){return Graph.sanitizeHtml(a,c)};Graph.prototype.updatePlaceholders=function(){var a=!1,c;for(c in this.model.cells){var b=this.model.cells[c];this.isReplacePlaceholders(b)&&(this.view.invalidate(b,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var d=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),e=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(d,e,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-d,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
+e)};Graph.prototype.sanitizeHtml=function(a,b){return Graph.sanitizeHtml(a,b)};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var d=this.model.cells[b];this.isReplacePlaceholders(d)&&(this.view.invalidate(d,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(a){return Graph.zoomWheel&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)&&(!mxEvent.isControlDown(a)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(a)||mxEvent.isControlDown(a))};Graph.prototype.isScrollWheelEvent=function(a){return!this.isZoomWheelEvent(a)};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};
-Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isAltDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isControlDown(a)&&!mxEvent.isMetaDown(a)};Graph.prototype.isEdgeIgnored=function(a){var c=!1;null!=a&&(a=this.getCurrentCellStyle(a),c="1"==mxUtils.getValue(a,"ignoreEdge","0"));return c};Graph.prototype.isSplitTarget=function(a,c,b){return!this.model.isEdge(c[0])&&!mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
-Graph.prototype.getLabel=function(a){var c=mxGraph.prototype.getLabel.apply(this,arguments);null!=c&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(c=this.replacePlaceholders(a,c));return c};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.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};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,b){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 e=this.dateFormatCache,d=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,f=/[^-+\dA-Z]/g,k=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(e.masks[c]||c||e.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),b=!0);var h=b?"getUTC":"get",g=a[h+"Date"](),l=a[h+"Day"](),m=a[h+"Month"](),n=a[h+"FullYear"](),p=a[h+"Hours"](),q=a[h+"Minutes"](),t=a[h+"Seconds"](),h=a[h+"Milliseconds"](),v=b?0:a.getTimezoneOffset(),u={d:g,dd:k(g),ddd:e.i18n.dayNames[l],dddd:e.i18n.dayNames[l+7],m:m+1,mm:k(m+1),mmm:e.i18n.monthNames[m],mmmm:e.i18n.monthNames[m+
-12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:k(p%12||12),H:p,HH:k(p),M:q,MM:k(q),s:t,ss:k(t),l:k(h,3),L:k(99<h?Math.round(h/10):h),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:b?"UTC":(String(a).match(d)||[""]).pop().replace(f,""),o:(0<v?"-":"+")+k(100*Math.floor(Math.abs(v)/60)+Math.abs(v)%60,4),S:["th","st","nd","rd"][3<g%10?0:(10!=g%100-g%10)*g%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[a]:a.slice(1,
-a.length-1)})};Graph.prototype.getLayerForCells=function(a){var c=null;if(0<a.length){for(c=a[0];!this.model.isLayer(c);)c=this.model.getParent(c);for(var b=1;b<a.length;b++)if(!this.model.isAncestor(c,a[b])){c=null;break}}return c};
-Graph.prototype.createLayersDialog=function(a,c){var b=document.createElement("div");b.style.position="absolute";for(var e=this.getModel(),d=e.getChildCount(e.root),f=0;f<d;f++)mxUtils.bind(this,function(d){function f(){e.isVisible(d)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(k,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(k,25))}var g=this.convertValueToString(d)||mxResources.get("background")||"Background",k=document.createElement("div");k.style.overflow=
-"hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(e.isVisible(d)?"hideIt":"show",[g]));var m=document.createElement("img");m.setAttribute("draggable","false");m.setAttribute("align","absmiddle");m.setAttribute("border","0");m.style.position="relative";m.style.width="16px";m.style.padding="0px 6px 0 4px";c&&(m.style.filter="invert(100%)",m.style.top="-2px");k.appendChild(m);mxUtils.write(k,g);b.appendChild(k);
-mxEvent.addListener(k,"click",function(){e.setVisible(d,!e.isVisible(d));f();null!=a&&a(d)});f()})(e.getChildAt(e.root,f));return b};
-Graph.prototype.replacePlaceholders=function(a,c,b,e){e=[];if(null!=c){for(var d=0;match=this.placeholderPattern.exec(c);){var f=match[0];if(2<f.length&&"%label%"!=f&&"%tooltip%"!=f){var k=null;if(match.index>d&&"%"==c.charAt(match.index-1))k=f.substring(1);else{var h=f.substring(1,f.length-1);if("id"==h)k=a.id;else if(0>h.indexOf("{"))for(var g=a;null==k&&null!=g;)null!=g.value&&"object"==typeof g.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=g.getAttribute(h+"_"+Graph.diagramLanguage)),
-null==k&&(k=g.hasAttribute(h)?null!=g.getAttribute(h)?g.getAttribute(h):"":null)),g=this.model.getParent(g);null==k&&(k=this.getGlobalVariable(h));null==k&&null!=b&&(k=b[h])}e.push(c.substring(d,match.index)+(null!=k?k:f));d=match.index+f.length}}e.push(c.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var c=[],b=0;b<a.length;b++){var e=this.model.getCell(a[b].id);null!=e&&c.push(e)}this.setSelectionCells(c)}else this.clearSelection()};
-Graph.prototype.selectCellsForConnectVertex=function(a,c,b){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=b&&(mxEvent.isTouchEvent(c)?b.update(b.getState(this.view.getState(a[1]))):b.reset())):this.setSelectionCells(a)};Graph.prototype.isCloneConnectSource=function(a){var c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=c&&c.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(a,c,b,e,d,f,k,h){f=f?f:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var g=this.isCloneConnectSource(a),l=g?a:this.getCompositeParent(a),m=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(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(m.x+=l.geometry.width/2,m.y-=b):c==
-mxConstants.DIRECTION_SOUTH?(m.x+=l.geometry.width/2,m.y+=l.geometry.height+b):(m.x=c==mxConstants.DIRECTION_WEST?m.x-b:m.x+(l.geometry.width+b),m.y+=l.geometry.height/2);var n=this.view.getState(this.model.getParent(a));b=this.view.scale;var p=this.view.translate,l=p.x*b,p=p.y*b;null!=n&&this.model.isVertex(n.cell)&&(l=n.x,p=n.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(m.x+=a.parent.geometry.x,m.y+=a.parent.geometry.y);f=f?null:(new mxRectangle(l+m.x*b,p+m.y*b)).grow(40*b);f=null!=f?
-this.getCells(0,0,0,0,null,null,f,null,!0):null;var n=this.view.getState(a),q=null,t=null;if(null!=f){f=f.reverse();for(var v=0;v<f.length;v++)if(!this.isCellLocked(f[v])&&!this.model.isEdge(f[v])&&f[v]!=a)if(!this.model.isAncestor(a,f[v])&&this.isContainer(f[v])&&(null==q||f[v]==this.model.getParent(a)))q=f[v];else if(null==t&&this.isCellConnectable(f[v])&&!this.model.isAncestor(f[v],a)&&!this.isSwimlane(f[v])){var u=this.view.getState(f[v]);null==n||null==u||mxUtils.intersects(n,u)||(t=f[v])}}var x=
-!mxEvent.isShiftDown(e)||mxEvent.isControlDown(e)||d;x&&("1"!=urlParams.sketch||d)&&(c==mxConstants.DIRECTION_NORTH?m.y-=a.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=a.geometry.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-a.geometry.width/2:m.x+a.geometry.width/2);var w=[],A=t,t=q;d=mxUtils.bind(this,function(b){if(null==k||null!=b||null==t&&g){this.model.beginUpdate();try{if(null==A&&x){var d=this.getAbsoluteParent(null!=b?b:a),d=g?a:this.getCompositeParent(d);A=null!=b?b:this.duplicateCells([d],
-!1)[0];null!=b&&this.addCells([A],this.model.getParent(a),null,null,null,!0);var f=this.getCellGeometry(A);null!=f&&(null!=b&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?m.y-=f.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=f.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-f.width/2:m.x+f.width/2),f.x=m.x-f.width/2,f.y=m.y-f.height/2);null!=q?(this.addCells([A],q,null,null,null,!0),t=null):x&&!g&&this.addCells([A],this.getDefaultParent(),null,null,null,!0)}var l=mxEvent.isControlDown(e)&&
-mxEvent.isShiftDown(e)&&x||null==t&&g?null:this.insertEdge(this.model.getParent(a),null,"",a,A,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var n=null;for(b=a;null!=b.parent&&null!=b.geometry&&b.geometry.relative&&b.parent!=l.parent;)b=this.model.getParent(b);null!=b&&null!=b.parent&&b.parent==l.parent&&(n=b.parent.getIndex(b),this.model.add(b.parent,l,n))}null==t&&null!=A&&null!=a.parent&&g&&c==mxConstants.DIRECTION_WEST&&(n=a.parent.getIndex(a),this.model.add(a.parent,
-A,n));null!=l&&w.push(l);null==t&&null!=A&&w.push(A);null==A&&null!=l&&l.geometry.setTerminalPoint(m,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}}if(null!=h)h(w);else return w});if(null==k||null!=A||!x||null==t&&g)return d(A);k(l+m.x*b,p+m.y*b,d)};
-Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),c=[],b,e;for(e in this.model.cells)if(b=this.model.cells[e],this.model.isVertex(b)||this.model.isEdge(b))this.isHtmlLabel(b)?(a.innerHTML=this.sanitizeHtml(this.getLabel(b)),b=mxUtils.extractTextWithWhitespace([a])):b=this.getLabel(b),b=mxUtils.trim(b.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<b.length&&c.push(b);return c.join(" ")};
-Graph.prototype.convertValueToString=function(a){var c=this.model.getValue(a);if(null!=c&&"object"==typeof c){var b=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var c=a.getAttribute("placeholder"),e=a;null==b&&null!=e;)null!=e.value&&"object"==typeof e.value&&(b=e.hasAttribute(c)?null!=e.getAttribute(c)?e.getAttribute(c):"":null),e=this.model.getParent(e);else b=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(b=c.getAttribute("label_"+Graph.diagramLanguage)),
-null==b&&(b=c.getAttribute("label")||"");return b||""}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.getLinkTargetForCell=function(a){return null!=a.value&&"object"==typeof a.value?a.value.getAttribute("linkTarget"):null};Graph.prototype.getCellStyle=function(a){var c=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);this.model.isVertex(b)&&this.isCellCollapsed(a)&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return c};
-Graph.prototype.updateAlternateBounds=function(a,c,b){if(null!=a&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var e=this.layoutManager.getLayout(this.model.getParent(a));null!=e&&e.constructor==mxStackLayout&&(e.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,b,e,d){c=null!=c?c:!1;null==b&&(b=this.getFoldableCells(this.getSelectionCells(),a));if(null!=b){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var f=0;f<b.length;f++){var k=this.view.getState(b[f]),h=this.getCellGeometry(b[f]);if(null!=k&&null!=h){var g=Math.round(h.width-k.width/this.view.scale),l=Math.round(h.height-k.height/this.view.scale);if(0!=l||0!=g){var m=this.model.getParent(b[f]),n=this.layoutManager.getLayout(m);
-null==n?null!=d&&this.isMoveCellsEvent(d,k)&&this.moveSiblings(k,m,g,l):null!=d&&mxEvent.isAltDown(d)||n.constructor!=mxStackLayout||n.resizeLast||this.resizeParentStacks(m,n,g,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(b)}};
-Graph.prototype.moveSiblings=function(a,c,b,e){this.model.beginUpdate();try{var d=this.getCellsBeyond(a.x,a.y,c,!0,!0);for(c=0;c<d.length;c++)if(d[c]!=a.cell){var f=this.view.getState(d[c]),k=this.getCellGeometry(d[c]);null!=f&&null!=k&&(k=k.clone(),k.translate(Math.round(b*Math.max(0,Math.min(1,(f.x-a.x)/a.width))),Math.round(e*Math.max(0,Math.min(1,(f.y-a.y)/a.height)))),this.model.setGeometry(d[c],k))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,c,b,e){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var d=c.horizontal;null!=a&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==d&&!c.resizeLast;){var f=this.getCellGeometry(a),k=this.view.getState(a);null!=k&&null!=f&&(f=f.clone(),c.horizontal?f.width+=b+Math.min(0,k.width/this.view.scale-f.width):f.height+=e+Math.min(0,k.height/this.view.scale-f.height),this.model.setGeometry(a,
-f));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,b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(a,c,b){var e=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(e)&&(e=null);return e};Graph.prototype.isCellFoldable=function(a){var c=this.getCurrentCellStyle(a);return this.foldingEnabled&&"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&("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.isIgnoreTerminalEvent=function(a){return mxEvent.isAltDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isControlDown(a)&&!mxEvent.isMetaDown(a)};Graph.prototype.isEdgeIgnored=function(a){var b=!1;null!=a&&(a=this.getCurrentCellStyle(a),b="1"==mxUtils.getValue(a,"ignoreEdge","0"));return b};Graph.prototype.isSplitTarget=function(a,b,d){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(d)&&!mxEvent.isShiftDown(d)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
+Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};
+Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};
+Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
+Graph.prototype.formatDate=function(a,b,d){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var e=this.dateFormatCache,c=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,f=/[^-+\dA-Z]/g,k=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)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(e.masks[b]||b||e.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),d=!0);var h=d?"getUTC":"get",g=a[h+"Date"](),l=a[h+"Day"](),m=a[h+"Month"](),n=a[h+"FullYear"](),p=a[h+"Hours"](),q=a[h+"Minutes"](),u=a[h+"Seconds"](),h=a[h+"Milliseconds"](),v=d?0:a.getTimezoneOffset(),t={d:g,dd:k(g),ddd:e.i18n.dayNames[l],dddd:e.i18n.dayNames[l+7],m:m+1,mm:k(m+1),mmm:e.i18n.monthNames[m],mmmm:e.i18n.monthNames[m+
+12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:k(p%12||12),H:p,HH:k(p),M:q,MM:k(q),s:u,ss:k(u),l:k(h,3),L:k(99<h?Math.round(h/10):h),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(c)||[""]).pop().replace(f,""),o:(0<v?"-":"+")+k(100*Math.floor(Math.abs(v)/60)+Math.abs(v)%60,4),S:["th","st","nd","rd"][3<g%10?0:(10!=g%100-g%10)*g%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in t?t[a]:a.slice(1,
+a.length-1)})};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){for(b=a[0];!this.model.isLayer(b);)b=this.model.getParent(b);for(var d=1;d<a.length;d++)if(!this.model.isAncestor(b,a[d])){b=null;break}}return b};
+Graph.prototype.createLayersDialog=function(a,b){var d=document.createElement("div");d.style.position="absolute";for(var e=this.getModel(),c=e.getChildCount(e.root),f=0;f<c;f++)mxUtils.bind(this,function(c){function f(){e.isVisible(c)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(k,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(k,25))}var g=this.convertValueToString(c)||mxResources.get("background")||"Background",k=document.createElement("div");k.style.overflow=
+"hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(e.isVisible(c)?"hideIt":"show",[g]));var m=document.createElement("img");m.setAttribute("draggable","false");m.setAttribute("align","absmiddle");m.setAttribute("border","0");m.style.position="relative";m.style.width="16px";m.style.padding="0px 6px 0 4px";b&&(m.style.filter="invert(100%)",m.style.top="-2px");k.appendChild(m);mxUtils.write(k,g);d.appendChild(k);
+mxEvent.addListener(k,"click",function(){e.setVisible(c,!e.isVisible(c));f();null!=a&&a(c)});f()})(e.getChildAt(e.root,f));return d};
+Graph.prototype.replacePlaceholders=function(a,b,d,e){e=[];if(null!=b){for(var c=0;match=this.placeholderPattern.exec(b);){var f=match[0];if(2<f.length&&"%label%"!=f&&"%tooltip%"!=f){var k=null;if(match.index>c&&"%"==b.charAt(match.index-1))k=f.substring(1);else{var h=f.substring(1,f.length-1);if("id"==h)k=a.id;else if(0>h.indexOf("{"))for(var g=a;null==k&&null!=g;)null!=g.value&&"object"==typeof g.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=g.getAttribute(h+"_"+Graph.diagramLanguage)),
+null==k&&(k=g.hasAttribute(h)?null!=g.getAttribute(h)?g.getAttribute(h):"":null)),g=this.model.getParent(g);null==k&&(k=this.getGlobalVariable(h));null==k&&null!=d&&(k=d[h])}e.push(b.substring(c,match.index)+(null!=k?k:f));c=match.index+f.length}}e.push(b.substring(c))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],d=0;d<a.length;d++){var e=this.model.getCell(a[d].id);null!=e&&b.push(e)}this.setSelectionCells(b)}else this.clearSelection()};
+Graph.prototype.selectCellsForConnectVertex=function(a,b,d){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=d&&(mxEvent.isTouchEvent(b)?d.update(d.getState(this.view.getState(a[1]))):d.reset())):this.setSelectionCells(a)};Graph.prototype.isCloneConnectSource=function(a){var b=null;null!=this.layoutManager&&(b=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=b&&b.constructor==mxStackLayout};
+Graph.prototype.connectVertex=function(a,b,d,e,c,f,k,h){f=f?f:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var g=this.isCloneConnectSource(a),l=g?a:this.getCompositeParent(a),m=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(l.geometry.x,l.geometry.y);b==mxConstants.DIRECTION_NORTH?(m.x+=l.geometry.width/2,m.y-=d):b==
+mxConstants.DIRECTION_SOUTH?(m.x+=l.geometry.width/2,m.y+=l.geometry.height+d):(m.x=b==mxConstants.DIRECTION_WEST?m.x-d:m.x+(l.geometry.width+d),m.y+=l.geometry.height/2);var n=this.view.getState(this.model.getParent(a));d=this.view.scale;var p=this.view.translate,l=p.x*d,p=p.y*d;null!=n&&this.model.isVertex(n.cell)&&(l=n.x,p=n.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(m.x+=a.parent.geometry.x,m.y+=a.parent.geometry.y);f=f?null:(new mxRectangle(l+m.x*d,p+m.y*d)).grow(40*d);f=null!=f?
+this.getCells(0,0,0,0,null,null,f,null,!0):null;var n=this.view.getState(a),q=null,u=null;if(null!=f){f=f.reverse();for(var v=0;v<f.length;v++)if(!this.isCellLocked(f[v])&&!this.model.isEdge(f[v])&&f[v]!=a)if(!this.model.isAncestor(a,f[v])&&this.isContainer(f[v])&&(null==q||f[v]==this.model.getParent(a)))q=f[v];else if(null==u&&this.isCellConnectable(f[v])&&!this.model.isAncestor(f[v],a)&&!this.isSwimlane(f[v])){var t=this.view.getState(f[v]);null==n||null==t||mxUtils.intersects(n,t)||(u=f[v])}}var x=
+!mxEvent.isShiftDown(e)||mxEvent.isControlDown(e)||c;x&&("1"!=urlParams.sketch||c)&&(b==mxConstants.DIRECTION_NORTH?m.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?m.y+=a.geometry.height/2:m.x=b==mxConstants.DIRECTION_WEST?m.x-a.geometry.width/2:m.x+a.geometry.width/2);var w=[],z=u,u=q;c=mxUtils.bind(this,function(c){if(null==k||null!=c||null==u&&g){this.model.beginUpdate();try{if(null==z&&x){var d=this.getAbsoluteParent(null!=c?c:a),d=g?a:this.getCompositeParent(d);z=null!=c?c:this.duplicateCells([d],
+!1)[0];null!=c&&this.addCells([z],this.model.getParent(a),null,null,null,!0);var f=this.getCellGeometry(z);null!=f&&(null!=c&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?m.y-=f.height/2:b==mxConstants.DIRECTION_SOUTH?m.y+=f.height/2:m.x=b==mxConstants.DIRECTION_WEST?m.x-f.width/2:m.x+f.width/2),f.x=m.x-f.width/2,f.y=m.y-f.height/2);null!=q?(this.addCells([z],q,null,null,null,!0),u=null):x&&!g&&this.addCells([z],this.getDefaultParent(),null,null,null,!0)}var l=mxEvent.isControlDown(e)&&
+mxEvent.isShiftDown(e)&&x||null==u&&g?null:this.insertEdge(this.model.getParent(a),null,"",a,z,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var n=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=l.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==l.parent&&(n=c.parent.getIndex(c),this.model.add(c.parent,l,n))}null==u&&null!=z&&null!=a.parent&&g&&b==mxConstants.DIRECTION_WEST&&(n=a.parent.getIndex(a),this.model.add(a.parent,
+z,n));null!=l&&w.push(l);null==u&&null!=z&&w.push(z);null==z&&null!=l&&l.geometry.setTerminalPoint(m,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}}if(null!=h)h(w);else return w});if(null==k||null!=z||!x||null==u&&g)return c(z);k(l+m.x*d,p+m.y*d,c)};
+Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],d,e;for(e in this.model.cells)if(d=this.model.cells[e],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(a.innerHTML=this.sanitizeHtml(this.getLabel(d)),d=mxUtils.extractTextWithWhitespace([a])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<d.length&&b.push(d);return b.join(" ")};
+Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var d=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var b=a.getAttribute("placeholder"),e=a;null==d&&null!=e;)null!=e.value&&"object"==typeof e.value&&(d=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);else d=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(d=b.getAttribute("label_"+Graph.diagramLanguage)),
+null==d&&(d=b.getAttribute("label")||"");return d||""}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.getLinkTargetForCell=function(a){return null!=a.value&&"object"==typeof a.value?a.value.getAttribute("linkTarget"):null};Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var d=this.model.getParent(a);this.model.isVertex(d)&&this.isCellCollapsed(a)&&(d=this.layoutManager.getLayout(d),null!=d&&d.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!d.horizontal))}return b};
+Graph.prototype.updateAlternateBounds=function(a,b,d){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var e=this.layoutManager.getLayout(this.model.getParent(a));null!=e&&e.constructor==mxStackLayout&&(e.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
+Graph.prototype.foldCells=function(a,b,d,e,c){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));if(null!=d){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var f=0;f<d.length;f++){var k=this.view.getState(d[f]),h=this.getCellGeometry(d[f]);if(null!=k&&null!=h){var g=Math.round(h.width-k.width/this.view.scale),l=Math.round(h.height-k.height/this.view.scale);if(0!=l||0!=g){var m=this.model.getParent(d[f]),n=this.layoutManager.getLayout(m);
+null==n?null!=c&&this.isMoveCellsEvent(c,k)&&this.moveSiblings(k,m,g,l):null!=c&&mxEvent.isAltDown(c)||n.constructor!=mxStackLayout||n.resizeLast||this.resizeParentStacks(m,n,g,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(d)}};
+Graph.prototype.moveSiblings=function(a,b,d,e){this.model.beginUpdate();try{var c=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<c.length;b++)if(c[b]!=a.cell){var f=this.view.getState(c[b]),k=this.getCellGeometry(c[b]);null!=f&&null!=k&&(k=k.clone(),k.translate(Math.round(d*Math.max(0,Math.min(1,(f.x-a.x)/a.width))),Math.round(e*Math.max(0,Math.min(1,(f.y-a.y)/a.height)))),this.model.setGeometry(c[b],k))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,d,e){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var c=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==c&&!b.resizeLast;){var f=this.getCellGeometry(a),k=this.view.getState(a);null!=k&&null!=f&&(f=f.clone(),b.horizontal?f.width+=d+Math.min(0,k.width/this.view.scale-f.width):f.height+=e+Math.min(0,k.height/this.view.scale-f.height),this.model.setGeometry(a,
+f));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.movableLabel?"0"!=b.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,d){d=d||this.getDefaultParent();this.isCellLocked(d)||mxGraph.prototype.selectCells.apply(this,arguments)};
+Graph.prototype.getSwimlaneAt=function(a,b,d){var e=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(e)&&(e=null);return e};Graph.prototype.isCellFoldable=function(a){var b=this.getCurrentCellStyle(a);return this.foldingEnabled&&"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};
+Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(a,c){c=null!=c?c:10;var b=this.container.clientWidth-c,e=this.container.clientHeight-c,d=Math.floor(20*Math.min(b/a.width,e/a.height))/20;this.zoomTo(d);if(mxUtils.hasScrollbars(this.container)){var f=this.view.translate;this.container.scrollTop=(a.y+f.y)*d-Math.max((e-a.height*d)/2+c/2,0);this.container.scrollLeft=(a.x+f.x)*d-Math.max((b-a.width*d)/2+c/2,0)}};
-Graph.prototype.getTooltipForCell=function(a){var c="";if(mxUtils.isNode(a.value)){var b=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(b=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==b&&(b=a.value.getAttribute("tooltip"));if(null!=b)null!=b&&this.isReplacePlaceholders(a)&&(b=this.replacePlaceholders(a,b)),c=this.sanitizeHtml(b);else{b=this.builtInProperties;a=a.value.attributes;var e=[];this.isEnabled()&&(b.push("linkTarget"),b.push("link"));for(var d=0;d<a.length;d++)0>
-mxUtils.indexOf(b,a[d].nodeName)&&0<a[d].nodeValue.length&&e.push({name:a[d].nodeName,value:a[d].nodeValue});e.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});for(d=0;d<e.length;d++)"link"==e[d].name&&this.isCustomLink(e[d].value)||(c+=("link"!=e[d].name?"<b>"+e[d].name+":</b> ":"")+mxUtils.htmlEntities(e[d].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1),mxClient.IS_SVG&&(c='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+c+"</div>"))}}return c};
-Graph.prototype.getFlowAnimationStyle=function(){var a=document.getElementsByTagName("head")[0];if(null!=a&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var c=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(c);a.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
-Graph.prototype.getFlowAnimationStyleCss=function(a){return"."+a+" {\nanimation: "+a+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+a+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};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){mxEventSource.call(this);this.graph=a;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
+Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var d=this.container.clientWidth-b,e=this.container.clientHeight-b,c=Math.floor(20*Math.min(d/a.width,e/a.height))/20;this.zoomTo(c);if(mxUtils.hasScrollbars(this.container)){var f=this.view.translate;this.container.scrollTop=(a.y+f.y)*c-Math.max((e-a.height*c)/2+b/2,0);this.container.scrollLeft=(a.x+f.x)*c-Math.max((d-a.width*c)/2+b/2,0)}};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var d=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(d=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==d&&(d=a.value.getAttribute("tooltip"));if(null!=d)null!=d&&this.isReplacePlaceholders(a)&&(d=this.replacePlaceholders(a,d)),b=this.sanitizeHtml(d);else{d=this.builtInProperties;a=a.value.attributes;var e=[];this.isEnabled()&&(d.push("linkTarget"),d.push("link"));for(var c=0;c<a.length;c++)0>
+mxUtils.indexOf(d,a[c].nodeName)&&0<a[c].nodeValue.length&&e.push({name:a[c].nodeName,value:a[c].nodeValue});e.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});for(c=0;c<e.length;c++)"link"==e[c].name&&this.isCustomLink(e[c].value)||(b+=("link"!=e[c].name?"<b>"+e[c].name+":</b> ":"")+mxUtils.htmlEntities(e[c].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+b+"</div>"))}}return b};
+Graph.prototype.getFlowAnimationStyle=function(){var a=document.getElementsByTagName("head")[0];if(null!=a&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var b=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(b);a.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
+Graph.prototype.getFlowAnimationStyleCss=function(a){return"."+a+" {\nanimation: "+a+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+a+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};Graph.prototype.compress=function(a,b){return Graph.compress(a,b)};
+Graph.prototype.decompress=function(a,b){return Graph.decompress(a,b)};Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){mxEventSource.call(this);this.graph=a;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
@@ -2690,74 +2690,75 @@ 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"),mxConstants.DIRECTION_NORTH);this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"),mxConstants.DIRECTION_EAST);this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"),mxConstants.DIRECTION_SOUTH);this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"),mxConstants.DIRECTION_WEST);this.elts=[this.arrowUp,this.arrowRight,
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&
-mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var c=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,
-e){c=!1;var b=e.getEvent();if(this.isResetEvent(b))this.reset();else if(!this.isActive()){var f=this.getState(e.getState());null==f&&mxEvent.isTouchEvent(b)||this.update(f)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,e){var b=e.getEvent();this.isResetEvent(b)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(b)||this.update(this.getState(e.getState()),e.getGraphX(),e.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,
-function(a,e){var b=e.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(b),mxEvent.getClientY(b));this.isResetEvent(b)?this.reset():this.isActive()&&!c&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),e):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(e.getGraphX(),e.getGraphY())))):mxEvent.isTouchEvent(b)||
-null!=this.bbox&&mxUtils.contains(this.bbox,e.getGraphX(),e.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(b)||this.reset();c=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,c){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isPopupTrigger(a)&&!this.graph.isCloneEvent(a)};
-HoverIcons.prototype.createArrow=function(a,c,b){var e=null,e=mxUtils.createImage(a.src);e.style.width=a.width+"px";e.style.height=a.height+"px";e.style.padding=this.tolerance+"px";null!=c&&e.setAttribute("title",c);e.style.position="absolute";e.style.cursor=this.cssCursor;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){null==this.currentState||this.isResetEvent(a)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),this.drag(a,
+mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,
+e){b=!1;var c=e.getEvent();if(this.isResetEvent(c))this.reset();else if(!this.isActive()){var d=this.getState(e.getState());null==d&&mxEvent.isTouchEvent(c)||this.update(d)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,e){var c=e.getEvent();this.isResetEvent(c)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(c)||this.update(this.getState(e.getState()),e.getGraphX(),e.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,
+function(a,e){var c=e.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));this.isResetEvent(c)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),e):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(e.getGraphX(),e.getGraphY())))):mxEvent.isTouchEvent(c)||
+null!=this.bbox&&mxUtils.contains(this.bbox,e.getGraphX(),e.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(c)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isPopupTrigger(a)&&!this.graph.isCloneEvent(a)};
+HoverIcons.prototype.createArrow=function(a,b,d){var e=null,e=mxUtils.createImage(a.src);e.style.width=a.width+"px";e.style.height=a.height+"px";e.style.padding=this.tolerance+"px";null!=b&&e.setAttribute("title",b);e.style.position="absolute";e.style.cursor=this.cssCursor;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){null==this.currentState||this.isResetEvent(a)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),this.drag(a,
this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redirectMouseEvents(e,this.graph,this.currentState);mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isMouseEvent(a)&&(null!=this.activeArrow&&this.activeArrow!=e&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(e,100),this.activeArrow=e,this.fireEvent(new mxEventObject("focus",
-"arrow",e,"direction",b,"event",a)))}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isMouseEvent(a)&&this.fireEvent(new mxEventObject("blur","arrow",e,"direction",b,"event",a));this.graph.isMouseDown||this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
-HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};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,b){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,c,b),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,b){return this.graph.view.getState(this.graph.getCellAt(c,b))};
-HoverIcons.prototype.click=function(a,c,b){var e=b.getEvent(),d=b.getGraphX(),f=b.getGraphY(),d=this.getStateAt(a,d,f);null==d||!this.graph.model.isEdge(d.cell)||this.graph.isCloneEvent(e)||d.getVisibleTerminalState(!0)!=a&&d.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,c,b):(this.graph.setSelectionCell(d.cell),this.reset());b.consume()};
-HoverIcons.prototype.execute=function(a,c,b){b=b.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,c,this.graph.defaultEdgeLength,b,this.graph.isCloneEvent(b),this.graph.isCloneEvent(b)),b,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;this.fireEvent(new mxEventObject("reset"))};
+"arrow",e,"direction",d,"event",a)))}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isMouseEvent(a)&&this.fireEvent(new mxEventObject("blur","arrow",e,"direction",d,"event",a));this.graph.isMouseDown||this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
+HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};
+HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
+HoverIcons.prototype.drag=function(a,b,d){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,d),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
+mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,d){return this.graph.view.getState(this.graph.getCellAt(b,d))};
+HoverIcons.prototype.click=function(a,b,d){var e=d.getEvent(),c=d.getGraphX(),f=d.getGraphY(),c=this.getStateAt(a,c,f);null==c||!this.graph.model.isEdge(c.cell)||this.graph.isCloneEvent(e)||c.getVisibleTerminalState(!0)!=a&&c.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,d):(this.graph.setSelectionCell(c.cell),this.reset());d.consume()};
+HoverIcons.prototype.execute=function(a,b,d){d=d.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d,this.graph.isCloneEvent(d),this.graph.isCloneEvent(d)),d,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;this.fireEvent(new mxEventObject("reset"))};
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 b=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&&
-(b=c.rotationShape.boundingBox));c=mxUtils.bind(this,function(a,c,d){if(null!=b){var e=new mxRectangle(c,d,a.clientWidth,a.clientHeight);mxUtils.intersects(e,b)&&(a==this.arrowUp?d-=e.y+e.height-b.y:a==this.arrowRight?c+=b.x+b.width-e.x:a==this.arrowDown?d+=b.y+b.height-e.y:a==this.arrowLeft&&(c-=e.x+e.width-b.x))}a.style.left=c+"px";a.style.top=d+"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()),
-e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),d=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==e&&e==d&&d==a&&(a=d=e=c=null);var f=this.graph.getCellGeometry(this.currentState.cell),k=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
-this.currentState.cell)||this.graph.isSwimlane(a)||!(null==c||null==f||c.height<3*f.height&&c.width<3*f.width)?b.style.visibility="visible":b.style.visibility="hidden"});k(c,this.arrowRight);k(e,this.arrowLeft);k(d,this.arrowUp);k(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")),
+var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(b=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var d=null;null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&
+(d=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(a,b,c){if(null!=d){var e=new mxRectangle(b,c,a.clientWidth,a.clientHeight);mxUtils.intersects(e,d)&&(a==this.arrowUp?c-=e.y+e.height-d.y:a==this.arrowRight?b+=d.x+d.width-e.x:a==this.arrowDown?c+=d.y+d.height-e.y:a==this.arrowLeft&&(b-=e.x+e.width-d.x))}a.style.left=b+"px";a.style.top=c+"px";mxUtils.setOpacity(a,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-
+this.triangleUp.height-this.tolerance));b(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));b(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));b(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),
+e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),c=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==c&&c==a&&(a=c=e=b=null);var f=this.graph.getCellGeometry(this.currentState.cell),k=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,
+this.currentState.cell)||this.graph.isSwimlane(a)||!(null==c||null==f||c.height<3*f.height&&c.width<3*f.width)?b.style.visibility="visible":b.style.visibility="hidden"});k(b,this.arrowRight);k(e,this.arrowLeft);k(c,this.arrowUp);k(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,b){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 e=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,e=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,b))}),this.updateDelay+10))):null!=this.startTime&&(e=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&e<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,c,b)?this.reset(!1):(null!=this.currentState||e>this.activationDelay)&&this.currentState!=a&&(e>this.updateDelay&&null!=a||null==this.bbox||null==c||null==b||!mxUtils.contains(this.bbox,
-c,b))&&(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,b,e,d){a=this.cloneCell(a);for(var f=0;f<b;f++){var k=this.cloneCell(c),h=this.getCellGeometry(k);null!=h&&(h.x+=f*e,h.y+=f*d);a.insert(k)}return a};
-Graph.prototype.createTable=function(a,c,b,e,d,f,k,h,g){b=null!=b?b:60;e=null!=e?e:40;f=null!=f?f:30;h=null!=h?h:"shape=partialRectangle;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;";g=null!=g?g:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,null,null!=d?d:"",0,0,c*b,
-a*e+(null!=d?f:0),null!=k?k:"shape=table;startSize="+(null!=d?f:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*b,e,h),this.createVertex(null,null,"",0,0,b,e,g),c,b,0),a,0,e)};Graph.prototype.setTableValues=function(a,c,b){for(var e=this.model.getChildCells(a,!0),d=0;d<e.length;d++)if(null!=b&&(e[d].value=b[d]),null!=c)for(var f=this.model.getChildCells(e[d],!0),k=0;k<f.length;k++)null!=c[d][k]&&(f[k].value=c[d][k]);return a};
-Graph.prototype.createCrossFunctionalSwimlane=function(a,c,b,e,d,f,k,h,g){b=null!=b?b:120;e=null!=e?e:120;var l=null==d?0:40;k=null!=k?k:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+l+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";h=null!=h?h:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";g=null!=g?g:"swimlane;connectable=0;startSize="+(null==d?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
-d=this.createVertex(null,null,null!=d?d:"",0,0,c*b,a*e,null!=f?f:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+l+";"+(null==d?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");f=mxUtils.getValue(this.getCellStyle(d),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);d.geometry.width+=f;d.geometry.height+=f;k=this.createVertex(null,null,"",0,f,c*b+f,e,k);d.insert(this.createParent(k,this.createVertex(null,null,"",f,0,b,e,h),c,b,0));
-return 1<a?(k.geometry.y=e+f,this.createParent(d,this.createParent(k,this.createVertex(null,null,"",f,0,b,e,g),c,b,0),a-1,0,e)):d};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,b){b=null!=b?b:!0;var e=this.getModel();e.beginUpdate();try{var d=this.getCellGeometry(a);if(null!=d){d=d.clone();d.height+=c;e.setGeometry(a,d);var f=e.getParent(a),k=e.getChildCells(f,!0);if(!b){var h=mxUtils.indexOf(k,a);if(h<k.length-1){var g=k[h+1],l=this.getCellGeometry(g);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,e.setGeometry(g,l))}}var m=this.getCellGeometry(f);null!=m&&(b||(b=a==k[k.length-1]),b&&(m=m.clone(),m.height+=c,e.setGeometry(f,m)));
+HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a};
+HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a};
+HoverIcons.prototype.update=function(a,b,d){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 e=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,e=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
+this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,d))}),this.updateDelay+10))):null!=this.startTime&&(e=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&e<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,d)?this.reset(!1):(null!=this.currentState||e>this.activationDelay)&&this.currentState!=a&&(e>this.updateDelay&&null!=a||null==this.bbox||null==b||null==d||!mxUtils.contains(this.bbox,
+b,d))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,d,e,c){a=this.cloneCell(a);for(var f=0;f<d;f++){var k=this.cloneCell(b),h=this.getCellGeometry(k);null!=h&&(h.x+=f*e,h.y+=f*c);a.insert(k)}return a};
+Graph.prototype.createTable=function(a,b,d,e,c,f,k,h,g){d=null!=d?d:60;e=null!=e?e:40;f=null!=f?f:30;h=null!=h?h:"shape=partialRectangle;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;";g=null!=g?g:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,null,null!=c?c:"",0,0,b*d,
+a*e+(null!=c?f:0),null!=k?k:"shape=table;startSize="+(null!=c?f:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*d,e,h),this.createVertex(null,null,"",0,0,d,e,g),b,d,0),a,0,e)};Graph.prototype.setTableValues=function(a,b,d){for(var e=this.model.getChildCells(a,!0),c=0;c<e.length;c++)if(null!=d&&(e[c].value=d[c]),null!=b)for(var f=this.model.getChildCells(e[c],!0),k=0;k<f.length;k++)null!=b[c][k]&&(f[k].value=b[c][k]);return a};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,b,d,e,c,f,k,h,g){d=null!=d?d:120;e=null!=e?e:120;var l=null==c?0:40;k=null!=k?k:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+l+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";h=null!=h?h:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";g=null!=g?g:"swimlane;connectable=0;startSize="+(null==c?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
+c=this.createVertex(null,null,null!=c?c:"",0,0,b*d,a*e,null!=f?f:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+l+";"+(null==c?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");f=mxUtils.getValue(this.getCellStyle(c),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);c.geometry.width+=f;c.geometry.height+=f;k=this.createVertex(null,null,"",0,f,b*d+f,e,k);c.insert(this.createParent(k,this.createVertex(null,null,"",f,0,d,e,h),b,d,0));
+return 1<a?(k.geometry.y=e+f,this.createParent(c,this.createParent(k,this.createVertex(null,null,"",f,0,d,e,g),b,d,0),a-1,0,e)):c};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,b,d){d=null!=d?d:!0;var e=this.getModel();e.beginUpdate();try{var c=this.getCellGeometry(a);if(null!=c){c=c.clone();c.height+=b;e.setGeometry(a,c);var f=e.getParent(a),k=e.getChildCells(f,!0);if(!d){var h=mxUtils.indexOf(k,a);if(h<k.length-1){var g=k[h+1],l=this.getCellGeometry(g);null!=l&&(l=l.clone(),l.y+=b,l.height-=b,e.setGeometry(g,l))}}var m=this.getCellGeometry(f);null!=m&&(d||(d=a==k[k.length-1]),d&&(m=m.clone(),m.height+=b,e.setGeometry(f,m)));
null!=this.layoutManager&&this.layoutManager.executeLayout(f,!0)}}finally{e.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,c,b){b=null!=b?b:!1;var e=this.getModel(),d=e.getParent(a),f=e.getParent(d),k=e.getChildCells(d,!0);a=mxUtils.indexOf(k,a);var h=a==k.length-1;e.beginUpdate();try{for(var g=e.getChildCells(f,!0),l=0;l<g.length;l++){var d=g[l],k=e.getChildCells(d,!0),m=k[a],n=this.getCellGeometry(m);null!=n&&(n=n.clone(),n.width+=c,null!=n.alternateBounds&&(n.alternateBounds.width+=c),e.setGeometry(m,n));a<k.length-1&&(m=k[a+1],n=this.getCellGeometry(m),null!=n&&(n=n.clone(),
-n.x+=c,b||(n.width-=c,null!=n.alternateBounds&&(n.alternateBounds.width-=c)),e.setGeometry(m,n)))}if(h||b){var p=this.getCellGeometry(f);null!=p&&(p=p.clone(),p.width+=c,e.setGeometry(f,p))}null!=this.layoutManager&&this.layoutManager.executeLayout(f,!0)}finally{e.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 b=0,e=0;e<a.length;e++)if(!this.isVertexIgnored(a[e])){var d=this.graph.getCellGeometry(a[e]);null!=d&&(b+=c?d.width:d.height)}return b};
-TableLayout.prototype.getRowLayout=function(a,c){for(var b=this.graph.model.getChildCells(a,!0),e=this.graph.getActualStartSize(a,!0),d=this.getSize(b,!0),f=c-e.x-e.width,k=[],e=e.x,h=0;h<b.length;h++){var g=this.graph.getCellGeometry(b[h]);null!=g&&(e+=(null!=g.alternateBounds?g.alternateBounds.width:g.width)*f/d,k.push(Math.round(e)))}return k};
-TableLayout.prototype.layoutRow=function(a,c,b,e){var d=this.graph.getModel(),f=d.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var k=null,h=a.x,g=0;null!=c&&(c=c.slice(),c.splice(0,0,a.x));for(var l=0;l<f.length;l++){var m=this.graph.getCellGeometry(f[l]);null!=m&&(m=m.clone(),m.y=a.y,m.height=b-a.y-a.height,null!=c?(m.x=c[l],m.width=c[l+1]-m.x,l==f.length-1&&l<c.length-2&&(m.width=e-m.x-a.x-a.width)):(m.x=h,h+=m.width,l==f.length-1?m.width=e-a.x-a.width-g:g+=m.width),m.alternateBounds=
-new mxRectangle(0,0,m.width,m.height),d.setGeometry(f[l],m));null!=k&&null!=k.geo&&(1<k.colspan?(k.colspan--,k.geo.width+=m.width,d.setVisible(f[l],!1)):d.setVisible(f[l],!0));if(null==k||1>=k.colspan)k=this.graph.getCurrentCellStyle(f[l],!0),k={colspan:null!=k?parseInt(k.colspan||1):1,style:k,cell:f[l],geo:m}}return g};
-TableLayout.prototype.execute=function(a){if(null!=a){var c=this.graph.getActualStartSize(a,!0),b=this.graph.getCellGeometry(a),e=this.graph.getCellStyle(a),d="1"==mxUtils.getValue(e,"resizeLastRow","0"),f="1"==mxUtils.getValue(e,"resizeLast","0"),e="1"==mxUtils.getValue(e,"fixedRows","0"),k=this.graph.getModel(),h=0;k.beginUpdate();try{var g=b.height-c.y-c.height,l=b.width-c.x-c.width,m=k.getChildCells(a,!0),n=this.getSize(m,!1);if(0<g&&0<l&&0<m.length&&0<n){if(d){var p=this.graph.getCellGeometry(m[m.length-
-1]);null!=p&&(p=p.clone(),p.height=g-n+p.height,k.setGeometry(m[m.length-1],p))}for(var q=f?null:this.getRowLayout(m[0],l),t=c.y,v=0;v<m.length;v++)p=this.graph.getCellGeometry(m[v]),null!=p&&(p=p.clone(),p.x=c.x,p.width=l,p.y=Math.round(t),t=d||e?t+p.height:t+p.height/n*g,p.height=Math.round(t)-p.y,k.setGeometry(m[v],p)),h=Math.max(h,this.layoutRow(m[v],q,p.height,l));e&&g<n&&(b=b.clone(),b.height=t+c.height,k.setGeometry(a,b));f&&l<h+Graph.minTableColumnWidth&&(b=b.clone(),b.width=h+c.width+c.x+
-Graph.minTableColumnWidth,k.setGeometry(a,b))}}finally{k.endUpdate()}}};
-(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var d=this.getState(a);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this,
-arguments);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var b=mxShape.prototype.paint;mxShape.prototype.paint=function(){b.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var a=this.node.getElementsByTagName("path");if(1<a.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&a[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var c=this.state.view.graph.getFlowAnimationStyle();null!=c&&a[1].setAttribute("class",c.getAttribute("id"))}}};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=
-b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var k=b[g+1],h=b[g],l=[],m=b[g+2];g<b.length-2&&mxUtils.ptSegDistSq(h.x,h.y,m.x,m.y,k.x,k.y)<1*this.scale*this.scale;)k=m,g++,m=b[g+2];for(var c=e(0,h.x,h.y)||c,H=0;H<this.validEdges.length;H++){var D=this.validEdges[H],F=D.absolutePoints;if(null!=F&&mxUtils.intersects(a,D)&&"1"!=D.style.noJump)for(D=0;D<F.length-1;D++){for(var z=F[D+1],I=F[D],m=F[D+2];D<F.length-2&&mxUtils.ptSegDistSq(I.x,I.y,m.x,m.y,z.x,z.y)<1*this.scale*this.scale;)z=
-m,D++,m=F[D+2];m=mxUtils.intersection(h.x,h.y,k.x,k.y,I.x,I.y,z.x,z.y);if(null!=m&&(Math.abs(m.x-h.x)>f||Math.abs(m.y-h.y)>f)&&(Math.abs(m.x-k.x)>f||Math.abs(m.y-k.y)>f)&&(Math.abs(m.x-I.x)>f||Math.abs(m.y-I.y)>f)&&(Math.abs(m.x-z.x)>f||Math.abs(m.y-z.y)>f)){z=m.x-h.x;I=m.y-h.y;m={distSq:z*z+I*I,x:m.x,y:m.y};for(z=0;z<l.length;z++)if(l[z].distSq>m.distSq){l.splice(z,0,m);m=null;break}null==m||0!=l.length&&l[l.length-1].x===m.x&&l[l.length-1].y===m.y||l.push(m)}}}for(D=0;D<l.length;D++)c=e(1,l[D].x,
+Graph.prototype.setTableColumnWidth=function(a,b,d){d=null!=d?d:!1;var e=this.getModel(),c=e.getParent(a),f=e.getParent(c),k=e.getChildCells(c,!0);a=mxUtils.indexOf(k,a);var h=a==k.length-1;e.beginUpdate();try{for(var g=e.getChildCells(f,!0),l=0;l<g.length;l++){var c=g[l],k=e.getChildCells(c,!0),m=k[a],n=this.getCellGeometry(m);null!=n&&(n=n.clone(),n.width+=b,null!=n.alternateBounds&&(n.alternateBounds.width+=b),e.setGeometry(m,n));a<k.length-1&&(m=k[a+1],n=this.getCellGeometry(m),null!=n&&(n=n.clone(),
+n.x+=b,d||(n.width-=b,null!=n.alternateBounds&&(n.alternateBounds.width-=b)),e.setGeometry(m,n)))}if(h||d){var p=this.getCellGeometry(f);null!=p&&(p=p.clone(),p.width+=b,e.setGeometry(f,p))}null!=this.layoutManager&&this.layoutManager.executeLayout(f,!0)}finally{e.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,b){for(var d=0,e=0;e<a.length;e++)if(!this.isVertexIgnored(a[e])){var c=this.graph.getCellGeometry(a[e]);null!=c&&(d+=b?c.width:c.height)}return d};
+TableLayout.prototype.getRowLayout=function(a,b){for(var d=this.graph.model.getChildCells(a,!0),e=this.graph.getActualStartSize(a,!0),c=this.getSize(d,!0),f=b-e.x-e.width,k=[],e=e.x,h=0;h<d.length;h++){var g=this.graph.getCellGeometry(d[h]);null!=g&&(e+=(null!=g.alternateBounds?g.alternateBounds.width:g.width)*f/c,k.push(Math.round(e)))}return k};
+TableLayout.prototype.layoutRow=function(a,b,d,e,c){var f=this.graph.getModel(),k=f.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var h=null,g=a.x,l=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var m=0;m<k.length;m++){var n=this.graph.getCellGeometry(k[m]);null!=n&&(n=n.clone(),n.y=a.y,n.height=d-a.y-a.height,null!=b?(n.x=b[m],n.width=b[m+1]-n.x,m==k.length-1&&m<b.length-2&&(n.width=e-n.x-a.x-a.width)):(n.x=g,g+=n.width,m==k.length-1?n.width=e-a.x-a.width-l:l+=n.width),n.alternateBounds=
+new mxRectangle(0,0,n.width,n.height),f.setGeometry(k[m],n));var p=!0;null!=h&&null!=h.geo&&null!=h.colspan&&1<h.colspan&&(h.geo.width+=null!=n.alternateBounds?n.alternateBounds.width:n.width,p=!1,h.colspan--);var q=c[m];null!=q&&null!=q.geo&&null!=q.rowspan&&1<q.rowspan&&(q.geo.height+=null!=n.alternateBounds?n.alternateBounds.height:n.height,p=!1,q.rowspan--);f.setVisible(k[m],p);p=this.graph.getCurrentCellStyle(k[m],!0);n={style:p,cell:k[m],geo:n};if(null!=p){if(null==h||1>h.colspan)n.colspan=
+parseInt(p.colspan||0),h=n;if(null==q||1>q.rowspan)n.rowspan=parseInt(p.rowspan||0),c[m]=n}}return l};
+TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),d=this.graph.getCellGeometry(a),e=this.graph.getCellStyle(a),c="1"==mxUtils.getValue(e,"resizeLastRow","0"),f="1"==mxUtils.getValue(e,"resizeLast","0"),e="1"==mxUtils.getValue(e,"fixedRows","0"),k=this.graph.getModel(),h=0;k.beginUpdate();try{var g=d.height-b.y-b.height,l=d.width-b.x-b.width,m=k.getChildCells(a,!0),n=this.getSize(m,!1);if(0<g&&0<l&&0<m.length&&0<n){if(c){var p=this.graph.getCellGeometry(m[m.length-
+1]);null!=p&&(p=p.clone(),p.height=g-n+p.height,k.setGeometry(m[m.length-1],p))}for(var q=f?null:this.getRowLayout(m[0],l),u=[],v=b.y,t=0;t<m.length;t++)p=this.graph.getCellGeometry(m[t]),null!=p&&(p=p.clone(),p.x=b.x,p.width=l,p.y=Math.round(v),v=c||e?v+p.height:v+p.height/n*g,p.height=Math.round(v)-p.y,k.setGeometry(m[t],p)),h=Math.max(h,this.layoutRow(m[t],q,p.height,l,u));e&&g<n&&(d=d.clone(),d.height=v+b.height,k.setGeometry(a,d));f&&l<h+Graph.minTableColumnWidth&&(d=d.clone(),d.width=h+b.width+
+b.x+Graph.minTableColumnWidth,k.setGeometry(a,d))}}finally{k.endUpdate()}}};
+(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){c=null!=c?c:!0;var d=this.getState(a);null!=d&&c&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=b.apply(this,
+arguments);null!=d&&c&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var d=mxShape.prototype.paint;mxShape.prototype.paint=function(){d.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var a=this.node.getElementsByTagName("path");if(1<a.length){"1"!=mxUtils.getValue(this.state.style,
+mxConstants.STYLE_DASHED,"0")&&a[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var b=this.state.view.graph.getFlowAnimationStyle();null!=b&&a[1].setAttribute("class",b.getAttribute("id"))}}};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var c=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(a){c.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=
+b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var k=b[g+1],h=b[g],l=[],m=b[g+2];g<b.length-2&&mxUtils.ptSegDistSq(h.x,h.y,m.x,m.y,k.x,k.y)<1*this.scale*this.scale;)k=m,g++,m=b[g+2];for(var c=e(0,h.x,h.y)||c,G=0;G<this.validEdges.length;G++){var D=this.validEdges[G],F=D.absolutePoints;if(null!=F&&mxUtils.intersects(a,D)&&"1"!=D.style.noJump)for(D=0;D<F.length-1;D++){for(var y=F[D+1],I=F[D],m=F[D+2];D<F.length-2&&mxUtils.ptSegDistSq(I.x,I.y,m.x,m.y,y.x,y.y)<1*this.scale*this.scale;)y=
+m,D++,m=F[D+2];m=mxUtils.intersection(h.x,h.y,k.x,k.y,I.x,I.y,y.x,y.y);if(null!=m&&(Math.abs(m.x-h.x)>f||Math.abs(m.y-h.y)>f)&&(Math.abs(m.x-k.x)>f||Math.abs(m.y-k.y)>f)&&(Math.abs(m.x-I.x)>f||Math.abs(m.y-I.y)>f)&&(Math.abs(m.x-y.x)>f||Math.abs(m.y-y.y)>f)){y=m.x-h.x;I=m.y-h.y;m={distSq:y*y+I*I,x:m.x,y:m.y};for(y=0;y<l.length;y++)if(l[y].distSq>m.distSq){l.splice(y,0,m);m=null;break}null==m||0!=l.length&&l[l.length-1].x===m.x&&l[l.length-1].y===m.y||l.push(m)}}}for(D=0;D<l.length;D++)c=e(1,l[D].x,
l[D].y)||c}m=b[b.length-1];c=e(0,m.x,m.y)||c}a.routedPoints=d;return c}return!1};var f=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)f.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),k=!0,h=null,l=null,m=[],n=null;a.begin();for(var p=0;p<this.state.routedPoints.length;p++){var D=this.state.routedPoints[p],F=new mxPoint(D.x/this.scale,D.y/this.scale);0==p?F=b[0]:p==this.state.routedPoints.length-1&&(F=b[b.length-1]);var z=!1;if(null!=h&&1==D.type){var I=this.state.routedPoints[p+1],D=I.x/this.scale-F.x,I=I.y/this.scale-F.y,D=D*D+I*I;null==n&&(n=new mxPoint(F.x-h.x,F.y-h.y),
-l=Math.sqrt(n.x*n.x+n.y*n.y),0<l?(n.x=n.x*e/l,n.y=n.y*e/l):n=null);D>e*e&&0<l&&(D=h.x-F.x,I=h.y-F.y,D=D*D+I*I,D>e*e&&(z=new mxPoint(F.x-n.x,F.y-n.y),D=new mxPoint(F.x+n.x,F.y+n.y),m.push(z),this.addPoints(a,m,c,d,!1,null,k),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(z.x-n.y*m,z.y+n.x*m),a.lineTo(D.x-n.y*m,D.y+n.x*m),a.lineTo(D.x,D.y)):"line"==g?(a.moveTo(z.x+n.y*m,z.y-n.x*m),a.lineTo(z.x-n.y*m,z.y+n.x*m),a.moveTo(D.x-n.y*m,D.y+n.x*m),a.lineTo(D.x+n.y*
-m,D.y-n.x*m),a.moveTo(D.x,D.y)):"arc"==g?(m*=1.3,a.curveTo(z.x-n.y*m,z.y+n.x*m,D.x-n.y*m,D.y+n.x*m,D.x,D.y)):(a.moveTo(D.x,D.y),k=!0),m=[D],z=!0))}else n=null;z||(m.push(F),h=F)}this.addPoints(a,m,c,d,!1,null,k);a.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(a,b,c,d){return null!=b&&"centerPerimeter"==b.style[mxConstants.STYLE_PERIMETER]?new mxPoint(b.getCenterX(),b.getCenterY()):k.apply(this,arguments)};var h=mxGraphView.prototype.updateFloatingTerminalPoint;
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),k=!0,h=null,l=null,m=[],n=null;a.begin();for(var p=0;p<this.state.routedPoints.length;p++){var D=this.state.routedPoints[p],F=new mxPoint(D.x/this.scale,D.y/this.scale);0==p?F=b[0]:p==this.state.routedPoints.length-1&&(F=b[b.length-1]);var y=!1;if(null!=h&&1==D.type){var I=this.state.routedPoints[p+1],D=I.x/this.scale-F.x,I=I.y/this.scale-F.y,D=D*D+I*I;null==n&&(n=new mxPoint(F.x-h.x,F.y-h.y),
+l=Math.sqrt(n.x*n.x+n.y*n.y),0<l?(n.x=n.x*e/l,n.y=n.y*e/l):n=null);D>e*e&&0<l&&(D=h.x-F.x,I=h.y-F.y,D=D*D+I*I,D>e*e&&(y=new mxPoint(F.x-n.x,F.y-n.y),D=new mxPoint(F.x+n.x,F.y+n.y),m.push(y),this.addPoints(a,m,c,d,!1,null,k),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(y.x-n.y*m,y.y+n.x*m),a.lineTo(D.x-n.y*m,D.y+n.x*m),a.lineTo(D.x,D.y)):"line"==g?(a.moveTo(y.x+n.y*m,y.y-n.x*m),a.lineTo(y.x-n.y*m,y.y+n.x*m),a.moveTo(D.x-n.y*m,D.y+n.x*m),a.lineTo(D.x+n.y*
+m,D.y-n.x*m),a.moveTo(D.x,D.y)):"arc"==g?(m*=1.3,a.curveTo(y.x-n.y*m,y.y+n.x*m,D.x-n.y*m,D.y+n.x*m,D.x,D.y)):(a.moveTo(D.x,D.y),k=!0),m=[D],y=!0))}else n=null;y||(m.push(F),h=F)}this.addPoints(a,m,c,d,!1,null,k);a.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(a,b,c,d){return null!=b&&"centerPerimeter"==b.style[mxConstants.STYLE_PERIMETER]?new mxPoint(b.getCenterX(),b.getCenterY()):k.apply(this,arguments)};var h=mxGraphView.prototype.updateFloatingTerminalPoint;
mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)h.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")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var l=Math.cos(-g),m=Math.sin(-g),e=mxUtils.getRotatedPoint(e,l,m,k);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);e=this.getPerimeterPoint(b,e,0==g&&f,l);0!=g&&(l=Math.cos(g),m=Math.sin(g),e=mxUtils.getRotatedPoint(e,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,
a[f]);if(null!=g){var k=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||k<d)c=g,d=k}}null!=c&&(e=c)}return e};var g=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=g.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var l=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=
-mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(d.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(d.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.filesLoaded={};
-mxStencilRegistry.getStencil=function(a){var c=mxStencilRegistry.stencils[a];if(null==c&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var b=mxStencilRegistry.getBasenameForStencil(a);if(null!=b){c=mxStencilRegistry.libraries[b];if(null!=c){if(null==mxStencilRegistry.packages[b]){for(var e=0;e<c.length;e++){var d=c[e];if(!mxStencilRegistry.filesLoaded[d])if(mxStencilRegistry.filesLoaded[d]=!0,".xml"==d.toLowerCase().substring(d.length-4,d.length))mxStencilRegistry.loadStencilSet(d,
-null);else if(".js"==d.toLowerCase().substring(d.length-3,d.length))try{if(mxStencilRegistry.allowEval){var f=mxUtils.load(d);null!=f&&200<=f.getStatus()&&299>=f.getStatus()&&eval.call(window,f.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",a,b,c,d,k)}}mxStencilRegistry.packages[b]=1}}else b=b.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+b+".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],b=2;b<a.length-1;b++)c+="/"+a[b];return c};
-mxStencilRegistry.loadStencilSet=function(a,c,b,e){var d=mxStencilRegistry.packages[a];if(null!=b&&b||null==d){var f=!1;if(null==d)try{if(e){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(b){null!=b&&null!=b.documentElement&&(mxStencilRegistry.packages[a]=b,f=!0,mxStencilRegistry.parseStencilSet(b.documentElement,c,f))}));return}d=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=d;f=!0}catch(k){null!=window.console&&console.log("error in loadStencilSet:",a,k)}null!=d&&null!=
-d.documentElement&&mxStencilRegistry.parseStencilSet(d.documentElement,c,f)}};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,b){if("stencils"==a.nodeName)for(var e=a.firstChild;null!=e;)"shapes"==e.nodeName&&mxStencilRegistry.parseStencilSet(e,c,b),e=e.nextSibling;else{b=null!=b?b:!0;var e=a.firstChild,d="";a=a.getAttribute("name");for(null!=a&&(d=a+".");null!=e;){if(e.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=e.getAttribute("name"),null!=a)){var d=d.toLowerCase(),f=a.replace(/ /g,"_");b&&mxStencilRegistry.addStencil(d+f.toLowerCase(),new mxStencil(e));if(null!=c){var k=e.getAttribute("w"),
-h=e.getAttribute("h"),k=null==k?80:parseInt(k,10),h=null==h?80:parseInt(h,10);c(d,f,a,k,h)}}e=e.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=
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var d=mxStencilRegistry.getBasenameForStencil(a);if(null!=d){b=mxStencilRegistry.libraries[d];if(null!=b){if(null==mxStencilRegistry.packages[d]){for(var e=0;e<b.length;e++){var c=b[e];if(!mxStencilRegistry.filesLoaded[c])if(mxStencilRegistry.filesLoaded[c]=!0,".xml"==c.toLowerCase().substring(c.length-4,c.length))mxStencilRegistry.loadStencilSet(c,
+null);else if(".js"==c.toLowerCase().substring(c.length-3,c.length))try{if(mxStencilRegistry.allowEval){var f=mxUtils.load(c);null!=f&&200<=f.getStatus()&&299>=f.getStatus()&&eval.call(window,f.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",a,d,b,c,k)}}mxStencilRegistry.packages[d]=1}}else d=d.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+d+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],d=2;d<a.length-1;d++)b+="/"+a[d];return b};
+mxStencilRegistry.loadStencilSet=function(a,b,d,e){var c=mxStencilRegistry.packages[a];if(null!=d&&d||null==c){var f=!1;if(null==c)try{if(e){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,f=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,f))}));return}c=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=c;f=!0}catch(k){null!=window.console&&console.log("error in loadStencilSet:",a,k)}null!=c&&null!=
+c.documentElement&&mxStencilRegistry.parseStencilSet(c.documentElement,b,f)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,b,d){if("stencils"==a.nodeName)for(var e=a.firstChild;null!=e;)"shapes"==e.nodeName&&mxStencilRegistry.parseStencilSet(e,b,d),e=e.nextSibling;else{d=null!=d?d:!0;var e=a.firstChild,c="";a=a.getAttribute("name");for(null!=a&&(c=a+".");null!=e;){if(e.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=e.getAttribute("name"),null!=a)){var c=c.toLowerCase(),f=a.replace(/ /g,"_");d&&mxStencilRegistry.addStencil(c+f.toLowerCase(),new mxStencil(e));if(null!=b){var k=e.getAttribute("w"),
+h=e.getAttribute("h"),k=null==k?80:parseInt(k,10),h=null==h?80:parseInt(h,10);b(c,f,a,k,h)}}e=e.nextSibling}}};
+"undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function b(a,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 b=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(a){return b.apply(this,arguments)||this.graph.isTableRow(a)||this.graph.isTableCell(a)};var e=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(a){return e.apply(this,arguments)||this.graph.isEdgeIgnored(a)};var d=mxConnectionHandler.prototype.isCreateTarget;
-mxConnectionHandler.prototype.isCreateTarget=function(a){return this.graph.isCloneEvent(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,
+!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var d=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(a){return d.apply(this,arguments)||this.graph.isTableRow(a)||this.graph.isTableCell(a)};var e=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(a){return e.apply(this,arguments)||this.graph.isEdgeIgnored(a)};var c=mxConnectionHandler.prototype.isCreateTarget;
+mxConnectionHandler.prototype.isCreateTarget=function(a){return this.graph.isCloneEvent(a)||c.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 f=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=f.apply(this,arguments);a.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
function(){var a=k.apply(this,arguments),b=a.getCell;a.getCell=mxUtils.bind(this,function(a){var c=b.apply(this,arguments);this.error=null;return c});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",b="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),
c=0;c<b.length;c++)null!=this.currentEdgeStyle[b[c]]&&(a+=b[c]+"="+this.currentEdgeStyle[b[c]]+";");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+
@@ -2765,15 +2766,15 @@ c=0;c<b.length;c++)null!=this.currentEdgeStyle[b[c]]&&(a+=b[c]+"="+this.currentE
b,[c[d]])}}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 c=0;c<a.length;c++){var d=a[c];b[mxObjectIdentity.get(d)]=
d.getId();for(var e=this.model.getChildCount(d),f=0;f<e;f++)this.createCellLookup([this.model.getChildAt(d,f)],b)}return b};Graph.prototype.createCellMapping=function(a,b,c){c=null!=c?c:{};for(var d in a){var e=b[d];null==c[e]&&(c[e]=a[d].getId()||"")}return c};Graph.prototype.importGraphModel=function(a,b,c,d){b=null!=b?b:0;c=null!=c?c:0;var e=new mxCodec(a.ownerDocument),f=new mxGraphModel;e.decode(a,f);a=[];var e={},g={},k=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),e));if(null!=
k){var h=this.createCellLookup([f.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<k.length;f++)l=this.model.getChildren(this.moveCells([k[f]],b,c,!1,this.model.getRoot())[0]),null!=l&&(a=a.concat(l));else{var l=f.getChildren(k[0]);null!=l&&(a=this.moveCells(l,b,c,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId())}if(null!=a&&(this.createCellMapping(e,h,g),this.updateCustomLinks(g,a),d)){this.isGridEnabled()&&
-(b=this.snap(b),c=this.snap(c));var M=this.getBoundingBoxFromGeometry(a,!0);null!=M&&this.moveCells(a,b-M.x,c-M.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},c=this.cloneCells(a,null,b),d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(var f=new mxCodec,g=new mxGraphModel,k=g.getChildAt(g.getRoot(),0),e=0;e<c.length;e++){g.add(k,c[e]);var h=this.view.getState(a[e]);if(null!=h){var l=this.getCellGeometry(c[e]);null!=l&&l.relative&&!this.model.isEdge(a[e])&&
+(b=this.snap(b),c=this.snap(c));var N=this.getBoundingBoxFromGeometry(a,!0);null!=N&&this.moveCells(a,b-N.x,c-N.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},c=this.cloneCells(a,null,b),d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(var f=new mxCodec,g=new mxGraphModel,k=g.getChildAt(g.getRoot(),0),e=0;e<c.length;e++){g.add(k,c[e]);var h=this.view.getState(a[e]);if(null!=h){var l=this.getCellGeometry(c[e]);null!=l&&l.relative&&!this.model.isEdge(a[e])&&
null==d.get(this.model.getParent(a[e]))&&(l.offset=null,l.relative=!1,l.x=h.x/h.view.scale-h.view.translate.x,l.y=h.y/h.view.scale-h.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(b,this.createCellLookup(a)),c);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 c=this.getCurrentCellStyle(a,b)[mxConstants.STYLE_SHAPE];return c==mxConstants.SHAPE_SWIMLANE||"table"==c}return!1};var h=Graph.prototype.isExtendParent;
Graph.prototype.isExtendParent=function(a){var b=this.model.getParent(a);if(null!=b){var c=this.getCurrentCellStyle(b);if(null!=c.expand)return"0"!=c.expand}return h.apply(this,arguments)&&(null==b||!this.isTable(b))};var g=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(a,b,c,d,e,f,k,h){null==h&&(h=this.model.getParent(a),this.isTable(h)||this.isTableRow(h))&&(h=this.getCellAt(f,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=g.apply(this,[a,b,c,d,e,f,k,h]);this.model.setValue(c,
-"");var l=this.getChildCells(c,!0);for(b=0;b<l.length;b++){var M=this.getCellGeometry(l[b]);null!=M&&M.relative&&0<M.x&&this.model.remove(l[b])}var m=this.getChildCells(a,!0);for(b=0;b<m.length;b++)M=this.getCellGeometry(m[b]),null!=M&&M.relative&&0>=M.x&&this.model.remove(m[b]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[a]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
-mxConstants.NONE,[a]);var n=this.model.getTerminal(c,!1);if(null!=n){var Z=this.getCurrentCellStyle(n);null!=Z&&"1"==Z.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[a]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[a]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)l.apply(this,arguments);
+"");var l=this.getChildCells(c,!0);for(b=0;b<l.length;b++){var N=this.getCellGeometry(l[b]);null!=N&&N.relative&&0<N.x&&this.model.remove(l[b])}var m=this.getChildCells(a,!0);for(b=0;b<m.length;b++)N=this.getCellGeometry(m[b]),null!=N&&N.relative&&0>=N.x&&this.model.remove(m[b]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[a]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
+mxConstants.NONE,[a]);var n=this.model.getTerminal(c,!1);if(null!=n){var aa=this.getCurrentCellStyle(n);null!=aa&&"1"==aa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[a]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[a]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)l.apply(this,arguments);
else{var d=this.getSelectionCell(),e=null,f=[],g=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(f.push(b),b==d)e=f.length-1;else if(a&&null==d&&0<f.length||null!=e&&a&&f.length>e||!a&&0<e)return;for(var c=0;c<this.model.getChildCount(b);c++)g(this.model.getChildAt(b,c))});g(this.model.root);0<f.length&&(e=null!=e?mxUtils.mod(e+(a?1:-1),f.length):0,this.setSelectionCell(f[e]))}};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=
-function(a,b,c,d,e,f,g){g=null!=g?g:{};if(this.isTable(e)){for(var k=[],h=0;h<a.length;h++)this.isTable(a[h])?k=k.concat(this.model.getChildCells(a[h],!0).reverse()):k.push(a[h]);a=k}this.model.beginUpdate();try{k=[];for(h=0;h<a.length;h++)if(null!=e&&this.isTableRow(a[h])){var l=this.model.getParent(a[h]),M=this.getCellGeometry(a[h]);this.isTable(l)&&k.push(l);if(null!=l&&null!=M&&this.isTable(l)&&this.isTable(e)&&(d||l!=e)){if(!d){var n=this.getCellGeometry(l);null!=n&&(n=n.clone(),n.height-=M.height,
-this.model.setGeometry(l,n))}n=this.getCellGeometry(e);null!=n&&(n=n.clone(),n.height+=M.height,this.model.setGeometry(e,n));var Z=this.model.getChildCells(e,!0);if(0<Z.length){a[h]=d?this.cloneCell(a[h]):a[h];var V=this.model.getChildCells(a[h],!0),p=this.model.getChildCells(Z[0],!0),ca=p.length-V.length;if(0<ca)for(var q=0;q<ca;q++){var la=this.cloneCell(V[V.length-1]);null!=la&&(la.value="",this.model.add(a[h],la))}else if(0>ca)for(q=0;q>ca;q--)this.model.remove(V[V.length+q-1]);V=this.model.getChildCells(a[h],
-!0);for(q=0;q<p.length;q++){var t=this.getCellGeometry(p[q]),u=this.getCellGeometry(V[q]);null!=t&&null!=u&&(u=u.clone(),u.width=t.width,this.model.setGeometry(V[q],u))}}}}for(var v=m.apply(this,arguments),h=0;h<k.length;h++)!d&&this.model.contains(k[h])&&0==this.model.getChildCount(k[h])&&this.model.remove(k[h]);d&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),v)}finally{this.model.endUpdate()}return v};var n=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,
+function(a,b,c,d,e,f,g){g=null!=g?g:{};if(this.isTable(e)){for(var k=[],h=0;h<a.length;h++)this.isTable(a[h])?k=k.concat(this.model.getChildCells(a[h],!0).reverse()):k.push(a[h]);a=k}this.model.beginUpdate();try{k=[];for(h=0;h<a.length;h++)if(null!=e&&this.isTableRow(a[h])){var l=this.model.getParent(a[h]),N=this.getCellGeometry(a[h]);this.isTable(l)&&k.push(l);if(null!=l&&null!=N&&this.isTable(l)&&this.isTable(e)&&(d||l!=e)){if(!d){var n=this.getCellGeometry(l);null!=n&&(n=n.clone(),n.height-=N.height,
+this.model.setGeometry(l,n))}n=this.getCellGeometry(e);null!=n&&(n=n.clone(),n.height+=N.height,this.model.setGeometry(e,n));var aa=this.model.getChildCells(e,!0);if(0<aa.length){a[h]=d?this.cloneCell(a[h]):a[h];var V=this.model.getChildCells(a[h],!0),p=this.model.getChildCells(aa[0],!0),q=p.length-V.length;if(0<q)for(var W=0;W<q;W++){var la=this.cloneCell(V[V.length-1]);null!=la&&(la.value="",this.model.add(a[h],la))}else if(0>q)for(W=0;W>q;W--)this.model.remove(V[V.length+W-1]);V=this.model.getChildCells(a[h],
+!0);for(W=0;W<p.length;W++){var u=this.getCellGeometry(p[W]),t=this.getCellGeometry(V[W]);null!=u&&null!=t&&(t=t.clone(),t.width=u.width,this.model.setGeometry(V[W],t))}}}}for(var v=m.apply(this,arguments),h=0;h<k.length;h++)!d&&this.model.contains(k[h])&&0==this.model.getChildCount(k[h])&&this.model.remove(k[h]);d&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),v)}finally{this.model.endUpdate()}return v};var n=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,
b){var c=[];this.model.beginUpdate();try{for(var d=0;d<a.length;d++)if(this.isTableCell(a[d])){var e=this.model.getParent(a[d]),f=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(f)?0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f)&&c.push(f):this.labelChanged(a[d],"")}else{if(this.isTableRow(a[d])&&(f=this.model.getParent(a[d]),0>mxUtils.indexOf(a,f)&&0>mxUtils.indexOf(c,f))){for(var g=this.model.getChildCells(f,!0),k=0,h=0;h<g.length;h++)0<=mxUtils.indexOf(a,g[h])&&
k++;k==g.length&&c.push(f)}c.push(a[d])}c=n.apply(this,[c,b])}finally{this.model.endUpdate()}return c};Graph.prototype.updateCustomLinks=function(a,b,c){c=null!=c?c:new Graph;for(var d=0;d<b.length;d++)null!=b[d]&&c.updateCustomLinksForCell(a,b[d],c)};Graph.prototype.updateCustomLinksForCell=function(a,b){this.doUpdateCustomLinksForCell(a,b);for(var c=this.model.getChildCount(b),d=0;d<c;d++)this.updateCustomLinksForCell(a,this.model.getChildAt(b,d))};Graph.prototype.doUpdateCustomLinksForCell=function(a,
b){};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(Ba){}return d}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(f==mxConstants.DIRECTION_NORTH||f==
@@ -2781,9 +2782,9 @@ mxConstants.DIRECTION_SOUTH)f=d,d=e,e=f;c=a.shape.getConstraints(a.style,d,e);if
this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a])}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a,b,c){for(var d=this.getCurrentCellStyle(a),e=!0,f=!0,g=0;g<b.length&&f;g++)e=e&&this.isTable(b[g]),f=f&&this.isTableRow(b[g]);return("1"!=mxUtils.getValue(d,"part","0")||
this.isContainer(a))&&"0"!=mxUtils.getValue(d,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))&&!this.isTableRow(a)&&(!this.isTable(a)||f||e)};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);
null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a,b){var c=this.getModel(),d=[];c.beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e];if(c.isEdge(f)){var g=c.getTerminal(f,
-!0),k=c.getTerminal(f,!1);c.setTerminal(f,k,!0);c.setTerminal(f,g,!1);var h=c.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var l=h.getTerminalPoint(!0),m=h.getTerminalPoint(!1);h.setTerminalPoint(l,!1);h.setTerminalPoint(m,!0);c.setGeometry(f,h);var M=this.view.getState(f),n=this.view.getState(g),Z=this.view.getState(k);if(null!=M){var p=null!=n?this.getConnectionConstraint(M,n,!0):null,q=null!=Z?this.getConnectionConstraint(M,Z,!1):null;this.setConnectionConstraint(f,
-g,!0,q);this.setConnectionConstraint(f,k,!1,p);var t=mxUtils.getValue(M.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(M.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[f]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,t,[f])}d.push(f)}}else if(c.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){if(!(this.isTable(f)||this.isTableRow(f)||this.isTableCell(f)||this.isSwimlane(f))){h=h.clone();h.x+=h.width/
-2-h.height/2;h.y+=h.height/2-h.width/2;var u=h.width;h.width=h.height;h.height=u;c.setGeometry(f,h)}var v=this.view.getState(f);if(null!=v){var x=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],U=mxUtils.getValue(v.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,x[mxUtils.mod(mxUtils.indexOf(x,U)+(b?-1:1),x.length)],[f])}d.push(f)}}}finally{c.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=
+!0),k=c.getTerminal(f,!1);c.setTerminal(f,k,!0);c.setTerminal(f,g,!1);var h=c.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var l=h.getTerminalPoint(!0),m=h.getTerminalPoint(!1);h.setTerminalPoint(l,!1);h.setTerminalPoint(m,!0);c.setGeometry(f,h);var n=this.view.getState(f),N=this.view.getState(g),aa=this.view.getState(k);if(null!=n){var p=null!=N?this.getConnectionConstraint(n,N,!0):null,q=null!=aa?this.getConnectionConstraint(n,aa,!1):null;this.setConnectionConstraint(f,
+g,!0,q);this.setConnectionConstraint(f,k,!1,p);var u=mxUtils.getValue(n.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(n.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[f]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,u,[f])}d.push(f)}}else if(c.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){if(!(this.isTable(f)||this.isTableRow(f)||this.isTableCell(f)||this.isSwimlane(f))){h=h.clone();h.x+=h.width/
+2-h.height/2;h.y+=h.height/2-h.width/2;var t=h.width;h.width=h.height;h.height=t;c.setGeometry(f,h)}var v=this.view.getState(f);if(null!=v){var x=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],U=mxUtils.getValue(v.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,x[mxUtils.mod(mxUtils.indexOf(x,U)+(b?-1:1),x.length)],[f])}d.push(f)}}}finally{c.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=
function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};var p=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 c=this.view.getState(b);null!=c&&null!=c.shape&&(this.view.invalidate(b),c.shape.bounds=null)}p.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var b=0;b<a.length;b++){var c=this.view.getState(a[b]);null!=c&&null!=c.shape&&null!=c.shape.stencil&&
this.stencilHasPlaceholders(c.shape.stencil)?this.removeStateForCell(a[b]):this.isReplacePlaceholders(a[b])&&this.view.invalidate(a[b],!1,!1)}};Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)};Graph.prototype.processElements=function(a,b){if(null!=a)for(var c=a.getElementsByTagName("*"),d=
@@ -2807,19 +2808,19 @@ c&&"a"!=c.nodeName.toLowerCase();)c=c.parentNode;null!=c?this.clear():(null!=g.t
g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":
e?g.linkTarget:"_top",g.openLink(this.currentLink,k),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(this.currentTarget=g.getLinkTargetForCell(a.cell),g.container.style.cursor="pointer",null!=
this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=e);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(a){k.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;for(var c=0;c<a.length;c++)this.isTableCell(a[c])&&
-(a[c]=this.model.getParent(a[c]));a=this.model.getTopmostCells(a);var d=this.getModel(),e=this.gridSize,f=[];d.beginUpdate();try{for(var g={},k=this.createCellLookup(a),h=this.cloneCells(a,!1,g,!0),c=0;c<a.length;c++){var l=d.getParent(a[c]);if(null!=l){var m=this.moveCells([h[c]],e,e,!1)[0];f.push(m);if(b)d.add(l,h[c]);else{var n=l.getIndex(a[c]);d.add(l,h[c],n+1)}if(this.isTable(l)){var M=this.getCellGeometry(h[c]),p=this.getCellGeometry(l);null!=M&&null!=p&&(p=p.clone(),p.height+=M.height,d.setGeometry(l,
+(a[c]=this.model.getParent(a[c]));a=this.model.getTopmostCells(a);var d=this.getModel(),e=this.gridSize,f=[];d.beginUpdate();try{for(var g={},k=this.createCellLookup(a),h=this.cloneCells(a,!1,g,!0),c=0;c<a.length;c++){var l=d.getParent(a[c]);if(null!=l){var m=this.moveCells([h[c]],e,e,!1)[0];f.push(m);if(b)d.add(l,h[c]);else{var n=l.getIndex(a[c]);d.add(l,h[c],n+1)}if(this.isTable(l)){var N=this.getCellGeometry(h[c]),p=this.getCellGeometry(l);null!=N&&null!=p&&(p=p.clone(),p.height+=N.height,d.setGeometry(l,
p))}}else f.push(h[c])}this.updateCustomLinks(this.createCellMapping(g,k),h,this)}finally{d.endUpdate()}return f};Graph.prototype.insertImage=function(a,b,c){if(null!=a&&null!=this.cellEditor.textarea){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",
c);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var b=this.cellEditor.textarea.getElementsByTagName("a"),c=[],d=0;d<b.length;d++)c.push(b[d]);document.execCommand("createlink",!1,mxUtils.trim(a));b=this.cellEditor.textarea.getElementsByTagName("a");if(b.length==c.length+1)for(d=b.length-1;0<=d;d--)if(b[d]!=c[d-1]){for(b=b[d].getElementsByTagName("a");0<b.length;){for(c=b[0].parentNode;null!=
b[0].firstChild;)c.insertBefore(b[0].firstChild,b[0]);c.removeChild(b[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==c[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());
if(null!=b&&1<b.length){for(var c=[],d=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);if(null!=g){var k=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,k):k,e=null!=e?Math.min(e,k):k;c.push(g)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});g=this.view.translate;k=this.view.scale;e=e/k-(a?g.x:g.y);d=d/k-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var h=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var l=this.view.getState(this.model.getParent(c[f].cell)),
m=this.getCellGeometry(c[f].cell),d=d+h;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[f].cell,m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});
-return a};Graph.prototype.parseBackgroundImage=function(a){var b=null;null!=a&&0<a.length&&(a=JSON.parse(a),b=new mxImage(a.src,a.width,a.height));return b};Graph.prototype.getBackgroundImageObject=function(a){return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g,k,h,l,m,n,p,q){var M=null;if(null!=q)for(M=new mxDictionary,m=0;m<q.length;m++)M.put(q[m],!0);if(q=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;
-f=null!=f?f:!0;g=null!=g?g:!0;var Z="page"==p?this.view.getBackgroundPageBounds():f&&null==M||d||"diagram"==p?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),V=this.view.scale;"diagram"==p&&null!=this.backgroundImage&&Z.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*V,(this.view.translate.y+this.backgroundImage.y)*V,this.backgroundImage.width*V,this.backgroundImage.height*V));if(null==Z)throw Error(mxResources.get("drawingEmpty"));var t=mxUtils.createXmlDocument(),
-u=null!=t.createElementNS?t.createElementNS(mxConstants.NS_SVG,"svg"):t.createElement("svg");null!=a&&(null!=u.style?u.style.backgroundColor=a:u.setAttribute("style","background-color:"+a));null==t.createElementNS?(u.setAttribute("xmlns",mxConstants.NS_SVG),u.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):u.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/V;var v=Math.max(1,Math.ceil(Z.width*a)+2*c)+(l?5:0),ca=Math.max(1,Math.ceil(Z.height*a)+2*c)+(l?5:0);
-u.setAttribute("version","1.1");u.setAttribute("width",v+"px");u.setAttribute("height",ca+"px");u.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+v+" "+ca);t.appendChild(u);var la=null!=t.createElementNS?t.createElementNS(mxConstants.NS_SVG,"g"):t.createElement("g");u.appendChild(la);var x=this.createSvgCanvas(la);x.foOffset=e?-.5:0;x.textOffset=e?-.5:0;x.imageOffset=e?-.5:0;x.translate(Math.floor(c/b-Z.x/V),Math.floor(c/b-Z.y/V));var U=document.createElement("div"),I=x.getAlternateText;x.getAlternateText=
-function(a,b,c,d,e,f,g,k,h,l,m,r,y){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(U.innerHTML=f,f=mxUtils.extractTextWithWhitespace(U.childNodes));for(var B=Math.ceil(2*d/this.state.fontSize),C=[],G=0,Aa=0;(0==B||G<B)&&Aa<f.length;){var Ra=f.charCodeAt(Aa);if(10==Ra||13==Ra){if(0<G)break}else C.push(f.charAt(Aa)),255>Ra&&G++;Aa++}C.length<f.length&&1<f.length-C.length&&(f=mxUtils.trim(C.join(""))+"...");return f}catch(db){return I.apply(this,arguments)}else return I.apply(this,
-arguments)};var w=this.backgroundImage;if(null!=w){b=V/b;var A=this.view.translate,z=new mxRectangle((w.x+A.x)*b,(w.y+A.y)*b,w.width*b,w.height*b);mxUtils.intersects(Z,z)&&x.image(w.x+A.x,w.y+A.y,w.width,w.height,w.src,!0)}x.scale(a);x.textEnabled=g;k=null!=k?k:this.createSvgImageExport();var F=k.drawCellState,D=k.getLinkForCellState;k.getLinkForCellState=function(a,b){var c=D.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};k.getLinkTargetForCellState=function(a,b){return a.view.graph.getLinkTargetForCell(a.cell)};
-k.drawCellState=function(a,b){for(var c=a.view.graph,d=null!=M?M.get(a.cell):c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!(f&&null==M||d)&&null!=e;)d=null!=M?M.get(e):c.isCellSelected(e),e=c.model.getParent(e);(f&&null==M||d)&&F.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),x);this.updateSvgLinks(u,h,!0);this.addForeignObjectWarning(x,u);return u}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
+return a};Graph.prototype.parseBackgroundImage=function(a){var b=null;null!=a&&0<a.length&&(a=JSON.parse(a),b=new mxImage(a.src,a.width,a.height));return b};Graph.prototype.getBackgroundImageObject=function(a){return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g,k,h,l,m,n,p,q){var N=null;if(null!=q)for(N=new mxDictionary,m=0;m<q.length;m++)N.put(q[m],!0);if(q=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;
+f=null!=f?f:!0;g=null!=g?g:!0;var aa="page"==p?this.view.getBackgroundPageBounds():f&&null==N||d||"diagram"==p?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),V=this.view.scale;"diagram"==p&&null!=this.backgroundImage&&aa.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*V,(this.view.translate.y+this.backgroundImage.y)*V,this.backgroundImage.width*V,this.backgroundImage.height*V));if(null==aa)throw Error(mxResources.get("drawingEmpty"));var u=mxUtils.createXmlDocument(),
+t=null!=u.createElementNS?u.createElementNS(mxConstants.NS_SVG,"svg"):u.createElement("svg");null!=a&&(null!=t.style?t.style.backgroundColor=a:t.setAttribute("style","background-color:"+a));null==u.createElementNS?(t.setAttribute("xmlns",mxConstants.NS_SVG),t.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/V;var v=Math.max(1,Math.ceil(aa.width*a)+2*c)+(l?5:0),W=Math.max(1,Math.ceil(aa.height*a)+2*c)+(l?5:0);
+t.setAttribute("version","1.1");t.setAttribute("width",v+"px");t.setAttribute("height",W+"px");t.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+v+" "+W);u.appendChild(t);var la=null!=u.createElementNS?u.createElementNS(mxConstants.NS_SVG,"g"):u.createElement("g");t.appendChild(la);var x=this.createSvgCanvas(la);x.foOffset=e?-.5:0;x.textOffset=e?-.5:0;x.imageOffset=e?-.5:0;x.translate(Math.floor(c/b-aa.x/V),Math.floor(c/b-aa.y/V));var U=document.createElement("div"),I=x.getAlternateText;x.getAlternateText=
+function(a,b,c,d,e,f,g,k,h,l,m,r,C){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(U.innerHTML=f,f=mxUtils.extractTextWithWhitespace(U.childNodes));for(var A=Math.ceil(2*d/this.state.fontSize),B=[],H=0,Aa=0;(0==A||H<A)&&Aa<f.length;){var Ra=f.charCodeAt(Aa);if(10==Ra||13==Ra){if(0<H)break}else B.push(f.charAt(Aa)),255>Ra&&H++;Aa++}B.length<f.length&&1<f.length-B.length&&(f=mxUtils.trim(B.join(""))+"...");return f}catch(db){return I.apply(this,arguments)}else return I.apply(this,
+arguments)};var w=this.backgroundImage;if(null!=w){b=V/b;var z=this.view.translate,y=new mxRectangle((w.x+z.x)*b,(w.y+z.y)*b,w.width*b,w.height*b);mxUtils.intersects(aa,y)&&x.image(w.x+z.x,w.y+z.y,w.width,w.height,w.src,!0)}x.scale(a);x.textEnabled=g;k=null!=k?k:this.createSvgImageExport();var F=k.drawCellState,D=k.getLinkForCellState;k.getLinkForCellState=function(a,b){var c=D.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};k.getLinkTargetForCellState=function(a,b){return a.view.graph.getLinkTargetForCell(a.cell)};
+k.drawCellState=function(a,b){for(var c=a.view.graph,d=null!=N?N.get(a.cell):c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!(f&&null==N||d)&&null!=e;)d=null!=N?N.get(e):c.isCellSelected(e),e=c.model.getParent(e);(f&&null==N||d)&&F.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),x);this.updateSvgLinks(t,h,!0);this.addForeignObjectWarning(x,t);return t}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
function(a,b){if("0"!=urlParams["svg-warning"]&&0<b.getElementsByTagName("foreignObject").length){var c=a.createElement("switch"),d=a.createElement("g");d.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=a.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||b.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,
"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);c.appendChild(d);e.appendChild(f);c.appendChild(e);b.appendChild(c)}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++)if(null==a[d].getAttribute("target")){var e=
a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&
@@ -2842,9 +2843,9 @@ b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.co
[a,e,f])})};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.isTextSelected=function(){var a="";window.getSelection?a=window.getSelection():document.getSelection?a=document.getSelection():document.selection&&(a=document.selection.createRange().text);
return""!=a};mxCellEditor.prototype.insertTab=function(a){var b=this.textarea.ownerDocument.defaultView.getSelection(),c=b.getRangeAt(0),d="\t";if(null!=a)for(d="";0<a;)d+=" ",a--;a=document.createElement("span");a.style.whiteSpace="pre";a.appendChild(document.createTextNode(d));c.insertNode(a);c.setStartAfter(a);c.setEndAfter(a);b.removeAllRanges();b.addRange(c)};mxCellEditor.prototype.alignText=function(a,b){var c=null!=b&&mxEvent.isShiftDown(b);if(c||null!=window.getSelection&&null!=window.getSelection().containsNode){var d=
!0;this.graph.processElements(this.textarea,function(a){c||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):d=!1});d&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
-return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(ca){}};var t=mxCellRenderer.prototype.postConfigureShape;mxCellRenderer.prototype.postConfigureShape=function(a){var b=Editor.isDarkMode()?"#ffffff":"#000000",c=a.view.graph.defaultPageBackgroundColor;this.resolveDefaultColor(a,"fill",a.shape,c);this.resolveDefaultColor(a,
-"stroke",a.shape,b);this.resolveDefaultColor(a,"laneFill",a.shape,c);this.resolveDefaultColor(a,"imageBackground",a.shape,c);this.resolveDefaultColor(a,"imageBorder",a.shape,b);this.resolveDefaultColor(a,"background",a.text,c);this.resolveDefaultColor(a,"color",a.text,b);t.apply(this,arguments)};mxCellRenderer.prototype.resolveDefaultColor=function(a,b,c,d){null!=c&&"default"==c[b]&&(c[b]=d)};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 u=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?u.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var x=mxCellEditor.prototype.startEditing;
+return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(W){}};var u=mxCellRenderer.prototype.postConfigureShape;mxCellRenderer.prototype.postConfigureShape=function(a){var b=Editor.isDarkMode()?"#ffffff":"#000000",c=a.view.graph.defaultPageBackgroundColor;this.resolveDefaultColor(a,"fill",a.shape,c);this.resolveDefaultColor(a,
+"stroke",a.shape,b);this.resolveDefaultColor(a,"laneFill",a.shape,c);this.resolveDefaultColor(a,"imageBackground",a.shape,c);this.resolveDefaultColor(a,"imageBorder",a.shape,b);this.resolveDefaultColor(a,"background",a.text,c);this.resolveDefaultColor(a,"color",a.text,b);u.apply(this,arguments)};mxCellRenderer.prototype.resolveDefaultColor=function(a,b,c,d){null!=c&&"default"==c[b]&&(c[b]=d)};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=!1;var x=mxCellEditor.prototype.startEditing;
mxCellEditor.prototype.startEditing=function(a,b){a=this.graph.getStartEditingCell(a,b);x.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);if(this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a))this.textarea.style.outline=
mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var w=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=
a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}w.apply(this,arguments);
@@ -2854,18 +2855,18 @@ mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALI
0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&k.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=k.join(" ");this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=e;this.textarea.style.padding=
"0px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var h=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(b?
h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;
-this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()}};var A=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=
+this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()}};var z=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=
a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-
4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-this.textarea.clientWidth)+
-"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",A.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html",
+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",z.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(a,b){if("0"==mxUtils.getValue(a.style,"html",
"0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return b=
-"1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var E=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();E.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(M){}};var H=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();
-try{H.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!=
+"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 E=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();E.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(N){}};var G=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,b){this.graph.getModel().beginUpdate();
+try{G.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 d=this.graph.view.translate,e=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/e-d.x);d=this.roundLength((this.bounds.y+this.currentDy)/e-d.y);e=this.graph.view.unit;this.hint.innerHTML=
-c(b,e)+", "+c(d,e);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var D=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,b){D.apply(this,arguments);var c=this.graph.getCellStyle(a);if(null==
+!mxEvent.isAltDown(b.getEvent)};mxGraphView.prototype.formatUnitText=function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/e-d.x);d=this.roundLength((this.bounds.y+this.currentDy)/e-d.y);e=this.graph.view.unit;this.hint.innerHTML=
+b(c,e)+", "+b(d,e);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var D=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(a,b){D.apply(this,arguments);var c=this.graph.getCellStyle(a);if(null==
c.childLayout){var d=this.graph.model.getParent(a),e=null!=d?this.graph.getCellGeometry(d):null;if(null!=e&&(c=this.graph.getCellStyle(d),"stackLayout"==c.childLayout)){var f=parseFloat(mxUtils.getValue(c,"stackBorder",mxStackLayout.prototype.border)),c="1"==mxUtils.getValue(c,"horizontalStack","1"),g=this.graph.getActualStartSize(d),e=e.clone();c?e.height=b.height+g.y+g.height+2*f:e.width=b.width+g.x+g.width+2*f;this.graph.model.setGeometry(d,e)}}};var F=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
-mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){c.get(a)||(c.put(a,!0),e.push(a))}for(var b=F.apply(this,arguments),c=new mxDictionary,d=this.graph.model,e=[],f=0;f<b.length;f++){var g=b[f];this.graph.isTableCell(g)?a(d.getParent(d.getParent(g))):this.graph.isTableRow(g)&&a(d.getParent(g));a(g)}return e};var z=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var b=z.apply(this,arguments);b.stroke=
+mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){c.get(a)||(c.put(a,!0),e.push(a))}for(var b=F.apply(this,arguments),c=new mxDictionary,d=this.graph.model,e=[],f=0;f<b.length;f++){var g=b[f];this.graph.isTableCell(g)?a(d.getParent(d.getParent(g))):this.graph.isTableRow(g)&&a(d.getParent(g));a(g)}return e};var y=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var b=y.apply(this,arguments);b.stroke=
"#C0C0C0";b.strokewidth=1;return b};var I=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var b=I.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 K=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return K.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 L=mxVertexHandler.prototype.isParentHighlightVisible;
@@ -2876,17 +2877,17 @@ h=null!=h?b.getCellGeometry(h):null,m=null!=h&&null!=h.alternateBounds?h.alterna
n)*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=d.y+(c==k.length-1?0:a.y*this.graph.view.scale);this.shape.bounds.height=d.height-(c==k.length-1?0:(a.height+a.y)*this.graph.view.scale);this.shape.redraw()}};var p=!1;g.setPosition=function(a,b,c){n=Math.max(Graph.minTableColumnWidth-l.width,b.x-a.x-l.width);p=mxEvent.isShiftDown(c.getEvent());null==m||p||(n=Math.min(n,m.width-Graph.minTableColumnWidth))};g.execute=function(a){if(0!=n)b.setTableColumnWidth(this.state.cell,n,p);
else if(!f.blockDelayedSelection){var c=b.getCellAt(a.getGraphX(),a.getGraphY())||d.cell;b.graphHandler.selectCellForEvent(c,a)}n=0};g.positionChanged=function(){};g.reset=function(){n=0};a.push(g)})(c);for(c=0;c<g.length;c++)mxUtils.bind(this,function(c){c=g[c];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;c=new mxHandle(c,"row-resize",null,k);c.tableHandle=!0;var h=0;c.shape.node.parentNode.insertBefore(c.shape.node,c.shape.node.parentNode.firstChild);
c.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==h?mxConstants.NONE:e.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+h*this.graph.view.scale,this.shape.bounds.height=1,this.shape.redraw())};c.setPosition=function(a,b,c){h=Math.max(Graph.minTableRowHeight-a.height,b.y-a.y-a.height)};c.execute=function(a){if(0!=h)b.setTableRowHeight(this.state.cell,h,!mxEvent.isShiftDown(a.getEvent()));
-else if(!f.blockDelayedSelection){var c=b.getCellAt(a.getGraphX(),a.getGraphY())||d.cell;b.graphHandler.selectCellForEvent(c,a)}h=0};c.reset=function(){h=0};a.push(c)})(c)}}return null!=a?a.reverse():null};var aa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){aa.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=
+else if(!f.blockDelayedSelection){var c=b.getCellAt(a.getGraphX(),a.getGraphY())||d.cell;b.graphHandler.selectCellForEvent(c,a)}h=0};c.reset=function(){h=0};a.push(c)})(c)}}return null!=a?a.reverse():null};var ba=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){ba.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 c=mxUtils.createImage(Editor.rowMoveImage);c.style.position="absolute";c.style.cursor="pointer";c.style.width="7px";c.style.height=
"4px";c.style.padding="4px 2px 4px 2px";c.rowState=b;mxEvent.addGestureListeners(c,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))}));this.moveHandles.push(c);this.graph.container.appendChild(c)}})(this.graph.view.getState(a.getChildAt(this.state.cell,b)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var a=0;a<this.customHandles.length;a++)this.customHandles[a].destroy();
-this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var X=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance,c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&mxStencilRegistry.getStencil(c);c=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!c&&null!=this.customHandles)for(var d=0;d<this.customHandles.length;d++)if(null!=
+this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var Y=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance,c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&mxStencilRegistry.getStencil(c);c=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!c&&null!=this.customHandles)for(var d=0;d<this.customHandles.length;d++)if(null!=
this.customHandles[d].shape&&null!=this.customHandles[d].shape.bounds){var e=this.customHandles[d].shape.bounds,f=e.getCenterX(),g=e.getCenterY();if(Math.abs(this.state.x-f)<e.width/2||Math.abs(this.state.y-g)<e.height/2||Math.abs(this.state.x+this.state.width-f)<e.width/2||Math.abs(this.state.y+this.state.height-g)<e.height/2){c=!0;break}}c&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,this.graph.isTable(this.state.cell)&&(b+=7),a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+
-b):a=X.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{b=this.state.view.scale;var d=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/b),d)+" x "+c(this.roundLength(this.bounds.height/b),d)}b=mxUtils.getBoundingBox(this.bounds,
-null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==b&&(b=this.bounds);this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=b.y+b.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var Q=mxEdgeHandler.prototype.mouseMove;
-mxEdgeHandler.prototype.mouseMove=function(a,b){Q.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var S=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,b){S.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(b,d){null==this.hint&&
-(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,f=this.graph.view.scale,g=this.roundLength(d.x/f-e.x),e=this.roundLength(d.y/f-e.y),f=this.graph.view.unit;this.hint.innerHTML=c(g,f)+", "+c(e,f);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+
-"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),d.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
+b):a=Y.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{c=this.state.view.scale;var d=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),d)+" x "+b(this.roundLength(this.bounds.height/c),d)}c=mxUtils.getBoundingBox(this.bounds,
+null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=c.y+c.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var Q=mxEdgeHandler.prototype.mouseMove;
+mxEdgeHandler.prototype.mouseMove=function(a,b){Q.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var S=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,b){S.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,d){null==this.hint&&
+(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,f=this.graph.view.scale,g=this.roundLength(d.x/f-e.x),e=this.roundLength(d.y/f-e.y),f=this.graph.view.unit;this.hint.innerHTML=b(g,f)+", "+b(e,f);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+
+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),d.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22" stroke-width="1"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>'):
new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+
'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,
@@ -2918,17 +2919,17 @@ this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.m
this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);b=this.graph.getLinkForCell(this.state.cell);c=this.graph.getLinksForState(this.state);this.updateLinkHint(b,c);if(null!=b||null!=c&&0<c.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){try{if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==
this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.createLinkForHint(b)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");
d.setAttribute("src",Editor.editImage);d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));this.linkHint.appendChildGraph.createRemoveIcon(mxResources.get("removeIt",[mxResources.get("link")]),
-mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var e=document.createElement("div");e.style.marginTop=null!=b||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));this.linkHint.appendChild(e)}}}catch(la){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var ba=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=
-function(){ba.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),
+mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var e=document.createElement("div");e.style.marginTop=null!=b||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));this.linkHint.appendChild(e)}}}catch(la){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var ca=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=
+function(){ca.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),
this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var fa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){fa.apply(this,arguments);this.constraintHandler.isEnabled=
mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ma=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var a=0;a<this.moveHandles.length;a++)this.moveHandles[a].style.left=this.moveHandles[a].rowState.x+this.moveHandles[a].rowState.width-5+"px",this.moveHandles[a].style.top=this.moveHandles[a].rowState.y+this.moveHandles[a].rowState.height/2-6+"px";if(null!=this.cornerHandles){var a=this.getSelectionBorderInset(),
b=this.cornerHandles,c=b[0].bounds.height/2;b[0].bounds.x=this.state.x-b[0].bounds.width/2+a;b[0].bounds.y=this.state.y-c+a;b[0].redraw();b[1].bounds.x=b[0].bounds.x+this.state.width-2*a;b[1].bounds.y=b[0].bounds.y;b[1].redraw();b[2].bounds.x=b[0].bounds.x;b[2].bounds.y=this.state.y+this.state.height-2*a;b[2].redraw();b[3].bounds.x=b[1].bounds.x;b[3].bounds.y=b[2].bounds.y;b[3].redraw();for(a=0;a<this.cornerHandles.length;a++)this.cornerHandles[a].node.style.display=1==this.graph.getSelectionCount()?
"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");ma.apply(this);null!=this.state&&null!=this.linkHint&&(a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null,null==c&&(c=this.state),c=c.y+c.height,null!=b&&(c=Math.max(c,b.y+b.height)),this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px",this.linkHint.style.top=Math.round(c+this.verticalOffset/2+Editor.hintOffset)+"px")};var ia=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
function(){ia.apply(this,arguments);if(null!=this.moveHandles){for(var a=0;a<this.moveHandles.length;a++)null!=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 W=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(W.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 ra=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ra.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var Y=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Y.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.inactiveTabBackgroundColor="#f1f3f4";Format.classicFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 10 2 L 5 8 L 10 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.classicThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 3 8 L 8 12 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
+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 X=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
+function(){if(null!=this.marker&&(X.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 ra=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ra.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)}}();Format=function(a,b){this.editorUi=a;this.container=b};Format.inactiveTabBackgroundColor="#f1f3f4";Format.classicFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 10 2 L 5 8 L 10 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.classicThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 3 8 L 8 12 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
Format.openFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 0 L 0 8 L 8 16 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.openThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 4 L 0 8 L 8 12 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
Format.openAsyncFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 4 L 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.blockFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
Format.blockThinFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 4 L 8 12 Z M 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.asyncFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 6 8 L 6 4 L 0 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);
@@ -2945,193 +2946,195 @@ Format.ERmanyMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(
Format.ERzeroToOneMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 8 A 5 5 0 0 1 13 3 A 5 5 0 0 1 18 8 A 5 5 0 0 1 13 13 A 5 5 0 0 1 8 8 Z M 0 8 L 8 8 M 18 8 L 24 8 M 4 3 L 4 13" stroke="#404040" fill="transparent"/>',32,20);
Format.ERzeroToManyMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 8 8 A 5 5 0 0 1 13 3 A 5 5 0 0 1 18 8 A 5 5 0 0 1 13 13 A 5 5 0 0 1 8 8 Z M 0 8 L 8 8 M 18 8 L 24 8 M 0 3 L 8 8 L 0 13" stroke="#404040" fill="transparent"/>',32,20);Format.EROneMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 5 2 L 5 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
Format.baseDashMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 0 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.doubleBlockMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 8 8 L 16 2 L 16 14 Z M 16 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
-Format.doubleBlockFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 8 8 L 16 2 L 16 14 Z M 16 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.processMenuIcon=function(a,c){var b=a.getElementsByTagName("img");0<b.length&&(Editor.isDarkMode()&&(b[0].style.filter="invert(100%)"),b[0].className="geIcon",b[0].style.padding="0px",b[0].style.margin="0 0 0 2px",null!=c&&mxUtils.setPrefixedStyle(b[0].style,"transform",c));return a};
+Format.doubleBlockFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 8 8 L 16 2 L 16 14 Z M 16 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.processMenuIcon=function(a,b){var d=a.getElementsByTagName("img");0<d.length&&(Editor.isDarkMode()&&(d[0].style.filter="invert(100%)"),d[0].className="geIcon",d[0].style.padding="0px",d[0].style.margin="0 0 0 2px",null!=b&&mxUtils.setPrefixedStyle(d[0].style,"transform",b));return a};
Format.prototype.labelIndex=0;Format.prototype.diagramIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Format.prototype.init=function(){var a=this.editorUi,c=a.editor,b=c.graph;this.update=mxUtils.bind(this,function(a,b){this.clearSelectionState();this.refresh()});b.getSelectionModel().addListener(mxEvent.CHANGE,this.update);b.addListener(mxEvent.EDITING_STARTED,this.update);b.addListener(mxEvent.EDITING_STOPPED,this.update);b.getModel().addListener(mxEvent.CHANGE,this.update);b.getView().addListener("unitChanged",this.update);b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){this.refresh()}));
-a.addListener("styleChanged",mxUtils.bind(this,function(a,b){this.refresh()}));c.addListener("autosaveChanged",mxUtils.bind(this,function(){this.refresh()}));this.refresh()};Format.prototype.clearSelectionState=function(){this.selectionState=null};Format.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
-Format.prototype.createSelectionState=function(){for(var a=this.editorUi.editor.graph.getSelectionCells(),c=this.initSelectionState(),b=!0,e=0;e<a.length;e++){var d=this.editorUi.editor.graph.getCurrentCellStyle(a[e]);"0"!=mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(c,a[e],a,b),b=!1)}return c};
+Format.prototype.init=function(){var a=this.editorUi,b=a.editor,d=b.graph;this.update=mxUtils.bind(this,function(a,b){this.clearSelectionState();this.refresh()});d.getSelectionModel().addListener(mxEvent.CHANGE,this.update);d.addListener(mxEvent.EDITING_STARTED,this.update);d.addListener(mxEvent.EDITING_STOPPED,this.update);d.getModel().addListener(mxEvent.CHANGE,this.update);d.getView().addListener("unitChanged",this.update);d.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){this.refresh()}));
+a.addListener("styleChanged",mxUtils.bind(this,function(a,b){this.refresh()}));b.addListener("autosaveChanged",mxUtils.bind(this,function(){this.refresh()}));this.refresh()};Format.prototype.clearSelectionState=function(){this.selectionState=null};Format.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
+Format.prototype.createSelectionState=function(){for(var a=this.editorUi.editor.graph.getSelectionCells(),b=this.initSelectionState(),d=!0,e=0;e<a.length;e++){var c=this.editorUi.editor.graph.getCurrentCellStyle(a[e]);"0"!=mxUtils.getValue(c,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(b,a[e],a,d),d=!1)}return b};
Format.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0}};
-Format.prototype.updateSelectionStateForCell=function(a,c,b,e){b=this.editorUi.editor.graph;a.cells.push(c);if(b.getModel().isVertex(c)){a.resizable=a.resizable&&b.isCellResizable(c);a.rotatable=a.rotatable&&b.isCellRotatable(c);a.movable=a.movable&&b.isCellMovable(c)&&!b.isTableRow(c)&&!b.isTableCell(c);a.table=a.table||b.isTable(c);a.cell=a.cell||b.isTableCell(c);a.row=a.row||b.isTableRow(c);a.vertices.push(c);var d=b.getCellGeometry(c);if(null!=d&&(0<d.width?null==a.width?a.width=d.width:a.width!=
-d.width&&(a.width=""):a.containsLabel=!0,0<d.height?null==a.height?a.height=d.height:a.height!=d.height&&(a.height=""):a.containsLabel=!0,!d.relative||null!=d.offset)){var f=d.relative?d.offset.x:d.x,d=d.relative?d.offset.y:d.y;null==a.x?a.x=f:a.x!=f&&(a.x="");null==a.y?a.y=d:a.y!=d&&(a.y="")}}else b.getModel().isEdge(c)&&(a.edges.push(c),a.resizable=!1,a.rotatable=!1,a.movable=!1);c=b.view.getState(c);null!=c&&(a.autoSize=a.autoSize||this.isAutoSizeState(c),a.glass=a.glass&&this.isGlassState(c),
-a.rounded=a.rounded&&this.isRoundedState(c),a.lineJumps=a.lineJumps&&this.isLineJumpState(c),a.image=a.image&&this.isImageState(c),a.shadow=a.shadow&&this.isShadowState(c),a.fill=a.fill&&this.isFillState(c),a.stroke=a.stroke&&this.isStrokeState(c),f=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==f,b.mergeStyle(c.style,a.style,e))};
+Format.prototype.updateSelectionStateForCell=function(a,b,d,e){d=this.editorUi.editor.graph;a.cells.push(b);if(d.getModel().isVertex(b)){a.resizable=a.resizable&&d.isCellResizable(b);a.rotatable=a.rotatable&&d.isCellRotatable(b);a.movable=a.movable&&d.isCellMovable(b)&&!d.isTableRow(b)&&!d.isTableCell(b);a.table=a.table||d.isTable(b);a.cell=a.cell||d.isTableCell(b);a.row=a.row||d.isTableRow(b);a.vertices.push(b);var c=d.getCellGeometry(b);if(null!=c&&(0<c.width?null==a.width?a.width=c.width:a.width!=
+c.width&&(a.width=""):a.containsLabel=!0,0<c.height?null==a.height?a.height=c.height:a.height!=c.height&&(a.height=""):a.containsLabel=!0,!c.relative||null!=c.offset)){var f=c.relative?c.offset.x:c.x,c=c.relative?c.offset.y:c.y;null==a.x?a.x=f:a.x!=f&&(a.x="");null==a.y?a.y=c:a.y!=c&&(a.y="")}}else d.getModel().isEdge(b)&&(a.edges.push(b),a.resizable=!1,a.rotatable=!1,a.movable=!1);b=d.view.getState(b);null!=b&&(a.autoSize=a.autoSize||this.isAutoSizeState(b),a.glass=a.glass&&this.isGlassState(b),
+a.rounded=a.rounded&&this.isRoundedState(b),a.lineJumps=a.lineJumps&&this.isLineJumpState(b),a.image=a.image&&this.isImageState(b),a.shadow=a.shadow&&this.isShadowState(b),a.fill=a.fill&&this.isFillState(b),a.stroke=a.stroke&&this.isStrokeState(b),f=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==f,d.mergeStyle(b.style,a.style,e))};
Format.prototype.isFillState=function(a){return!this.isSpecialColor(a.style[mxConstants.STYLE_FILLCOLOR])&&(a.view.graph.model.isVertex(a.cell)||"arrow"==mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null))};Format.prototype.isStrokeState=function(a){return!this.isSpecialColor(a.style[mxConstants.STYLE_STROKECOLOR])};
Format.prototype.isSpecialColor=function(a){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],a)};Format.prototype.isGlassState=function(a){a=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);return"label"==a||"rectangle"==a||"internalStorage"==a||"ext"==a||"umlLifeline"==a||"swimlane"==a||"process"==a};
-Format.prototype.isRoundedState=function(a){return null!=a.shape?a.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null))};Format.prototype.isLineJumpState=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(a.style,mxConstants.STYLE_CURVED,!1)&&("connector"==c||"filledEdge"==c)};Format.prototype.isAutoSizeState=function(a){return"1"==mxUtils.getValue(a.style,mxConstants.STYLE_AUTOSIZE,null)};
+Format.prototype.isRoundedState=function(a){return null!=a.shape?a.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null))};Format.prototype.isLineJumpState=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(a.style,mxConstants.STYLE_CURVED,!1)&&("connector"==b||"filledEdge"==b)};Format.prototype.isAutoSizeState=function(a){return"1"==mxUtils.getValue(a.style,mxConstants.STYLE_AUTOSIZE,null)};
Format.prototype.isImageState=function(a){a=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);return"label"==a||"image"==a};Format.prototype.isShadowState=function(a){return"image"!=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null)};Format.prototype.clear=function(){this.container.innerHTML="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};
Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};
-Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,c=a.editor.graph,b=document.createElement("div");b.style.whiteSpace="nowrap";b.style.color="rgb(112, 112, 112)";b.style.textAlign="left";b.style.cursor="default";var e=document.createElement("div");e.className="geFormatSection";e.style.textAlign="center";e.style.fontWeight="bold";e.style.paddingTop="8px";e.style.fontSize="13px";e.style.borderWidth="0px 0px 1px 1px";e.style.borderStyle=
-"solid";e.style.display="inline-block";e.style.height="25px";e.style.overflow="hidden";e.style.width="100%";this.container.appendChild(b);mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));var d=this.getSelectionState(),f=d.containsLabel,k=null,h=null,g=mxUtils.bind(this,function(a,b,d,e){var g=mxUtils.bind(this,function(e){k!=a&&(f?this.labelIndex=d:c.isSelectionEmpty()?this.diagramIndex=d:this.currentIndex=d,null!=k&&(k.style.backgroundColor=
-Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=a,k.style.backgroundColor="",k.style.borderBottomWidth="0px",h!=b&&(null!=h&&(h.style.display="none"),h=b,h.style.display=""))});mxEvent.addListener(a,"click",g);mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));(e&&null==k||d==(f?this.labelIndex:c.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&g()}),l=0;if(c.isSelectionEmpty()){mxUtils.write(e,mxResources.get("diagram"));
-e.style.borderLeftWidth="0px";b.appendChild(e);d=b.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,d));this.container.appendChild(d);if(null!=Editor.styles){d.style.display="none";e.style.width=this.showCloseButton?"106px":"50%";e.style.cursor="pointer";e.style.backgroundColor=Format.inactiveTabBackgroundColor;var m=e.cloneNode(!1);m.style.borderLeftWidth="1px";m.style.borderRightWidth="1px";m.style.backgroundColor=Format.inactiveTabBackgroundColor;g(e,d,l++);var n=b.cloneNode(!1);n.style.display=
-"none";mxUtils.write(m,mxResources.get("style"));b.appendChild(m);this.panels.push(new DiagramStylePanel(this,a,n));this.container.appendChild(n);g(m,n,l++)}this.showCloseButton&&(m=e.cloneNode(!1),m.style.borderLeftWidth="1px",m.style.borderRightWidth="1px",m.style.borderBottomWidth="1px",m.style.backgroundColor=Format.inactiveTabBackgroundColor,m.style.position="absolute",m.style.right="0px",m.style.top="0px",m.style.width="25px",g=document.createElement("img"),g.setAttribute("border","0"),g.setAttribute("src",
-Dialog.prototype.closeImage),g.setAttribute("title",mxResources.get("hide")),g.style.position="absolute",g.style.display="block",g.style.right="0px",g.style.top="8px",g.style.cursor="pointer",g.style.marginTop="1px",g.style.marginRight="6px",g.style.border="1px solid transparent",g.style.padding="1px",g.style.opacity=.5,m.appendChild(g),mxEvent.addListener(g,"click",function(){a.actions.get("formatPanel").funct()}),b.appendChild(m))}else if(c.isEditing())mxUtils.write(e,mxResources.get("text")),b.appendChild(e),
-this.panels.push(new TextFormatPanel(this,a,b));else{e.style.backgroundColor=Format.inactiveTabBackgroundColor;e.style.borderLeftWidth="1px";e.style.cursor="pointer";e.style.width=f||0==d.cells.length?"50%":"33.3%";var m=e.cloneNode(!1),p=m.cloneNode(!1);m.style.backgroundColor=Format.inactiveTabBackgroundColor;p.style.backgroundColor=Format.inactiveTabBackgroundColor;f?m.style.borderLeftWidth="0px":(e.style.borderLeftWidth="0px",mxUtils.write(e,mxResources.get("style")),b.appendChild(e),n=b.cloneNode(!1),
-n.style.display="none",this.panels.push(new StyleFormatPanel(this,a,n)),this.container.appendChild(n),g(e,n,l++));mxUtils.write(m,mxResources.get("text"));b.appendChild(m);e=b.cloneNode(!1);e.style.display="none";this.panels.push(new TextFormatPanel(this,a,e));this.container.appendChild(e);mxUtils.write(p,mxResources.get("arrange"));b.appendChild(p);b=b.cloneNode(!1);b.style.display="none";this.panels.push(new ArrangePanel(this,a,b));this.container.appendChild(b);0<d.cells.length?g(m,e,l++):m.style.display=
-"none";g(p,b,l++,!0)}}};BaseFormatPanel=function(a,c,b){this.format=a;this.editorUi=c;this.container=b;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
-BaseFormatPanel.prototype.installInputHandler=function(a,c,b,e,d,f,k,h){f=null!=f?f:"";h=null!=h?h:!1;var g=this.editorUi,l=g.editor.graph;e=null!=e?e:1;d=null!=d?d:999;var m=null,n=!1,p=mxUtils.bind(this,function(p){var q=h?parseFloat(a.value):parseInt(a.value);isNaN(q)||c!=mxConstants.STYLE_ROTATION||(q=mxUtils.mod(Math.round(100*q),36E3)/100);q=Math.min(d,Math.max(e,isNaN(q)?b:q));if(l.cellEditor.isContentEditing()&&k)n||(n=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),k(q),a.value=q+f,
-n=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,b)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{var v=this.format.getSelectionState().cells;l.setCellStyles(c,q,v);c==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(v,function(a){a.style.fontSize=q+"px";a.removeAttribute("size")});for(var u=0;u<v.length;u++)0==l.model.getChildCount(v[u])&&l.autoSizeCell(v[u],!1);g.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[q],"cells",v))}finally{l.getModel().endUpdate()}}a.value=
+Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.color="rgb(112, 112, 112)";d.style.textAlign="left";d.style.cursor="default";var e=document.createElement("div");e.className="geFormatSection";e.style.textAlign="center";e.style.fontWeight="bold";e.style.paddingTop="8px";e.style.fontSize="13px";e.style.borderWidth="0px 0px 1px 1px";e.style.borderStyle=
+"solid";e.style.display="inline-block";e.style.height="25px";e.style.overflow="hidden";e.style.width="100%";this.container.appendChild(d);mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));var c=this.getSelectionState(),f=c.containsLabel,k=null,h=null,g=mxUtils.bind(this,function(a,c,d,e){var g=mxUtils.bind(this,function(e){k!=a&&(f?this.labelIndex=d:b.isSelectionEmpty()?this.diagramIndex=d:this.currentIndex=d,null!=k&&(k.style.backgroundColor=
+Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=a,k.style.backgroundColor="",k.style.borderBottomWidth="0px",h!=c&&(null!=h&&(h.style.display="none"),h=c,h.style.display=""))});mxEvent.addListener(a,"click",g);mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));(e&&null==k||d==(f?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&g()}),l=0;if(b.isSelectionEmpty()){mxUtils.write(e,mxResources.get("diagram"));
+e.style.borderLeftWidth="0px";d.appendChild(e);c=d.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,c));this.container.appendChild(c);if(null!=Editor.styles){c.style.display="none";e.style.width=this.showCloseButton?"106px":"50%";e.style.cursor="pointer";e.style.backgroundColor=Format.inactiveTabBackgroundColor;var m=e.cloneNode(!1);m.style.borderLeftWidth="1px";m.style.borderRightWidth="1px";m.style.backgroundColor=Format.inactiveTabBackgroundColor;g(e,c,l++);var n=d.cloneNode(!1);n.style.display=
+"none";mxUtils.write(m,mxResources.get("style"));d.appendChild(m);this.panels.push(new DiagramStylePanel(this,a,n));this.container.appendChild(n);g(m,n,l++)}this.showCloseButton&&(m=e.cloneNode(!1),m.style.borderLeftWidth="1px",m.style.borderRightWidth="1px",m.style.borderBottomWidth="1px",m.style.backgroundColor=Format.inactiveTabBackgroundColor,m.style.position="absolute",m.style.right="0px",m.style.top="0px",m.style.width="25px",g=document.createElement("img"),g.setAttribute("border","0"),g.setAttribute("src",
+Dialog.prototype.closeImage),g.setAttribute("title",mxResources.get("hide")),g.style.position="absolute",g.style.display="block",g.style.right="0px",g.style.top="8px",g.style.cursor="pointer",g.style.marginTop="1px",g.style.marginRight="6px",g.style.border="1px solid transparent",g.style.padding="1px",g.style.opacity=.5,m.appendChild(g),mxEvent.addListener(g,"click",function(){a.actions.get("formatPanel").funct()}),d.appendChild(m))}else if(b.isEditing())mxUtils.write(e,mxResources.get("text")),d.appendChild(e),
+this.panels.push(new TextFormatPanel(this,a,d));else{e.style.backgroundColor=Format.inactiveTabBackgroundColor;e.style.borderLeftWidth="1px";e.style.cursor="pointer";e.style.width=f||0==c.cells.length?"50%":"33.3%";var m=e.cloneNode(!1),p=m.cloneNode(!1);m.style.backgroundColor=Format.inactiveTabBackgroundColor;p.style.backgroundColor=Format.inactiveTabBackgroundColor;f?m.style.borderLeftWidth="0px":(e.style.borderLeftWidth="0px",mxUtils.write(e,mxResources.get("style")),d.appendChild(e),n=d.cloneNode(!1),
+n.style.display="none",this.panels.push(new StyleFormatPanel(this,a,n)),this.container.appendChild(n),g(e,n,l++));mxUtils.write(m,mxResources.get("text"));d.appendChild(m);e=d.cloneNode(!1);e.style.display="none";this.panels.push(new TextFormatPanel(this,a,e));this.container.appendChild(e);mxUtils.write(p,mxResources.get("arrange"));d.appendChild(p);d=d.cloneNode(!1);d.style.display="none";this.panels.push(new ArrangePanel(this,a,d));this.container.appendChild(d);0<c.cells.length?g(m,e,l++):m.style.display=
+"none";g(p,d,l++,!0)}}};BaseFormatPanel=function(a,b,d){this.format=a;this.editorUi=b;this.container=d;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
+BaseFormatPanel.prototype.installInputHandler=function(a,b,d,e,c,f,k,h){f=null!=f?f:"";h=null!=h?h:!1;var g=this.editorUi,l=g.editor.graph;e=null!=e?e:1;c=null!=c?c:999;var m=null,n=!1,p=mxUtils.bind(this,function(p){var q=h?parseFloat(a.value):parseInt(a.value);isNaN(q)||b!=mxConstants.STYLE_ROTATION||(q=mxUtils.mod(Math.round(100*q),36E3)/100);q=Math.min(c,Math.max(e,isNaN(q)?d:q));if(l.cellEditor.isContentEditing()&&k)n||(n=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),k(q),a.value=q+f,
+n=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,b,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{var v=this.format.getSelectionState().cells;l.setCellStyles(b,q,v);b==mxConstants.STYLE_FONTSIZE&&l.updateLabelElements(v,function(a){a.style.fontSize=q+"px";a.removeAttribute("size")});for(var t=0;t<v.length;t++)0==l.model.getChildCount(v[t])&&l.autoSizeCell(v[t],!1);g.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[q],"cells",v))}finally{l.getModel().endUpdate()}}a.value=
q+f;mxEvent.consume(p)});k&&l.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==l.cellEditor.textarea&&(m=l.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",p);mxEvent.addListener(a,"blur",p);return p};
-BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 14px";return a};BaseFormatPanel.prototype.createTitle=function(a){var c=document.createElement("div");c.style.padding="0px 0px 6px 0px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.width="200px";c.style.fontWeight="bold";mxUtils.write(c,a);return c};
-BaseFormatPanel.prototype.createStepper=function(a,c,b,e,d,f,k){b=null!=b?b:1;e=null!=e?e:9;var h=document.createElement("div");mxUtils.setPrefixedStyle(h.style,"borderRadius","3px");h.style.border="1px solid rgb(192, 192, 192)";h.style.position="absolute";var g=document.createElement("div");g.style.borderBottom="1px solid rgb(192, 192, 192)";g.style.position="relative";g.style.height=e+"px";g.style.width="10px";g.className="geBtnUp";h.appendChild(g);var l=g.cloneNode(!1);l.style.border="none";l.style.height=
-e+"px";l.className="geBtnDown";h.appendChild(l);mxEvent.addListener(l,"click",function(d){""==a.value&&(a.value=f||"2");var e=k?parseFloat(a.value):parseInt(a.value);isNaN(e)||(a.value=e-b,null!=c&&c(d));mxEvent.consume(d)});mxEvent.addListener(g,"click",function(d){""==a.value&&(a.value=f||"0");var e=k?parseFloat(a.value):parseInt(a.value);isNaN(e)||(a.value=e+b,null!=c&&c(d));mxEvent.consume(d)});if(d){var m=null;mxEvent.addGestureListeners(h,function(a){mxEvent.consume(a)},null,function(a){if(null!=
+BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 14px";return a};BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.style.padding="0px 0px 6px 0px";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.width="200px";b.style.fontWeight="bold";mxUtils.write(b,a);return b};
+BaseFormatPanel.prototype.createStepper=function(a,b,d,e,c,f,k){d=null!=d?d:1;e=null!=e?e:9;var h=document.createElement("div");mxUtils.setPrefixedStyle(h.style,"borderRadius","3px");h.style.border="1px solid rgb(192, 192, 192)";h.style.position="absolute";var g=document.createElement("div");g.style.borderBottom="1px solid rgb(192, 192, 192)";g.style.position="relative";g.style.height=e+"px";g.style.width="10px";g.className="geBtnUp";h.appendChild(g);var l=g.cloneNode(!1);l.style.border="none";l.style.height=
+e+"px";l.className="geBtnDown";h.appendChild(l);mxEvent.addListener(l,"click",function(c){""==a.value&&(a.value=f||"2");var e=k?parseFloat(a.value):parseInt(a.value);isNaN(e)||(a.value=e-d,null!=b&&b(c));mxEvent.consume(c)});mxEvent.addListener(g,"click",function(c){""==a.value&&(a.value=f||"0");var e=k?parseFloat(a.value):parseInt(a.value);isNaN(e)||(a.value=e+d,null!=b&&b(c));mxEvent.consume(c)});if(c){var m=null;mxEvent.addGestureListeners(h,function(a){mxEvent.consume(a)},null,function(a){if(null!=
m){try{m.select()}catch(p){}m=null;mxEvent.consume(a)}})}return h};
-BaseFormatPanel.prototype.createOption=function(a,c,b,e,d){var f=document.createElement("div");f.style.padding="3px 0px 3px 0px";f.style.whiteSpace="nowrap";f.style.textOverflow="ellipsis";f.style.overflow="hidden";f.style.width="200px";f.style.height="18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="1px 6px 0px 0px";k.style.verticalAlign="top";f.appendChild(k);var h=document.createElement("span");h.style.verticalAlign="top";mxUtils.write(h,a);f.appendChild(h);
-var g=!1,l=c(),m=function(a){g||(g=!0,a?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1),l!=a&&(l=a,c()!=l&&b(l)),g=!1)};mxEvent.addListener(f,"click",function(a){if("disabled"!=k.getAttribute("disabled")){a=mxEvent.getSource(a);if(a==f||a==h)k.checked=!k.checked;m(k.checked)}});m(l);null!=e&&(e.install(m),this.listeners.push(e));null!=d&&d(f);return f};
-BaseFormatPanel.prototype.createCellOption=function(a,c,b,e,d,f,k,h,g){var l=this.editorUi,m=l.editor.graph,n=this;e=null!=e?"null"==e?null:e:1;d=null!=d?"null"==d?null:d:0;var p=null!=g?m.getCommonStyle(g):this.format.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(p,c,b)!=d},function(a){h&&m.stopEditing();if(null!=k)k.funct();else{m.getModel().beginUpdate();try{var b=null!=g?g:n.format.getSelectionState().cells;a=a?e:d;m.setCellStyles(c,a,b);null!=f&&f(b,
-a);l.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",b))}finally{m.getModel().endUpdate()}}},{install:function(a){this.listener=function(){a(mxUtils.getValue(p,c,b)!=d)};m.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){m.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,c,b,e,d,f,k,h){var g=document.createElement("div");g.style.padding="3px 0px 3px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height="18px";var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.margin="1px 6px 0px 0px";l.style.verticalAlign="top";k||g.appendChild(l);var m=document.createElement("span");m.style.verticalAlign="top";mxUtils.write(m,a);g.appendChild(m);var n=c(),
-p=!1,q=null,t=function(a,d,g){if(!p){var m="null"==e?null:e;p=!0;a=/(^#?[a-zA-Z0-9]*$)/.test(a)?a:m;var m=null!=a&&a!=mxConstants.NONE?a:m,t=document.createElement("div");t.style.width="36px";t.style.height="12px";t.style.margin="3px";t.style.border="1px solid black";t.style.backgroundColor="default"==m?h:m;q.appendChild(t);null!=a&&a!=mxConstants.NONE&&1<a.length&&"string"===typeof a&&(m="#"==a.charAt(0)?a.substring(1).toUpperCase():a,m=ColorDialog.prototype.colorNames[m],q.setAttribute("title",
-null!=m?m+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=a&&a!=mxConstants.NONE?(l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0):(l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1);q.style.display=l.checked||k?"":"none";null!=f&&f("null"==a?null:a);d||(n=a,(g||k||c()!=n)&&b("null"==n?null:n,n));p=!1}},v=document.createElement("input");v.setAttribute("type","color");v.style.visibility="hidden";v.style.width="0px";v.style.height="0px";v.style.border=
-"none";g.appendChild(v);q=mxUtils.button("",mxUtils.bind(this,function(a){var b=n;"default"==b&&(b=h);!mxEvent.isShiftDown(a)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(b,function(a){t(a,null,!0)},h):(v.value=b,v.click(),mxEvent.addListener(v,"input",function(){t(v.value,null,!0)}));mxEvent.consume(a)}));q.style.position="absolute";q.style.marginTop="-3px";q.style.left="178px";q.style.height="22px";q.className="geColorBtn";q.style.display=l.checked||k?"":"none";g.appendChild(q);a=null!=
-n&&"string"===typeof n&&"#"==n.charAt(0)?n.substring(1).toUpperCase():n;a=ColorDialog.prototype.colorNames[a];q.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==l||"INPUT"!=a.nodeName)a!=l&&(l.checked=!l.checked),l.checked||null==n||n==mxConstants.NONE||e==mxConstants.NONE||(e=n),t(l.checked?e:mxConstants.NONE)});t(n,!0);null!=d&&(d.install(t),this.listeners.push(d));return g};
-BaseFormatPanel.prototype.createCellColorOption=function(a,c,b,e,d,f){var k=this.editorUi,h=k.editor.graph,g=this;return this.createColorOption(a,function(){var a=h.view.getState(g.format.getSelectionState().cells[0]);return null!=a?mxUtils.getValue(a.style,c,null):null},function(a,b){h.getModel().beginUpdate();try{var e=g.format.getSelectionState().cells;h.setCellStyles(c,a,e);null!=d&&d(a);k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[a],"cells",e))}finally{h.getModel().endUpdate()}},
-b||mxConstants.NONE,{install:function(a){this.listener=function(){var b=h.view.getState(g.format.getSelectionState().cells[0]);null!=b&&a(mxUtils.getValue(b.style,c,null))};h.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){h.getModel().removeListener(this.listener)}},e,null,f)};
-BaseFormatPanel.prototype.addArrow=function(a,c){c=null!=c?c:10;var b=document.createElement("div");b.style.display="inline-block";b.style.paddingRight="4px";b.style.padding="6px";var e=10-c;2==e?b.style.paddingTop="6px":0<e?b.style.paddingTop=6-e+"px":b.style.marginTop="-2px";b.style.height=c+"px";b.style.borderLeft="1px solid #a0a0a0";e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("valign","middle");e.setAttribute("src",Toolbar.prototype.dropDownImage);b.appendChild(e);
-e=b.getElementsByTagName("img")[0];e.style.position="relative";e.style.left="1px";e.style.top=mxClient.IS_FF?"0px":"-4px";mxUtils.setOpacity(b,70);e=a.getElementsByTagName("div")[0];null!=e&&(e.style.paddingRight="6px",e.style.marginLeft="4px",e.style.marginTop="-1px",e.style.display="inline-block",mxUtils.setOpacity(e,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage="none";a.style.width="auto";a.className+=
-" geColorBtn";mxUtils.setPrefixedStyle(a.style,"borderRadius","3px");a.appendChild(b);return e};
-BaseFormatPanel.prototype.addUnitInput=function(a,c,b,e,d,f,k,h,g){k=null!=k?k:0;c=document.createElement("input");c.style.position="absolute";c.style.textAlign="right";c.style.marginTop="-2px";c.style.left=228-b-e+"px";c.style.width=e+"px";c.style.height="21px";c.style.border="1px solid rgb(160, 160, 160)";c.style.borderRadius="4px";c.style.boxSizing="border-box";a.appendChild(c);e=this.createStepper(c,d,f,null,h,null,g);e.style.marginTop=k-2+"px";e.style.left=228-b+"px";a.appendChild(e);return c};
-BaseFormatPanel.prototype.createRelativeOption=function(a,c,b,e,d){b=null!=b?b:52;var f=this.editorUi.editor.graph,k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";mxUtils.write(k,a);k.style.fontWeight="bold";a=mxUtils.bind(this,function(a){if(null!=e)e(h);else{var b=parseInt(h.value),b=Math.min(100,Math.max(0,isNaN(b)?100:b)),d=f.view.getState(this.format.getSelectionState().cells[0]);null!=d&&b!=mxUtils.getValue(d.style,c,100)&&(100==b&&(b=null),d=this.format.getSelectionState().cells,
-f.setCellStyles(c,b,d),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[b],"cells",d)));h.value=(null!=b?b:"100")+" %"}mxEvent.consume(a)});var h=this.addUnitInput(k,"%",16,b,a,10,-15,null!=e);if(null!=c){var g=mxUtils.bind(this,function(a,b,d){if(d||h!=document.activeElement)a=this.format.getSelectionState(),a=parseInt(mxUtils.getValue(a.style,c,100)),h.value=isNaN(a)?"":a+" %"});mxEvent.addListener(h,"keydown",function(a){13==a.keyCode?(f.container.focus(),mxEvent.consume(a)):
-27==a.keyCode&&(g(null,null,!0),f.container.focus(),mxEvent.consume(a))});f.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){f.getModel().removeListener(g)}});g()}mxEvent.addListener(h,"blur",a);mxEvent.addListener(h,"change",a);null!=d&&d(h);return k};
-BaseFormatPanel.prototype.addLabel=function(a,c,b,e){e=null!=e?e:61;var d=document.createElement("div");mxUtils.write(d,c);d.style.position="absolute";d.style.left=240-b-e+"px";d.style.width=e+"px";d.style.marginTop="6px";d.style.textAlign="center";a.appendChild(d)};
-BaseFormatPanel.prototype.addKeyHandler=function(a,c){mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(a){13==a.keyCode?(this.editorUi.editor.graph.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(null!=c&&c(null,null,!0),this.editorUi.editor.graph.container.focus(),mxEvent.consume(a))}))};
-BaseFormatPanel.prototype.styleButtons=function(a){for(var c=0;c<a.length;c++)mxUtils.setPrefixedStyle(a[c].style,"borderRadius","3px"),mxUtils.setOpacity(a[c],100),a[c].style.border="1px solid #a0a0a0",a[c].style.padding="4px",a[c].style.paddingTop="3px",a[c].style.paddingRight="1px",a[c].style.margin="1px",a[c].style.marginRight="2px",a[c].style.width="24px",a[c].style.height="20px",a[c].className+=" geColorBtn"};
-BaseFormatPanel.prototype.destroy=function(){if(null!=this.listeners){for(var a=0;a<this.listeners.length;a++)this.listeners[a].destroy();this.listeners=null}};ArrangePanel=function(a,c,b){BaseFormatPanel.call(this,a,c,b);this.init()};mxUtils.extend(ArrangePanel,BaseFormatPanel);
-ArrangePanel.prototype.init=function(){var a=this.editorUi.editor.graph,c=this.format.getSelectionState();0<c.cells.length&&(this.container.appendChild(this.addLayerOps(this.createPanel())),this.addGeometry(this.container),this.addEdgeGeometry(this.container),c.containsLabel&&0!=c.edges.length||this.container.appendChild(this.addAngle(this.createPanel())),c.containsLabel||0!=c.edges.length||"rectangle"==c.style.shape||"label"==c.style.shape||this.container.appendChild(this.addFlip(this.createPanel())),
-1<c.vertices.length&&(this.container.appendChild(this.addAlign(this.createPanel())),this.container.appendChild(this.addDistribute(this.createPanel()))),("stackLayout"==c.style.childLayout||a.isTable(c.vertices[0])||a.isTableRow(c.vertices[0])||a.isTableCell(c.vertices[0]))&&this.container.appendChild(this.addTable(this.createPanel())));this.container.appendChild(this.addGroupOps(this.createPanel()));c.containsLabel&&(a=document.createElement("div"),a.style.width="100%",a.style.marginTop="0px",a.style.fontWeight=
+BaseFormatPanel.prototype.createOption=function(a,b,d,e,c){var f=document.createElement("div");f.style.padding="3px 0px 3px 0px";f.style.whiteSpace="nowrap";f.style.textOverflow="ellipsis";f.style.overflow="hidden";f.style.width="200px";f.style.height="18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="1px 6px 0px 0px";k.style.verticalAlign="top";f.appendChild(k);var h=document.createElement("span");h.style.verticalAlign="top";mxUtils.write(h,a);f.appendChild(h);
+var g=!1,l=b(),m=function(a){g||(g=!0,a?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1),l!=a&&(l=a,b()!=l&&d(l)),g=!1)};mxEvent.addListener(f,"click",function(a){if("disabled"!=k.getAttribute("disabled")){a=mxEvent.getSource(a);if(a==f||a==h)k.checked=!k.checked;m(k.checked)}});m(l);null!=e&&(e.install(m),this.listeners.push(e));null!=c&&c(f);return f};
+BaseFormatPanel.prototype.createCellOption=function(a,b,d,e,c,f,k,h,g){var l=this.editorUi,m=l.editor.graph,n=this;e=null!=e?"null"==e?null:e:1;c=null!=c?"null"==c?null:c:0;var p=null!=g?m.getCommonStyle(g):this.format.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(p,b,d)!=c},function(a){h&&m.stopEditing();if(null!=k)k.funct();else{m.getModel().beginUpdate();try{var d=null!=g?g:n.format.getSelectionState().cells;a=a?e:c;m.setCellStyles(b,a,d);null!=f&&f(d,
+a);l.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[a],"cells",d))}finally{m.getModel().endUpdate()}}},{install:function(a){this.listener=function(){a(mxUtils.getValue(p,b,d)!=c)};m.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){m.getModel().removeListener(this.listener)}})};
+BaseFormatPanel.prototype.createColorOption=function(a,b,d,e,c,f,k,h){var g=document.createElement("div");g.style.padding="3px 0px 3px 0px";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="200px";g.style.height="18px";var l=document.createElement("input");l.setAttribute("type","checkbox");l.style.margin="1px 6px 0px 0px";l.style.verticalAlign="top";k||g.appendChild(l);var m=document.createElement("span");m.style.verticalAlign="top";mxUtils.write(m,a);g.appendChild(m);var n=b(),
+p=!1,q=null,u=function(a,c,g){if(!p){var m="null"==e?null:e;p=!0;a=/(^#?[a-zA-Z0-9]*$)/.test(a)?a:m;var m=null!=a&&a!=mxConstants.NONE?a:m,u=document.createElement("div");u.style.width="36px";u.style.height="12px";u.style.margin="3px";u.style.border="1px solid black";u.style.backgroundColor="default"==m?h:m;q.innerHTML="";q.appendChild(u);null!=a&&a!=mxConstants.NONE&&1<a.length&&"string"===typeof a&&(m="#"==a.charAt(0)?a.substring(1).toUpperCase():a,m=ColorDialog.prototype.colorNames[m],q.setAttribute("title",
+null!=m?m+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=a&&a!=mxConstants.NONE?(l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0):(l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1);q.style.display=l.checked||k?"":"none";null!=f&&f("null"==a?null:a);c||(n=a,(g||k||b()!=n)&&d("null"==n?null:n,n));p=!1}},v=document.createElement("input");v.setAttribute("type","color");v.style.visibility="hidden";v.style.width="0px";v.style.height="0px";v.style.border=
+"none";g.appendChild(v);q=mxUtils.button("",mxUtils.bind(this,function(a){var b=n;"default"==b&&(b=h);!mxEvent.isShiftDown(a)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(b,function(a){u(a,null,!0)},h):(v.value=b,v.click(),mxEvent.addListener(v,"input",function(){u(v.value,null,!0)}));mxEvent.consume(a)}));q.style.position="absolute";q.style.marginTop="-3px";q.style.left="178px";q.style.height="22px";q.className="geColorBtn";q.style.display=l.checked||k?"":"none";g.appendChild(q);a=null!=
+n&&"string"===typeof n&&"#"==n.charAt(0)?n.substring(1).toUpperCase():n;a=ColorDialog.prototype.colorNames[a];q.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(g,"click",function(a){a=mxEvent.getSource(a);if(a==l||"INPUT"!=a.nodeName)a!=l&&(l.checked=!l.checked),l.checked||null==n||n==mxConstants.NONE||e==mxConstants.NONE||(e=n),u(l.checked?e:mxConstants.NONE)});u(n,!0);null!=c&&(c.install(u),this.listeners.push(c));return g};
+BaseFormatPanel.prototype.createCellColorOption=function(a,b,d,e,c,f){var k=this.editorUi,h=k.editor.graph,g=this;return this.createColorOption(a,function(){var a=h.view.getState(g.format.getSelectionState().cells[0]);return null!=a?mxUtils.getValue(a.style,b,null):null},function(a,d){h.getModel().beginUpdate();try{var e=g.format.getSelectionState().cells;h.setCellStyles(b,a,e);null!=c&&c(a);k.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[a],"cells",e))}finally{h.getModel().endUpdate()}},
+d||mxConstants.NONE,{install:function(a){this.listener=function(){var c=h.view.getState(g.format.getSelectionState().cells[0]);null!=c&&a(mxUtils.getValue(c.style,b,null))};h.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){h.getModel().removeListener(this.listener)}},e,null,f)};
+BaseFormatPanel.prototype.addArrow=function(a,b){b=null!=b?b:10;var d=document.createElement("div");d.style.display="inline-block";d.style.paddingRight="4px";d.style.padding="6px";var e=10-b;2==e?d.style.paddingTop="6px":0<e?d.style.paddingTop=6-e+"px":d.style.marginTop="-2px";d.style.height=b+"px";d.style.borderLeft="1px solid #a0a0a0";e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("valign","middle");e.setAttribute("src",Toolbar.prototype.dropDownImage);d.appendChild(e);
+e=d.getElementsByTagName("img")[0];e.style.position="relative";e.style.left="1px";e.style.top=mxClient.IS_FF?"0px":"-4px";mxUtils.setOpacity(d,70);e=a.getElementsByTagName("div")[0];null!=e&&(e.style.paddingRight="6px",e.style.marginLeft="4px",e.style.marginTop="-1px",e.style.display="inline-block",mxUtils.setOpacity(e,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage="none";a.style.width="auto";a.className+=
+" geColorBtn";mxUtils.setPrefixedStyle(a.style,"borderRadius","3px");a.appendChild(d);return e};
+BaseFormatPanel.prototype.addUnitInput=function(a,b,d,e,c,f,k,h,g){k=null!=k?k:0;b=document.createElement("input");b.style.position="absolute";b.style.textAlign="right";b.style.marginTop="-2px";b.style.left=228-d-e+"px";b.style.width=e+"px";b.style.height="21px";b.style.border="1px solid rgb(160, 160, 160)";b.style.borderRadius="4px";b.style.boxSizing="border-box";a.appendChild(b);e=this.createStepper(b,c,f,null,h,null,g);e.style.marginTop=k-2+"px";e.style.left=228-d+"px";a.appendChild(e);return b};
+BaseFormatPanel.prototype.createRelativeOption=function(a,b,d,e,c){d=null!=d?d:52;var f=this.editorUi.editor.graph,k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";mxUtils.write(k,a);k.style.fontWeight="bold";a=mxUtils.bind(this,function(a){if(null!=e)e(h);else{var c=parseInt(h.value),c=Math.min(100,Math.max(0,isNaN(c)?100:c)),d=f.view.getState(this.format.getSelectionState().cells[0]);null!=d&&c!=mxUtils.getValue(d.style,b,100)&&(100==c&&(c=null),d=this.format.getSelectionState().cells,
+f.setCellStyles(b,c,d),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[c],"cells",d)));h.value=(null!=c?c:"100")+" %"}mxEvent.consume(a)});var h=this.addUnitInput(k,"%",16,d,a,10,-15,null!=e);if(null!=b){var g=mxUtils.bind(this,function(a,c,d){if(d||h!=document.activeElement)a=this.format.getSelectionState(),a=parseInt(mxUtils.getValue(a.style,b,100)),h.value=isNaN(a)?"":a+" %"});mxEvent.addListener(h,"keydown",function(a){13==a.keyCode?(f.container.focus(),mxEvent.consume(a)):
+27==a.keyCode&&(g(null,null,!0),f.container.focus(),mxEvent.consume(a))});f.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){f.getModel().removeListener(g)}});g()}mxEvent.addListener(h,"blur",a);mxEvent.addListener(h,"change",a);null!=c&&c(h);return k};
+BaseFormatPanel.prototype.addLabel=function(a,b,d,e){e=null!=e?e:61;var c=document.createElement("div");mxUtils.write(c,b);c.style.position="absolute";c.style.left=240-d-e+"px";c.style.width=e+"px";c.style.marginTop="6px";c.style.textAlign="center";a.appendChild(c)};
+BaseFormatPanel.prototype.addKeyHandler=function(a,b){mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(a){13==a.keyCode?(this.editorUi.editor.graph.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(null!=b&&b(null,null,!0),this.editorUi.editor.graph.container.focus(),mxEvent.consume(a))}))};
+BaseFormatPanel.prototype.styleButtons=function(a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"borderRadius","3px"),mxUtils.setOpacity(a[b],100),a[b].style.border="1px solid #a0a0a0",a[b].style.padding="4px",a[b].style.paddingTop="3px",a[b].style.paddingRight="1px",a[b].style.margin="1px",a[b].style.marginRight="2px",a[b].style.width="24px",a[b].style.height="20px",a[b].className+=" geColorBtn"};
+BaseFormatPanel.prototype.destroy=function(){if(null!=this.listeners){for(var a=0;a<this.listeners.length;a++)this.listeners[a].destroy();this.listeners=null}};ArrangePanel=function(a,b,d){BaseFormatPanel.call(this,a,b,d);this.init()};mxUtils.extend(ArrangePanel,BaseFormatPanel);
+ArrangePanel.prototype.init=function(){var a=this.editorUi.editor.graph,b=this.format.getSelectionState();0<b.cells.length&&(this.container.appendChild(this.addLayerOps(this.createPanel())),this.addGeometry(this.container),this.addEdgeGeometry(this.container),b.containsLabel&&0!=b.edges.length||this.container.appendChild(this.addAngle(this.createPanel())),b.containsLabel||0!=b.edges.length||"rectangle"==b.style.shape||"label"==b.style.shape||this.container.appendChild(this.addFlip(this.createPanel())),
+1<b.vertices.length&&(this.container.appendChild(this.addAlign(this.createPanel())),this.container.appendChild(this.addDistribute(this.createPanel()))),("stackLayout"==b.style.childLayout||a.isTable(b.vertices[0])||a.isTableRow(b.vertices[0])||a.isTableCell(b.vertices[0]))&&this.container.appendChild(this.addTable(this.createPanel())));this.container.appendChild(this.addGroupOps(this.createPanel()));b.containsLabel&&(a=document.createElement("div"),a.style.width="100%",a.style.marginTop="0px",a.style.fontWeight=
"bold",a.style.padding="10px 0 0 14px",mxUtils.write(a,mxResources.get("style")),this.container.appendChild(a),new StyleFormatPanel(this.format,this.editorUi,this.container))};
-ArrangePanel.prototype.addTable=function(a){var c=this.editorUi,b=c.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="10px";var d=document.createElement("div");d.style.marginTop="2px";d.style.marginBottom="8px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("table"));a.appendChild(d);d=document.createElement("div");d.style.position="relative";d.style.paddingLeft="0px";d.style.borderWidth="0px";d.style.width="220px";d.className="geToolbarContainer";
-var f="stackLayout"==e.style.childLayout,k=!0,h=!0;f&&(h="0"==e.style.horizontalStack,k=!h);var g=[];k&&(g=g.concat([c.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{f?b.insertLane(e.vertices[0],!0):b.insertTableColumn(e.vertices[0],!0)}catch(l){c.handleError(l)}}),d),c.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{f?b.insertLane(e.vertices[0],!1):b.insertTableColumn(e.vertices[0],
-!1)}catch(l){c.handleError(l)}}),d),c.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{f?b.deleteLane(e.vertices[0]):b.deleteTableColumn(e.vertices[0])}catch(l){c.handleError(l)}}),d)]));h&&(g=g.concat([c.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{f?b.insertLane(e.vertices[0],!0):b.insertTableRow(e.vertices[0],!0)}catch(l){c.handleError(l)}}),d),c.toolbar.addButton("geSprite-insertrowafter",
-mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{f?b.insertLane(e.vertices[0],!1):b.insertTableRow(e.vertices[0],!1)}catch(l){c.handleError(l)}}),d),c.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{f?b.deleteLane(e.vertices[0]):b.deleteTableRow(e.vertices[0])}catch(l){c.handleError(l)}}),d)]));this.styleButtons(g);a.appendChild(d);3<g.length&&(g[2].style.marginRight="10px");return a};
-ArrangePanel.prototype.addLayerOps=function(a){var c=this.editorUi,b=c.editor.graph,e=mxUtils.button(mxResources.get("toFront"),function(a){c.actions.get("toFront").funct()});e.setAttribute("title",mxResources.get("toFront")+" ("+this.editorUi.actions.get("toFront").shortcut+")");e.style.width="104px";e.style.marginRight="2px";a.appendChild(e);e=mxUtils.button(mxResources.get("toBack"),function(a){c.actions.get("toBack").funct()});e.setAttribute("title",mxResources.get("toBack")+" ("+this.editorUi.actions.get("toBack").shortcut+
-")");e.style.width="104px";a.appendChild(e);1==b.getSelectionCount()&&(mxUtils.br(a),e=mxUtils.button(mxResources.get("bringForward"),function(a){c.actions.get("bringForward").funct()}),e.setAttribute("title",mxResources.get("bringForward")),e.style.width="104px",e.style.marginRight="2px",e.style.marginTop="2px",a.appendChild(e),e=mxUtils.button(mxResources.get("sendBackward"),function(a){c.actions.get("sendBackward").funct()}),e.setAttribute("title",mxResources.get("sendBackward")),e.style.width=
+ArrangePanel.prototype.addTable=function(a){var b=this.editorUi,d=b.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="10px";var c=document.createElement("div");c.style.marginTop="2px";c.style.marginBottom="8px";c.style.fontWeight="bold";mxUtils.write(c,mxResources.get("table"));a.appendChild(c);c=document.createElement("div");c.style.position="relative";c.style.paddingLeft="0px";c.style.borderWidth="0px";c.style.width="220px";c.className="geToolbarContainer";
+var f="stackLayout"==e.style.childLayout,k=!0,h=!0;f&&(h="0"==e.style.horizontalStack,k=!h);var g=[];k&&(g=g.concat([b.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{f?d.insertLane(e.vertices[0],!0):d.insertTableColumn(e.vertices[0],!0)}catch(l){b.handleError(l)}}),c),b.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{f?d.insertLane(e.vertices[0],!1):d.insertTableColumn(e.vertices[0],
+!1)}catch(l){b.handleError(l)}}),c),b.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{f?d.deleteLane(e.vertices[0]):d.deleteTableColumn(e.vertices[0])}catch(l){b.handleError(l)}}),c)]));h&&(g=g.concat([b.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{f?d.insertLane(e.vertices[0],!0):d.insertTableRow(e.vertices[0],!0)}catch(l){b.handleError(l)}}),c),b.toolbar.addButton("geSprite-insertrowafter",
+mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{f?d.insertLane(e.vertices[0],!1):d.insertTableRow(e.vertices[0],!1)}catch(l){b.handleError(l)}}),c),b.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{f?d.deleteLane(e.vertices[0]):d.deleteTableRow(e.vertices[0])}catch(l){b.handleError(l)}}),c)]));this.styleButtons(g);a.appendChild(c);3<g.length&&(g[2].style.marginRight="10px");return a};
+ArrangePanel.prototype.addLayerOps=function(a){var b=this.editorUi,d=b.editor.graph,e=mxUtils.button(mxResources.get("toFront"),function(a){b.actions.get("toFront").funct()});e.setAttribute("title",mxResources.get("toFront")+" ("+this.editorUi.actions.get("toFront").shortcut+")");e.style.width="104px";e.style.marginRight="2px";a.appendChild(e);e=mxUtils.button(mxResources.get("toBack"),function(a){b.actions.get("toBack").funct()});e.setAttribute("title",mxResources.get("toBack")+" ("+this.editorUi.actions.get("toBack").shortcut+
+")");e.style.width="104px";a.appendChild(e);1==d.getSelectionCount()&&(mxUtils.br(a),e=mxUtils.button(mxResources.get("bringForward"),function(a){b.actions.get("bringForward").funct()}),e.setAttribute("title",mxResources.get("bringForward")),e.style.width="104px",e.style.marginRight="2px",e.style.marginTop="2px",a.appendChild(e),e=mxUtils.button(mxResources.get("sendBackward"),function(a){b.actions.get("sendBackward").funct()}),e.setAttribute("title",mxResources.get("sendBackward")),e.style.width=
"104px",e.style.marginTop="2px",a.appendChild(e));return a};
-ArrangePanel.prototype.addGroupOps=function(a){var c=this.editorUi,b=c.editor.graph,e=this.format.getSelectionState(),d=e.cells[0],f=0,k=null;a.style.paddingTop="8px";a.style.paddingBottom="6px";1<b.getSelectionCount()?(k=mxUtils.button(mxResources.get("group"),function(a){c.actions.get("group").funct()}),k.setAttribute("title",mxResources.get("group")+" ("+this.editorUi.actions.get("group").shortcut+")"),k.style.width="210px",k.style.marginBottom="2px",a.appendChild(k),f++):!(1!=e.cells.length||
-b.getModel().isEdge(d)||b.isSwimlane(d)||b.isTable(d)||e.row||e.cell)&&0<b.getModel().getChildCount(d)&&(k=mxUtils.button(mxResources.get("ungroup"),function(a){c.actions.get("ungroup").funct()}),k.setAttribute("title",mxResources.get("ungroup")+" ("+this.editorUi.actions.get("ungroup").shortcut+")"),k.style.width="210px",k.style.marginBottom="2px",a.appendChild(k),f++);if(b.getModel().isVertex(b.getSelectionCell())&&(0<f&&(mxUtils.br(a),f=0),k=mxUtils.button(mxResources.get("copySize"),function(a){c.actions.get("copySize").funct(a)}),
-k.setAttribute("title",mxResources.get("copySize")+" ("+this.editorUi.actions.get("copySize").shortcut+")"),k.style.width="210px",k.style.marginBottom="2px",a.appendChild(k),f++,null!=c.copiedSize&&0<e.vertices.length)){var h=mxUtils.button(mxResources.get("pasteSize"),function(a){c.actions.get("pasteSize").funct(a)});h.setAttribute("title",mxResources.get("pasteSize")+" ("+this.editorUi.actions.get("pasteSize").shortcut+")");a.appendChild(h);f++;k.style.width="104px";k.style.marginBottom="2px";h.style.width=
-"104px";h.style.marginBottom="2px"}0<b.getSelectionCount()&&(0<f&&(mxUtils.br(a),f=0),k=mxUtils.button(mxResources.get("copyData"),function(a){if(mxEvent.isShiftDown(a)){var d=b.getDataForCells(b.getSelectionCells());a=new EmbedDialog(c,JSON.stringify(d,null,2),null,null,function(){console.log(d)},mxResources.get("copyData"),null,"Console","data.json");c.showDialog(a.container,440,240,!0,!0);a.init()}else c.actions.get("copyData").funct(a)}),k.setAttribute("title",mxResources.get("copyData")+" ("+
-this.editorUi.actions.get("copyData").shortcut+") Shift+Click to Extract Data"),k.style.width="210px",k.style.marginBottom="2px",a.appendChild(k),f++,null!=c.copiedValue&&0<e.cells.length&&(h=mxUtils.button(mxResources.get("pasteData"),function(a){c.actions.get("pasteData").funct(a)}),h.setAttribute("title",mxResources.get("pasteData")+" ("+this.editorUi.actions.get("pasteData").shortcut+")"),a.appendChild(h),f++,k.style.width="104px",k.style.marginBottom="2px",h.style.width="104px",h.style.marginBottom=
-"2px"));1==e.cells.length&&b.getModel().isVertex(d)&&!e.row&&!e.cell&&b.getModel().isVertex(b.getModel().getParent(d))?(0<f&&mxUtils.br(a),k=mxUtils.button(mxResources.get("removeFromGroup"),function(a){c.actions.get("removeFromGroup").funct()}),k.setAttribute("title",mxResources.get("removeFromGroup")),k.style.width="210px",k.style.marginBottom="2px",a.appendChild(k),f++):0<e.cells.length&&(0<f&&mxUtils.br(a),k=mxUtils.button(mxResources.get("clearWaypoints"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearWaypoints").funct(a)})),
+ArrangePanel.prototype.addGroupOps=function(a){var b=this.editorUi,d=b.editor.graph,e=this.format.getSelectionState(),c=e.cells[0],f=0,k=null;a.style.paddingTop="8px";a.style.paddingBottom="6px";1<d.getSelectionCount()?(k=mxUtils.button(mxResources.get("group"),function(a){b.actions.get("group").funct()}),k.setAttribute("title",mxResources.get("group")+" ("+this.editorUi.actions.get("group").shortcut+")"),k.style.width="210px",k.style.marginBottom="2px",a.appendChild(k),f++):!(1!=e.cells.length||
+d.getModel().isEdge(c)||d.isSwimlane(c)||d.isTable(c)||e.row||e.cell)&&0<d.getModel().getChildCount(c)&&(k=mxUtils.button(mxResources.get("ungroup"),function(a){b.actions.get("ungroup").funct()}),k.setAttribute("title",mxResources.get("ungroup")+" ("+this.editorUi.actions.get("ungroup").shortcut+")"),k.style.width="210px",k.style.marginBottom="2px",a.appendChild(k),f++);if(d.getModel().isVertex(d.getSelectionCell())&&(0<f&&(mxUtils.br(a),f=0),k=mxUtils.button(mxResources.get("copySize"),function(a){b.actions.get("copySize").funct(a)}),
+k.setAttribute("title",mxResources.get("copySize")+" ("+this.editorUi.actions.get("copySize").shortcut+")"),k.style.width="210px",k.style.marginBottom="2px",a.appendChild(k),f++,null!=b.copiedSize&&0<e.vertices.length)){var h=mxUtils.button(mxResources.get("pasteSize"),function(a){b.actions.get("pasteSize").funct(a)});h.setAttribute("title",mxResources.get("pasteSize")+" ("+this.editorUi.actions.get("pasteSize").shortcut+")");a.appendChild(h);f++;k.style.width="104px";k.style.marginBottom="2px";h.style.width=
+"104px";h.style.marginBottom="2px"}0<d.getSelectionCount()&&(0<f&&(mxUtils.br(a),f=0),k=mxUtils.button(mxResources.get("copyData"),function(a){if(mxEvent.isShiftDown(a)){var c=d.getDataForCells(d.getSelectionCells());a=new EmbedDialog(b,JSON.stringify(c,null,2),null,null,function(){console.log(c)},mxResources.get("copyData"),null,"Console","data.json");b.showDialog(a.container,440,240,!0,!0);a.init()}else b.actions.get("copyData").funct(a)}),k.setAttribute("title",mxResources.get("copyData")+" ("+
+this.editorUi.actions.get("copyData").shortcut+") Shift+Click to Extract Data"),k.style.width="210px",k.style.marginBottom="2px",a.appendChild(k),f++,null!=b.copiedValue&&0<e.cells.length&&(h=mxUtils.button(mxResources.get("pasteData"),function(a){b.actions.get("pasteData").funct(a)}),h.setAttribute("title",mxResources.get("pasteData")+" ("+this.editorUi.actions.get("pasteData").shortcut+")"),a.appendChild(h),f++,k.style.width="104px",k.style.marginBottom="2px",h.style.width="104px",h.style.marginBottom=
+"2px"));1==e.cells.length&&d.getModel().isVertex(c)&&!e.row&&!e.cell&&d.getModel().isVertex(d.getModel().getParent(c))?(0<f&&mxUtils.br(a),k=mxUtils.button(mxResources.get("removeFromGroup"),function(a){b.actions.get("removeFromGroup").funct()}),k.setAttribute("title",mxResources.get("removeFromGroup")),k.style.width="210px",k.style.marginBottom="2px",a.appendChild(k),f++):0<e.cells.length&&(0<f&&mxUtils.br(a),k=mxUtils.button(mxResources.get("clearWaypoints"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearWaypoints").funct(a)})),
k.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+")"),k.style.width="210px",k.style.marginBottom="2px",a.appendChild(k),f++);1==e.cells.length&&(0<f&&mxUtils.br(a),k=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()})),k.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")"),k.style.width="104px",k.style.marginBottom=
"2px",a.appendChild(k),f++,k=mxUtils.button(mxResources.get("editLink"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editLink").funct()})),k.setAttribute("title",mxResources.get("editLink")+" ("+this.editorUi.actions.get("editLink").shortcut+")"),k.style.width="104px",k.style.marginLeft="2px",k.style.marginBottom="2px",a.appendChild(k),f++);0==f&&(a.style.display="none");return a};
-ArrangePanel.prototype.addAlign=function(a){var c=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("align")));var b=document.createElement("div");b.style.position="relative";b.style.whiteSpace="nowrap";b.style.paddingLeft="0px";b.style.borderWidth="0px";b.style.width="220px";b.className="geToolbarContainer";var e=this.editorUi.toolbar.addButton("geSprite-alignleft",mxResources.get("left"),function(){c.alignCells(mxConstants.ALIGN_LEFT)},
-b),d=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){c.alignCells(mxConstants.ALIGN_CENTER)},b),f=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){c.alignCells(mxConstants.ALIGN_RIGHT)},b),k=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){c.alignCells(mxConstants.ALIGN_TOP)},b),h=this.editorUi.toolbar.addButton("geSprite-alignmiddle",mxResources.get("middle"),function(){c.alignCells(mxConstants.ALIGN_MIDDLE)},
-b),g=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){c.alignCells(mxConstants.ALIGN_BOTTOM)},b);this.styleButtons([e,d,f,k,h,g]);f.style.marginRight="10px";a.appendChild(b);return a};
-ArrangePanel.prototype.addFlip=function(a){var c=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="10px";var b=document.createElement("div");b.style.marginTop="2px";b.style.marginBottom="8px";b.style.fontWeight="bold";mxUtils.write(b,mxResources.get("flip"));a.appendChild(b);b=mxUtils.button(mxResources.get("horizontal"),function(a){c.toggleCellStyles(mxConstants.STYLE_FLIPH,!1)});b.setAttribute("title",mxResources.get("horizontal"));b.style.width="104px";b.style.marginRight=
-"2px";a.appendChild(b);b=mxUtils.button(mxResources.get("vertical"),function(a){c.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)});b.setAttribute("title",mxResources.get("vertical"));b.style.width="104px";a.appendChild(b);return a};
-ArrangePanel.prototype.addDistribute=function(a){var c=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("distribute")));var b=mxUtils.button(mxResources.get("horizontal"),function(a){c.distributeCells(!0)});b.setAttribute("title",mxResources.get("horizontal"));b.style.width="104px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("vertical"),function(a){c.distributeCells(!1)});b.setAttribute("title",
-mxResources.get("vertical"));b.style.width="104px";a.appendChild(b);return a};
-ArrangePanel.prototype.addAngle=function(a){var c=this.editorUi,b=c.editor.graph,e=this.format.getSelectionState();a.style.paddingBottom="8px";var d=document.createElement("div");d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";d.style.fontWeight="bold";var f=null,k=null,h=null;!e.rotatable||e.table||e.row||e.cell?a.style.paddingTop="8px":(mxUtils.write(d,mxResources.get("angle")),a.appendChild(d),f=this.addUnitInput(a,"°",16,52,function(){k.apply(this,arguments)}),mxUtils.br(a),
-a.style.paddingTop="10px");e.containsLabel||(d=mxResources.get("reverse"),0<e.vertices.length&&0<e.edges.length?d=mxResources.get("turn")+" / "+d:0<e.vertices.length&&(d=mxResources.get("turn")),h=mxUtils.button(d,function(a){c.actions.get("turn").funct(a)}),h.setAttribute("title",d+" ("+this.editorUi.actions.get("turn").shortcut+")"),h.style.width="210px",a.appendChild(h),null!=f&&(h.style.marginTop="8px"));if(null!=f){var g=mxUtils.bind(this,function(a,b,c){if(c||document.activeElement!=f)e=this.format.getSelectionState(),
-a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0)),f.value=isNaN(a)?"":a+"°"}),k=this.installInputHandler(f,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(f,g);b.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){b.getModel().removeListener(g)}});g()}return a};BaseFormatPanel.prototype.getUnit=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return"pt";case mxConstants.INCHES:return'"';case mxConstants.MILLIMETERS:return"mm"}};
+ArrangePanel.prototype.addAlign=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("align")));var d=document.createElement("div");d.style.position="relative";d.style.whiteSpace="nowrap";d.style.paddingLeft="0px";d.style.borderWidth="0px";d.style.width="220px";d.className="geToolbarContainer";var e=this.editorUi.toolbar.addButton("geSprite-alignleft",mxResources.get("left"),function(){b.alignCells(mxConstants.ALIGN_LEFT)},
+d),c=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){b.alignCells(mxConstants.ALIGN_CENTER)},d),f=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){b.alignCells(mxConstants.ALIGN_RIGHT)},d),k=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){b.alignCells(mxConstants.ALIGN_TOP)},d),h=this.editorUi.toolbar.addButton("geSprite-alignmiddle",mxResources.get("middle"),function(){b.alignCells(mxConstants.ALIGN_MIDDLE)},
+d),g=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){b.alignCells(mxConstants.ALIGN_BOTTOM)},d);this.styleButtons([e,c,f,k,h,g]);f.style.marginRight="10px";a.appendChild(d);return a};
+ArrangePanel.prototype.addFlip=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="10px";var d=document.createElement("div");d.style.marginTop="2px";d.style.marginBottom="8px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("flip"));a.appendChild(d);d=mxUtils.button(mxResources.get("horizontal"),function(a){b.toggleCellStyles(mxConstants.STYLE_FLIPH,!1)});d.setAttribute("title",mxResources.get("horizontal"));d.style.width="104px";d.style.marginRight=
+"2px";a.appendChild(d);d=mxUtils.button(mxResources.get("vertical"),function(a){b.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)});d.setAttribute("title",mxResources.get("vertical"));d.style.width="104px";a.appendChild(d);return a};
+ArrangePanel.prototype.addDistribute=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("distribute")));var d=mxUtils.button(mxResources.get("horizontal"),function(a){b.distributeCells(!0)});d.setAttribute("title",mxResources.get("horizontal"));d.style.width="104px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("vertical"),function(a){b.distributeCells(!1)});d.setAttribute("title",
+mxResources.get("vertical"));d.style.width="104px";a.appendChild(d);return a};
+ArrangePanel.prototype.addAngle=function(a){var b=this.editorUi,d=b.editor.graph,e=this.format.getSelectionState();a.style.paddingBottom="8px";var c=document.createElement("div");c.style.position="absolute";c.style.width="70px";c.style.marginTop="0px";c.style.fontWeight="bold";var f=null,k=null,h=null;!e.rotatable||e.table||e.row||e.cell?a.style.paddingTop="8px":(mxUtils.write(c,mxResources.get("angle")),a.appendChild(c),f=this.addUnitInput(a,"°",16,52,function(){k.apply(this,arguments)}),mxUtils.br(a),
+a.style.paddingTop="10px");e.containsLabel||(c=mxResources.get("reverse"),0<e.vertices.length&&0<e.edges.length?c=mxResources.get("turn")+" / "+c:0<e.vertices.length&&(c=mxResources.get("turn")),h=mxUtils.button(c,function(a){b.actions.get("turn").funct(a)}),h.setAttribute("title",c+" ("+this.editorUi.actions.get("turn").shortcut+")"),h.style.width="210px",a.appendChild(h),null!=f&&(h.style.marginTop="8px"));if(null!=f){var g=mxUtils.bind(this,function(a,b,c){if(c||document.activeElement!=f)e=this.format.getSelectionState(),
+a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0)),f.value=isNaN(a)?"":a+"°"}),k=this.installInputHandler(f,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(f,g);d.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){d.getModel().removeListener(g)}});g()}return a};BaseFormatPanel.prototype.getUnit=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return"pt";case mxConstants.INCHES:return'"';case mxConstants.MILLIMETERS:return"mm"}};
BaseFormatPanel.prototype.inUnit=function(a){return this.editorUi.editor.graph.view.formatUnitText(a)};BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS};
BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return 1;case mxConstants.INCHES:return.1;case mxConstants.MILLIMETERS:return.5}};
-ArrangePanel.prototype.addGeometry=function(a){var c=this,b=this.editorUi,e=b.editor.graph,d=e.getModel(),f=this.format.getSelectionState(),k=this.createPanel();k.style.paddingBottom="8px";var h=document.createElement("div");h.style.position="absolute";h.style.width="50px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("size"));k.appendChild(h);var g,l,m,n,p=this.addUnitInput(k,this.getUnit(),87,52,function(){g.apply(this,arguments)},this.getUnitStep(),null,null,
-this.isFloatUnit()),q=this.addUnitInput(k,this.getUnit(),16,52,function(){l.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),t=document.createElement("div");t.className="geSprite geSprite-fit";t.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");t.style.position="relative";t.style.cursor="pointer";t.style.marginTop="-3px";t.style.border="0px";t.style.left="42px";mxUtils.setOpacity(t,50);mxEvent.addListener(t,"mouseenter",
-function(){mxUtils.setOpacity(t,100)});mxEvent.addListener(t,"mouseleave",function(){mxUtils.setOpacity(t,50)});mxEvent.addListener(t,"click",function(){b.actions.get("autosize").funct()});k.appendChild(t);f.row?(p.style.visibility="hidden",p.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),87);this.addLabel(k,mxResources.get("height"),16);mxUtils.br(k);h=document.createElement("div");h.style.paddingTop="8px";h.style.paddingRight="20px";h.style.whiteSpace="nowrap";h.style.textAlign=
-"right";var v=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");v.style.width="210px";h.appendChild(v);f.cell||f.row?t.style.visibility="hidden":k.appendChild(h);var u=v.getElementsByTagName("input")[0];this.addKeyHandler(p,E);this.addKeyHandler(q,E);g=this.addGeometryHandler(p,function(a,b,d){if(e.isTableCell(d))return e.setTableColumnWidth(d,b-a.width,!0),!0;0<a.width&&(b=Math.max(1,c.fromUnit(b)),u.checked&&(a.height=Math.round(a.height*
-b*100/a.width)/100),a.width=b)});l=this.addGeometryHandler(q,function(a,b,d){e.isTableCell(d)&&(d=e.model.getParent(d));if(e.isTableRow(d))return e.setTableRowHeight(d,b-a.height),!0;0<a.height&&(b=Math.max(1,c.fromUnit(b)),u.checked&&(a.width=Math.round(a.width*b*100/a.height)/100),a.height=b)});(f.resizable||f.row||f.cell)&&a.appendChild(k);var x=this.createPanel();x.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";
-h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("position"));x.appendChild(h);var w=this.addUnitInput(x,this.getUnit(),87,52,function(){m.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),A=this.addUnitInput(x,this.getUnit(),16,52,function(){n.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);var E=mxUtils.bind(this,function(a,b,c){f=this.format.getSelectionState();
+ArrangePanel.prototype.addGeometry=function(a){var b=this,d=this.editorUi,e=d.editor.graph,c=e.getModel(),f=this.format.getSelectionState(),k=this.createPanel();k.style.paddingBottom="8px";var h=document.createElement("div");h.style.position="absolute";h.style.width="50px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("size"));k.appendChild(h);var g,l,m,n,p=this.addUnitInput(k,this.getUnit(),87,52,function(){g.apply(this,arguments)},this.getUnitStep(),null,null,
+this.isFloatUnit()),q=this.addUnitInput(k,this.getUnit(),16,52,function(){l.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),u=document.createElement("div");u.className="geSprite geSprite-fit";u.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");u.style.position="relative";u.style.cursor="pointer";u.style.marginTop="-3px";u.style.border="0px";u.style.left="42px";mxUtils.setOpacity(u,50);mxEvent.addListener(u,"mouseenter",
+function(){mxUtils.setOpacity(u,100)});mxEvent.addListener(u,"mouseleave",function(){mxUtils.setOpacity(u,50)});mxEvent.addListener(u,"click",function(){d.actions.get("autosize").funct()});k.appendChild(u);f.row?(p.style.visibility="hidden",p.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),87);this.addLabel(k,mxResources.get("height"),16);mxUtils.br(k);h=document.createElement("div");h.style.paddingTop="8px";h.style.paddingRight="20px";h.style.whiteSpace="nowrap";h.style.textAlign=
+"right";var v=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");v.style.width="210px";h.appendChild(v);f.cell||f.row?u.style.visibility="hidden":k.appendChild(h);var t=v.getElementsByTagName("input")[0];this.addKeyHandler(p,E);this.addKeyHandler(q,E);g=this.addGeometryHandler(p,function(a,c,d){if(e.isTableCell(d))return e.setTableColumnWidth(d,c-a.width,!0),!0;0<a.width&&(c=Math.max(1,b.fromUnit(c)),t.checked&&(a.height=Math.round(a.height*
+c*100/a.width)/100),a.width=c)});l=this.addGeometryHandler(q,function(a,c,d){e.isTableCell(d)&&(d=e.model.getParent(d));if(e.isTableRow(d))return e.setTableRowHeight(d,c-a.height),!0;0<a.height&&(c=Math.max(1,b.fromUnit(c)),t.checked&&(a.width=Math.round(a.width*c*100/a.height)/100),a.height=c)});(f.resizable||f.row||f.cell)&&a.appendChild(k);var x=this.createPanel();x.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";
+h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("position"));x.appendChild(h);var w=this.addUnitInput(x,this.getUnit(),87,52,function(){m.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),z=this.addUnitInput(x,this.getUnit(),16,52,function(){n.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);var E=mxUtils.bind(this,function(a,b,c){f=this.format.getSelectionState();
if(f.containsLabel||f.vertices.length!=e.getSelectionCount()||null==f.width||null==f.height)k.style.display="none";else{k.style.display="";if(c||document.activeElement!=p)p.value=this.inUnit(f.width)+(""==f.width?"":" "+this.getUnit());if(c||document.activeElement!=q)q.value=this.inUnit(f.height)+(""==f.height?"":" "+this.getUnit())}if(f.vertices.length==e.getSelectionCount()&&null!=f.x&&null!=f.y){x.style.display="";if(c||document.activeElement!=w)w.value=this.inUnit(f.x)+(""==f.x?"":" "+this.getUnit());
-if(c||document.activeElement!=A)A.value=this.inUnit(f.y)+(""==f.y?"":" "+this.getUnit())}else x.style.display="none"});this.addKeyHandler(w,E);this.addKeyHandler(A,E);d.addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){d.removeListener(E)}});E();m=this.addGeometryHandler(w,function(a,b){b=c.fromUnit(b);a.relative?a.offset.x=b:a.x=b});n=this.addGeometryHandler(A,function(a,b){b=c.fromUnit(b);a.relative?a.offset.y=b:a.y=b});if(f.movable){if(0==f.edges.length&&1==f.vertices.length&&
-d.isEdge(d.getParent(f.vertices[0]))){var H=e.getCellGeometry(f.vertices[0]);null!=H&&H.relative&&(h=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(a){d.beginUpdate();try{H=H.clone(),H.x=0,H.y=0,H.offset=new mxPoint,d.setGeometry(f.vertices[0],H)}finally{d.endUpdate()}})),h.setAttribute("title",mxResources.get("center")),h.style.width="210px",h.style.position="absolute",mxUtils.br(x),mxUtils.br(x),x.appendChild(h))}a.appendChild(x)}};
-ArrangePanel.prototype.addGeometryHandler=function(a,c){function b(b){if(""!=a.value){var k=parseFloat(a.value);if(isNaN(k))a.value=d+" "+f.getUnit();else if(k!=d){e.getModel().beginUpdate();try{for(var g=f.format.getSelectionState().cells,l=0;l<g.length;l++)if(e.getModel().isVertex(g[l])){var m=e.getCellGeometry(g[l]);if(null!=m&&(m=m.clone(),!c(m,k,g[l]))){var n=e.view.getState(g[l]);null!=n&&e.isRecursiveVertexResize(n)&&e.resizeChildCells(g[l],m);e.getModel().setGeometry(g[l],m);e.constrainChildCells(g[l])}}}finally{e.getModel().endUpdate()}d=
-k;a.value=k+" "+f.getUnit()}}mxEvent.consume(b)}var e=this.editorUi.editor.graph,d=null,f=this;mxEvent.addListener(a,"blur",b);mxEvent.addListener(a,"change",b);mxEvent.addListener(a,"focus",function(){d=a.value});return b};
-ArrangePanel.prototype.addEdgeGeometryHandler=function(a,c){function b(b){if(""!=a.value){var k=parseFloat(a.value);if(isNaN(k))a.value=d+" pt";else if(k!=d){e.getModel().beginUpdate();try{for(var g=f.format.getSelectionState().cells,l=0;l<g.length;l++)if(e.getModel().isEdge(g[l])){var m=e.getCellGeometry(g[l]);null!=m&&(m=m.clone(),c(m,k),e.getModel().setGeometry(g[l],m))}}finally{e.getModel().endUpdate()}d=k;a.value=k+" pt"}}mxEvent.consume(b)}var e=this.editorUi.editor.graph,d=null,f=this;mxEvent.addListener(a,
-"blur",b);mxEvent.addListener(a,"change",b);mxEvent.addListener(a,"focus",function(){d=a.value});return b};
-ArrangePanel.prototype.addEdgeGeometry=function(a){var c=this.editorUi,b=c.editor.graph,e=this.format.getSelectionState(),d=this.createPanel(),f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";mxUtils.write(f,mxResources.get("width"));d.appendChild(f);var k,h,g,l,m,n=this.addUnitInput(d,"pt",12,44,function(){k.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(n,w);k=mxUtils.bind(this,function(a){var d=parseInt(n.value),
-d=Math.min(999,Math.max(1,isNaN(d)?1:d));if(d!=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var f=this.format.getSelectionState().cells;b.setCellStyles("width",d,f);c.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[d],"cells",f))}n.value=d+" pt";mxEvent.consume(a)});mxEvent.addListener(n,"blur",k);mxEvent.addListener(n,"change",k);a.appendChild(d);var p=this.createPanel();p.style.paddingBottom="30px";f=document.createElement("div");
-f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";mxUtils.write(f,mxResources.get("linestart"));p.appendChild(f);var q=this.addUnitInput(p,"pt",87,52,function(){l.apply(this,arguments)}),t=this.addUnitInput(p,"pt",16,52,function(){m.apply(this,arguments)});mxUtils.br(p);this.addLabel(p,mxResources.get("left"),87);this.addLabel(p,mxResources.get("top"),16);a.appendChild(p);this.addKeyHandler(q,w);this.addKeyHandler(t,w);var v=this.createPanel();v.style.paddingBottom="30px";f=
-document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";mxUtils.write(f,mxResources.get("lineend"));v.appendChild(f);var u=this.addUnitInput(v,"pt",87,52,function(){h.apply(this,arguments)}),x=this.addUnitInput(v,"pt",16,52,function(){g.apply(this,arguments)});mxUtils.br(v);this.addLabel(v,mxResources.get("left"),87);this.addLabel(v,mxResources.get("top"),16);a.appendChild(v);this.addKeyHandler(u,w);this.addKeyHandler(x,w);var w=mxUtils.bind(this,function(a,
-c,f){e=this.format.getSelectionState();a=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(d.style.display="",f||document.activeElement!=n)f=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),n.value=f+" pt"}else d.style.display="none";1==e.cells.length&&b.model.isEdge(a)?(f=b.model.getGeometry(a),null!=f.sourcePoint&&null==b.model.getTerminal(a,!0)?(q.value=f.sourcePoint.x,t.value=f.sourcePoint.y):p.style.display="none",null!=f.targetPoint&&
-null==b.model.getTerminal(a,!1)?(u.value=f.targetPoint.x,x.value=f.targetPoint.y):v.style.display="none"):(p.style.display="none",v.style.display="none")});l=this.addEdgeGeometryHandler(q,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(t,function(a,b){a.sourcePoint.y=b});h=this.addEdgeGeometryHandler(u,function(a,b){a.targetPoint.x=b});g=this.addEdgeGeometryHandler(x,function(a,b){a.targetPoint.y=b});b.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){b.getModel().removeListener(w)}});
-w()};TextFormatPanel=function(a,c,b){BaseFormatPanel.call(this,a,c,b);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
-TextFormatPanel.prototype.addFont=function(a){function c(a,b){a.style.backgroundImage=b?Editor.isDarkMode()?"linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)":"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var b=this.editorUi,e=b.editor.graph,d=this.format.getSelectionState(),f=this.createTitle(mxResources.get("font"));f.style.paddingLeft="14px";f.style.paddingTop="10px";f.style.paddingBottom="6px";a.appendChild(f);f=this.createPanel();f.style.paddingTop="2px";f.style.paddingBottom="2px";
+if(c||document.activeElement!=z)z.value=this.inUnit(f.y)+(""==f.y?"":" "+this.getUnit())}else x.style.display="none"});this.addKeyHandler(w,E);this.addKeyHandler(z,E);c.addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){c.removeListener(E)}});E();m=this.addGeometryHandler(w,function(a,c){c=b.fromUnit(c);a.relative?a.offset.x=c:a.x=c});n=this.addGeometryHandler(z,function(a,c){c=b.fromUnit(c);a.relative?a.offset.y=c:a.y=c});if(f.movable){if(0==f.edges.length&&1==f.vertices.length&&
+c.isEdge(c.getParent(f.vertices[0]))){var G=e.getCellGeometry(f.vertices[0]);null!=G&&G.relative&&(h=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(a){c.beginUpdate();try{G=G.clone(),G.x=0,G.y=0,G.offset=new mxPoint,c.setGeometry(f.vertices[0],G)}finally{c.endUpdate()}})),h.setAttribute("title",mxResources.get("center")),h.style.width="210px",h.style.position="absolute",mxUtils.br(x),mxUtils.br(x),x.appendChild(h))}a.appendChild(x)}};
+ArrangePanel.prototype.addGeometryHandler=function(a,b){function d(d){if(""!=a.value){var k=parseFloat(a.value);if(isNaN(k))a.value=c+" "+f.getUnit();else if(k!=c){e.getModel().beginUpdate();try{for(var g=f.format.getSelectionState().cells,l=0;l<g.length;l++)if(e.getModel().isVertex(g[l])){var m=e.getCellGeometry(g[l]);if(null!=m&&(m=m.clone(),!b(m,k,g[l]))){var n=e.view.getState(g[l]);null!=n&&e.isRecursiveVertexResize(n)&&e.resizeChildCells(g[l],m);e.getModel().setGeometry(g[l],m);e.constrainChildCells(g[l])}}}finally{e.getModel().endUpdate()}c=
+k;a.value=k+" "+f.getUnit()}}mxEvent.consume(d)}var e=this.editorUi.editor.graph,c=null,f=this;mxEvent.addListener(a,"blur",d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){c=a.value});return d};
+ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function d(d){if(""!=a.value){var k=parseFloat(a.value);if(isNaN(k))a.value=c+" pt";else if(k!=c){e.getModel().beginUpdate();try{for(var g=f.format.getSelectionState().cells,l=0;l<g.length;l++)if(e.getModel().isEdge(g[l])){var m=e.getCellGeometry(g[l]);null!=m&&(m=m.clone(),b(m,k),e.getModel().setGeometry(g[l],m))}}finally{e.getModel().endUpdate()}c=k;a.value=k+" pt"}}mxEvent.consume(d)}var e=this.editorUi.editor.graph,c=null,f=this;mxEvent.addListener(a,
+"blur",d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){c=a.value});return d};
+ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this.editorUi,d=b.editor.graph,e=this.format.getSelectionState(),c=this.createPanel(),f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";mxUtils.write(f,mxResources.get("width"));c.appendChild(f);var k,h,g,l,m,n=this.addUnitInput(c,"pt",12,44,function(){k.apply(this,arguments)});mxUtils.br(c);this.addKeyHandler(n,w);k=mxUtils.bind(this,function(a){var c=parseInt(n.value),
+c=Math.min(999,Math.max(1,isNaN(c)?1:c));if(c!=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var f=this.format.getSelectionState().cells;d.setCellStyles("width",c,f);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[c],"cells",f))}n.value=c+" pt";mxEvent.consume(a)});mxEvent.addListener(n,"blur",k);mxEvent.addListener(n,"change",k);a.appendChild(c);var p=this.createPanel();p.style.paddingBottom="30px";f=document.createElement("div");
+f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";mxUtils.write(f,mxResources.get("linestart"));p.appendChild(f);var q=this.addUnitInput(p,"pt",87,52,function(){l.apply(this,arguments)}),u=this.addUnitInput(p,"pt",16,52,function(){m.apply(this,arguments)});mxUtils.br(p);this.addLabel(p,mxResources.get("left"),87);this.addLabel(p,mxResources.get("top"),16);a.appendChild(p);this.addKeyHandler(q,w);this.addKeyHandler(u,w);var v=this.createPanel();v.style.paddingBottom="30px";f=
+document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";mxUtils.write(f,mxResources.get("lineend"));v.appendChild(f);var t=this.addUnitInput(v,"pt",87,52,function(){h.apply(this,arguments)}),x=this.addUnitInput(v,"pt",16,52,function(){g.apply(this,arguments)});mxUtils.br(v);this.addLabel(v,mxResources.get("left"),87);this.addLabel(v,mxResources.get("top"),16);a.appendChild(v);this.addKeyHandler(t,w);this.addKeyHandler(x,w);var w=mxUtils.bind(this,function(a,
+b,f){e=this.format.getSelectionState();a=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(c.style.display="",f||document.activeElement!=n)f=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),n.value=f+" pt"}else c.style.display="none";1==e.cells.length&&d.model.isEdge(a)?(f=d.model.getGeometry(a),null!=f.sourcePoint&&null==d.model.getTerminal(a,!0)?(q.value=f.sourcePoint.x,u.value=f.sourcePoint.y):p.style.display="none",null!=f.targetPoint&&
+null==d.model.getTerminal(a,!1)?(t.value=f.targetPoint.x,x.value=f.targetPoint.y):v.style.display="none"):(p.style.display="none",v.style.display="none")});l=this.addEdgeGeometryHandler(q,function(a,b){a.sourcePoint.x=b});m=this.addEdgeGeometryHandler(u,function(a,b){a.sourcePoint.y=b});h=this.addEdgeGeometryHandler(t,function(a,b){a.targetPoint.x=b});g=this.addEdgeGeometryHandler(x,function(a,b){a.targetPoint.y=b});d.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){d.getModel().removeListener(w)}});
+w()};TextFormatPanel=function(a,b,d){BaseFormatPanel.call(this,a,b,d);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
+TextFormatPanel.prototype.addFont=function(a){function b(a,b){a.style.backgroundImage=b?Editor.isDarkMode()?"linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)":"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var d=this.editorUi,e=d.editor.graph,c=this.format.getSelectionState(),f=this.createTitle(mxResources.get("font"));f.style.paddingLeft="14px";f.style.paddingTop="10px";f.style.paddingBottom="6px";a.appendChild(f);f=this.createPanel();f.style.paddingTop="2px";f.style.paddingBottom="2px";
f.style.position="relative";f.style.marginLeft="-2px";f.style.borderWidth="0px";f.className="geToolbarContainer";if(e.cellEditor.isContentEditing()){var k=f.cloneNode(),h=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k,null,!0);h.style.color="rgb(112, 112, 112)";h.style.whiteSpace="nowrap";h.style.overflow="hidden";h.style.margin="0px";this.addArrow(h);h.style.width="200px";h.style.height="15px";h=h.getElementsByTagName("div")[0];h.style.cssFloat=
"right";a.appendChild(k)}a.appendChild(f);k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var g=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",f,null,!0);g.style.color="rgb(112, 112, 112)";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.margin="0px";this.addArrow(g);g.style.width="200px";g.style.height="15px";h=f.cloneNode(!1);h.style.marginLeft="-3px";var l=
this.editorUi.toolbar.addItems(["bold","italic","underline"],h,!0);l[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");l[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");l[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var m=this.editorUi.toolbar.addItems(["vertical"],h,!0)[0];a.appendChild(h);this.styleButtons(l);this.styleButtons([m]);
-var n=f.cloneNode(!1);n.style.marginLeft="-3px";n.style.paddingBottom="0px";var p=function(a){return function(){return a()}},q=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),e.cellEditor.isContentEditing()?function(a){e.cellEditor.alignText(mxConstants.ALIGN_LEFT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),n),t=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),e.cellEditor.isContentEditing()?
-function(a){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),n),v=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?function(a){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a)}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),n);this.styleButtons([q,t,v]);if(e.cellEditor.isContentEditing()){var u=
-this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},h);this.styleButtons([u]);u.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
-u.firstChild.style.backgroundPosition="2px 2px";u.firstChild.style.backgroundSize="18px 18px";this.styleButtons([u])}var x=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),n),w=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),n),A=this.editorUi.toolbar.addButton("geSprite-bottom",
-mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),n);this.styleButtons([x,w,A]);a.appendChild(n);var E,H,D,F,z,I,K;e.cellEditor.isContentEditing()?(x.style.display="none",w.style.display="none",A.style.display="none",m.style.display="none",D=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==D.style.opacity&&document.execCommand("justifyfull",!1,null)},n),D.style.marginRight=
-"9px",D.style.opacity=1,this.styleButtons([D,E=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),H=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},n)]),E.style.marginLeft="10px",p=n.cloneNode(!1),p.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
+var n=f.cloneNode(!1);n.style.marginLeft="-3px";n.style.paddingBottom="0px";var p=function(a){return function(){return a()}},q=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),e.cellEditor.isContentEditing()?function(a){e.cellEditor.alignText(mxConstants.ALIGN_LEFT,a);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",c.cells))}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),
+n),u=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),e.cellEditor.isContentEditing()?function(a){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,a);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",c.cells))}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),n),v=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?
+function(a){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT,a);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",c.cells))}:p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),n);this.styleButtons([q,u,v]);if(e.cellEditor.isContentEditing()){var t=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",
+!1,null)},h);this.styleButtons([t]);t.firstChild.style.background="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
+t.firstChild.style.backgroundPosition="2px 2px";t.firstChild.style.backgroundSize="18px 18px";this.styleButtons([t])}var x=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),n),w=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),n),z=this.editorUi.toolbar.addButton("geSprite-bottom",
+mxResources.get("bottom"),p(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),n);this.styleButtons([x,w,z]);a.appendChild(n);var E,G,D,F,y,I,K;e.cellEditor.isContentEditing()?(x.style.display="none",w.style.display="none",z.style.display="none",m.style.display="none",D=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==D.style.opacity&&document.execCommand("justifyfull",!1,null)},n),D.style.marginRight=
+"9px",D.style.opacity=1,this.styleButtons([D,E=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),G=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},n)]),E.style.marginLeft="10px",p=n.cloneNode(!1),p.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",
!1,null)},p),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},p),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){e.cellEditor.toggleViewMode()},p)],this.styleButtons(n),n[n.length-2].style.marginLeft="10px",a.appendChild(p)):(l[2].style.marginRight="12px",v.style.marginRight="12px");n=f.cloneNode(!1);n.style.marginLeft="0px";n.style.paddingTop="8px";n.style.paddingBottom=
-"4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var L=document.createElement("select");L.style.position="absolute";L.style.left="126px";L.style.width="98px";L.style.border="1px solid rgb(160, 160, 160)";L.style.borderRadius="4px";L.style.marginTop="-2px";for(var u="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),O={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,
+"4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var L=document.createElement("select");L.style.position="absolute";L.style.left="126px";L.style.width="98px";L.style.border="1px solid rgb(160, 160, 160)";L.style.borderRadius="4px";L.style.marginTop="-2px";for(var t="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),O={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},p=0;p<u.length;p++){var J=document.createElement("option");J.setAttribute("value",u[p]);mxUtils.write(J,mxResources.get(u[p]));L.appendChild(J)}n.appendChild(L);u=f.cloneNode(!1);u.style.marginLeft="0px";u.style.paddingTop=
-"4px";u.style.paddingBottom="4px";u.style.fontWeight="normal";mxUtils.write(u,mxResources.get("writingDirection"));var P=document.createElement("select");P.style.position="absolute";P.style.border="1px solid rgb(160, 160, 160)";P.style.left="126px";P.style.width="98px";P.style.borderRadius="4px";P.style.marginTop="-2px";for(var J=["automatic","leftToRight","rightToLeft"],aa={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<J.length;p++){var X=
-document.createElement("option");X.setAttribute("value",J[p]);mxUtils.write(X,mxResources.get(J[p]));P.appendChild(X)}u.appendChild(P);e.isEditing()||(a.appendChild(n),mxEvent.addListener(L,"change",function(a){e.getModel().beginUpdate();try{var b=O[L.value];null!=b&&(e.setCellStyles(mxConstants.STYLE_LABEL_POSITION,b[0],d.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,b[1],d.cells),e.setCellStyles(mxConstants.STYLE_ALIGN,b[2],d.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,
-b[3],d.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(a)}),a.appendChild(u),mxEvent.addListener(P,"change",function(a){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,aa[P.value],d.cells);mxEvent.consume(a)}));var Q=document.createElement("input");Q.style.position="absolute";Q.style.border="1px solid rgb(160, 160, 160)";Q.style.textAlign="right";Q.style.marginTop="4px";Q.style.left="161px";Q.style.width="53px";Q.style.borderRadius="4px";Q.style.height="23px";Q.style.boxSizing="border-box";
-h.appendChild(Q);var S=null,n=this.installInputHandler(Q,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var b=function(b,d){null!=e.cellEditor.textarea&&b!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(b)&&(d||c.containsNode(b,!0))&&("FONT"==b.nodeName?(b.removeAttribute("size"),b.style.fontSize=a+"px"):mxUtils.getCurrentStyle(b).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(b.parentNode).fontSize!=
-a+"px"?b.style.fontSize=a+"px":b.style.fontSize=""))},c=window.getSelection(),d=0<c.rangeCount?c.getRangeAt(0).commonAncestorContainer:e.cellEditor.textarea;d!=e.cellEditor.textarea&&d.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");d!=e.cellEditor.textarea&&(d=d.parentNode);if(null!=d&&d.nodeType==mxConstants.NODETYPE_ELEMENT){var f=d.getElementsByTagName("*");b(d);for(d=0;d<f.length;d++)b(f[d])}Q.value=a+" pt"}else if(window.getSelection||document.selection)if(b=
-function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},f=null,document.selection?f=document.selection.createRange().parentElement():(c=window.getSelection(),0<c.rangeCount&&(f=c.getRangeAt(0).commonAncestorContainer)),null!=f&&b(e.cellEditor.textarea,f))for(S=a,document.execCommand("fontSize",!1,"4"),f=e.cellEditor.textarea.getElementsByTagName("font"),d=0;d<f.length;d++)if("4"==f[d].getAttribute("size")){f[d].removeAttribute("size");f[d].style.fontSize=S+"px";window.setTimeout(function(){Q.value=
-S+" pt";S=null},0);break}},!0),n=this.createStepper(Q,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=Q.style.display;n.style.marginTop="4px";n.style.left="214px";h.appendChild(n);h=g.getElementsByTagName("div")[0];h.style.cssFloat="right";var R=null,U="#ffffff",da=null,ja="#000000",na=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return U},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",
-{install:function(a){R=a},destroy:function(){R=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(a){e.updateLabelElements(d.cells,function(a){a.style.backgroundColor=null})},e.defaultPageBackgroundColor);na.style.fontWeight="bold";var oa=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");oa.style.fontWeight="bold";h=1<=d.vertices.length?e.stylesheet.getDefaultVertexStyle():
-e.stylesheet.getDefaultEdgeStyle();h=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ja},function(a){if(mxClient.IS_FF){for(var b=e.cellEditor.textarea.getElementsByTagName("font"),c=[],d=0;d<b.length;d++)c.push({node:b[d],color:b[d].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent");a=e.cellEditor.textarea.getElementsByTagName("font");for(d=0;d<a.length;d++)if(d>=c.length||a[d]!=c[d].node||a[d]==c[d].node&&
-a[d].getAttribute("color")!=c[d].color){c=a[d].firstChild;if(null!=c&&"A"==c.nodeName&&null==c.nextSibling&&null!=c.firstChild){a[d].parentNode.insertBefore(c,a[d]);for(b=c.firstChild;null!=b;){var f=b.nextSibling;a[d].appendChild(b);b=f}c.appendChild(a[d])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},null!=h[mxConstants.STYLE_FONTCOLOR]?h[mxConstants.STYLE_FONTCOLOR]:"#000000",{install:function(a){da=a},destroy:function(){da=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),
-mxConstants.STYLE_FONTCOLOR,"default",function(a){na.style.display=a==mxConstants.NONE?"none":"";oa.style.display=na.style.display},function(a){a==mxConstants.NONE?e.setCellStyles(mxConstants.STYLE_NOLABEL,"1",d.cells):e.setCellStyles(mxConstants.STYLE_NOLABEL,null,d.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,a,d.cells);e.updateLabelElements(d.cells,function(a){a.removeAttribute("color");a.style.color=null})},Editor.isDarkMode()?"#ffffff":"#000000");h.style.fontWeight="bold";k.appendChild(h);
-k.appendChild(na);e.cellEditor.isContentEditing()||k.appendChild(oa);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";h=e.filterSelectionCells(mxUtils.bind(this,function(a){var b=e.view.getState(a);return null==b||this.format.isAutoSizeState(b)||e.getModel().isEdge(a)||!e.isTableRow(a)&&!e.isTableCell(a)&&!e.isCellResizable(a)}));n=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,h);n.style.fontWeight=
-"bold";0<h.length&&k.appendChild(n);h=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,b.actions.get("formattedText"));h.style.fontWeight="bold";k.appendChild(h);h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="28px";h.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("spacing"));h.appendChild(n);var ea,pa,ta,
-qa,ua,ka=this.addUnitInput(h,"pt",87,52,function(){ea.apply(this,arguments)}),ga=this.addUnitInput(h,"pt",16,52,function(){pa.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("top"),87);this.addLabel(h,mxResources.get("global"),16);mxUtils.br(h);mxUtils.br(h);var ha=this.addUnitInput(h,"pt",158,52,function(){ta.apply(this,arguments)}),ba=this.addUnitInput(h,"pt",87,52,function(){qa.apply(this,arguments)}),fa=this.addUnitInput(h,"pt",16,52,function(){ua.apply(this,arguments)});
-mxUtils.br(h);this.addLabel(h,mxResources.get("left"),158);this.addLabel(h,mxResources.get("bottom"),87);this.addLabel(h,mxResources.get("right"),16);if(e.cellEditor.isContentEditing()){var ma=null,ia=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var b=""==a.value?120:parseInt(a.value),b=Math.max(0,isNaN(b)?120:b);null!=ma&&(e.cellEditor.restoreSelection(ma),ma=null);for(var c=e.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=
-c.parentNode;null!=c&&c==e.cellEditor.textarea&&null!=e.cellEditor.textarea.firstChild&&("P"!=e.cellEditor.textarea.firstChild.nodeName&&(e.cellEditor.textarea.innerHTML="<p>"+e.cellEditor.textarea.innerHTML+"</p>"),c=e.cellEditor.textarea.firstChild);null!=c&&null!=e.cellEditor.textarea&&c!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(c)&&(c.style.lineHeight=b+"%");a.value=b+" %"},function(a){ia=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==e.cellEditor.textarea&&
-(ma=e.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(ma=e.cellEditor.saveSelection())});a.value="120 %"}));k=f.cloneNode(!1);k.style.paddingLeft="0px";h=this.editorUi.toolbar.addItems(["link","image"],k,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-table",
-mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a,null,null,!1)}))];this.styleButtons(h);this.styleButtons(n);h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("insert")));h.appendChild(k);a.appendChild(h);h=f.cloneNode(!1);h.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=
-z&&e.insertColumn(z,null!=I?I.cellIndex:0)}catch(Y){this.editorUi.handleError(Y)}}),h),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=z&&e.insertColumn(z,null!=I?I.cellIndex+1:-1)}catch(Y){this.editorUi.handleError(Y)}}),h),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=z&&null!=I&&e.deleteColumn(z,I.cellIndex)}catch(Y){this.editorUi.handleError(Y)}}),
-h),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=z&&null!=K&&e.insertRow(z,K.sectionRowIndex)}catch(Y){this.editorUi.handleError(Y)}}),h),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=z&&null!=K&&e.insertRow(z,K.sectionRowIndex+1)}catch(Y){this.editorUi.handleError(Y)}}),h),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),
-mxUtils.bind(this,function(){try{null!=z&&null!=K&&e.deleteRow(z,K.sectionRowIndex)}catch(Y){this.editorUi.handleError(Y)}}),h)];this.styleButtons(n);n[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(h);f=f.cloneNode(!1);f.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(a){if(null!=
-z){var b=z.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){var c=null==I||null!=a&&mxEvent.isShiftDown(a)?z:I;e.processElements(c,function(a){a.style.border=null});null==b||b==mxConstants.NONE?(c.removeAttribute("border"),c.style.border="",c.style.borderCollapse=""):(c.setAttribute("border",
-"1"),c.style.border="1px solid "+b,c.style.borderCollapse="collapse")})}}),f),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=z){var b=z.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){var c=null==I||null!=
-a&&mxEvent.isShiftDown(a)?z:I;e.processElements(c,function(a){a.style.backgroundColor=null});c.style.backgroundColor=null==b||b==mxConstants.NONE?"":b})}}),f),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=z){var a=z.getAttribute("cellPadding")||0,a=new FilenameDialog(b,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?z.setAttribute("cellPadding",a):z.removeAttribute("cellPadding")}),mxResources.get("spacing"));b.showDialog(a.container,
-300,80,!0,!0);a.init()}},f),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=z&&z.setAttribute("align","left")},f),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=z&&z.setAttribute("align","center")},f),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=z&&z.setAttribute("align","right")},f)];this.styleButtons(n);n[2].style.marginRight="10px";k.appendChild(f);a.appendChild(k);
-F=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(h);var W=mxUtils.bind(this,function(a,b,e){d=this.format.getSelectionState();a=mxUtils.getValue(d.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.firstChild.nodeValue=mxUtils.getValue(d.style,
-mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(m,"0"==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,"1"));if(e||document.activeElement!=Q)a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),Q.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(d.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_LEFT);c(t,a==mxConstants.ALIGN_CENTER);c(v,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(d.style,mxConstants.STYLE_VERTICAL_ALIGN,
-mxConstants.ALIGN_MIDDLE);c(x,a==mxConstants.ALIGN_TOP);c(w,a==mxConstants.ALIGN_MIDDLE);c(A,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(d.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(d.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);L.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&
-b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(d.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?P.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?P.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(P.value=
-"automatic");if(e||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_SPACING,2)),ga.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ka)a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_SPACING_TOP,0)),ka.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_SPACING_RIGHT,0)),fa.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ba)a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_SPACING_BOTTOM,
-0)),ba.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ha)a=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_SPACING_LEFT,0)),ha.value=isNaN(a)?"":a+" pt"});pa=this.installInputHandler(ga,mxConstants.STYLE_SPACING,2,-999,999," pt");ea=this.installInputHandler(ka,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ua=this.installInputHandler(fa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");qa=this.installInputHandler(ba,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ta=this.installInputHandler(ha,
-mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(Q,W);this.addKeyHandler(ga,W);this.addKeyHandler(ka,W);this.addKeyHandler(fa,W);this.addKeyHandler(ba,W);this.addKeyHandler(ha,W);e.getModel().addListener(mxEvent.CHANGE,W);this.listeners.push({destroy:function(){e.getModel().removeListener(W)}});W();if(e.cellEditor.isContentEditing()){var ra=!1,f=function(){ra||(ra=!0,window.setTimeout(function(){var a=e.getSelectedEditingElement();if(null!=a){var b=function(a,b){if(null!=a&&null!=
-b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},f=function(b){if(null!=e.getParentByName(a,b,e.cellEditor.textarea))return!0;for(var c=a;null!=c&&1==c.childNodes.length;)if(c=c.childNodes[0],c.nodeName==b)return!0;return!1},k=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&
-"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""},m=mxUtils.getCurrentStyle(a),n=k(m),p=h(n,m,a),u=a.getElementsByTagName("*");if(0<u.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var x=window.getSelection(),w=0;w<u.length;w++)if(x.containsNode(u[w],!0)){temp=mxUtils.getCurrentStyle(u[w]);var n=Math.max(k(temp),n),A=h(n,temp,u[w]);if(A!=p||isNaN(A))p=""}null!=m&&(c(l[0],
-"bold"==m.fontWeight||400<m.fontWeight||f("B")||f("STRONG")),c(l[1],"italic"==m.fontStyle||f("I")||f("EM")),c(l[2],f("U")),c(H,f("SUP")),c(E,f("SUB")),e.cellEditor.isTableSelected()?(c(D,b(m.textAlign,"justify")),c(q,b(m.textAlign,"left")),c(t,b(m.textAlign,"center")),c(v,b(m.textAlign,"right"))):(f=e.cellEditor.align||mxUtils.getValue(d.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),b(m.textAlign,"justify")?(c(D,b(m.textAlign,"justify")),c(q,!1),c(t,!1),c(v,!1)):(c(D,!1),c(q,f==mxConstants.ALIGN_LEFT),
-c(t,f==mxConstants.ALIGN_CENTER),c(v,f==mxConstants.ALIGN_RIGHT))),z=e.getParentByName(a,"TABLE",e.cellEditor.textarea),K=null==z?null:e.getParentByName(a,"TR",z),I=null==z?null:e.getParentByNames(a,["TD","TH"],z),F.style.display=null!=z?"":"none",document.activeElement!=Q&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=S?(a.removeAttribute("size"),a.style.fontSize=S+" pt",S=null):Q.value=isNaN(n)?"":n+" pt",A=parseFloat(p),isNaN(A)?ia.value="100 %":ia.value=Math.round(100*A)+" %"),b=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
-function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=da&&(ja="#"==b.charAt(0)?b:"#000000",da(ja,!0)),null!=R&&(U="#"==n.charAt(0)?n:null,R(U,!0)),null!=g.firstChild&&(g.firstChild.nodeValue=
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},p=0;p<t.length;p++){var J=document.createElement("option");J.setAttribute("value",t[p]);mxUtils.write(J,mxResources.get(t[p]));L.appendChild(J)}n.appendChild(L);t=f.cloneNode(!1);t.style.marginLeft="0px";t.style.paddingTop=
+"4px";t.style.paddingBottom="4px";t.style.fontWeight="normal";mxUtils.write(t,mxResources.get("writingDirection"));var P=document.createElement("select");P.style.position="absolute";P.style.border="1px solid rgb(160, 160, 160)";P.style.left="126px";P.style.width="98px";P.style.borderRadius="4px";P.style.marginTop="-2px";for(var J=["automatic","leftToRight","rightToLeft"],ba={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<J.length;p++){var Y=
+document.createElement("option");Y.setAttribute("value",J[p]);mxUtils.write(Y,mxResources.get(J[p]));P.appendChild(Y)}t.appendChild(P);e.isEditing()||(a.appendChild(n),mxEvent.addListener(L,"change",function(a){e.getModel().beginUpdate();try{var b=O[L.value];null!=b&&(e.setCellStyles(mxConstants.STYLE_LABEL_POSITION,b[0],c.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,b[1],c.cells),e.setCellStyles(mxConstants.STYLE_ALIGN,b[2],c.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,
+b[3],c.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(a)}),a.appendChild(t),mxEvent.addListener(P,"change",function(a){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,ba[P.value],c.cells);mxEvent.consume(a)}));var Q=document.createElement("input");Q.style.position="absolute";Q.style.border="1px solid rgb(160, 160, 160)";Q.style.textAlign="right";Q.style.marginTop="4px";Q.style.left="161px";Q.style.width="53px";Q.style.borderRadius="4px";Q.style.height="23px";Q.style.boxSizing="border-box";
+h.appendChild(Q);var S=null,n=this.installInputHandler(Q,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var b=function(b,g){null!=e.cellEditor.textarea&&b!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(b)&&(g||f.containsNode(b,!0))&&("FONT"==b.nodeName?(b.removeAttribute("size"),b.style.fontSize=a+"px"):mxUtils.getCurrentStyle(b).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(b.parentNode).fontSize!=
+a+"px"?b.style.fontSize=a+"px":b.style.fontSize=""));d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[a],"cells",c.cells))},f=window.getSelection(),g=0<f.rangeCount?f.getRangeAt(0).commonAncestorContainer:e.cellEditor.textarea;g!=e.cellEditor.textarea&&g.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");g!=e.cellEditor.textarea&&(g=g.parentNode);if(null!=g&&g.nodeType==mxConstants.NODETYPE_ELEMENT){var k=g.getElementsByTagName("*");
+b(g);for(g=0;g<k.length;g++)b(k[g])}Q.value=a+" pt"}else if(window.getSelection||document.selection)if(b=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},k=null,document.selection?k=document.selection.createRange().parentElement():(f=window.getSelection(),0<f.rangeCount&&(k=f.getRangeAt(0).commonAncestorContainer)),null!=k&&b(e.cellEditor.textarea,k))for(S=a,document.execCommand("fontSize",!1,"4"),k=e.cellEditor.textarea.getElementsByTagName("font"),g=0;g<k.length;g++)if("4"==
+k[g].getAttribute("size")){k[g].removeAttribute("size");k[g].style.fontSize=S+"px";window.setTimeout(function(){Q.value=S+" pt";S=null},0);break}},!0),n=this.createStepper(Q,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=Q.style.display;n.style.marginTop="4px";n.style.left="214px";h.appendChild(n);h=g.getElementsByTagName("div")[0];h.style.cssFloat="right";var R=null,U="#ffffff",da=null,ja="#000000",na=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),
+function(){return U},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent");d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[a],"cells",c.cells))},"#ffffff",{install:function(a){R=a},destroy:function(){R=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(a){e.updateLabelElements(c.cells,function(a){a.style.backgroundColor=null})},
+e.defaultPageBackgroundColor);na.style.fontWeight="bold";var oa=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");oa.style.fontWeight="bold";h=1<=c.vertices.length?e.stylesheet.getDefaultVertexStyle():e.stylesheet.getDefaultEdgeStyle();h=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ja},function(a){if(mxClient.IS_FF){for(var b=e.cellEditor.textarea.getElementsByTagName("font"),f=[],g=0;g<
+b.length;g++)f.push({node:b[g],color:b[g].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent");d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[a],"cells",c.cells));a=e.cellEditor.textarea.getElementsByTagName("font");for(g=0;g<a.length;g++)if(g>=f.length||a[g]!=f[g].node||a[g]==f[g].node&&a[g].getAttribute("color")!=f[g].color){f=a[g].firstChild;if(null!=f&&"A"==f.nodeName&&null==f.nextSibling&&null!=f.firstChild){a[g].parentNode.insertBefore(f,
+a[g]);for(b=f.firstChild;null!=b;){var k=b.nextSibling;a[g].appendChild(b);b=k}f.appendChild(a[g])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[a],"cells",c.cells))},null!=h[mxConstants.STYLE_FONTCOLOR]?h[mxConstants.STYLE_FONTCOLOR]:"#000000",{install:function(a){da=a},destroy:function(){da=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,
+"default",function(a){na.style.display=a==mxConstants.NONE?"none":"";oa.style.display=na.style.display},function(a){a==mxConstants.NONE?e.setCellStyles(mxConstants.STYLE_NOLABEL,"1",c.cells):e.setCellStyles(mxConstants.STYLE_NOLABEL,null,c.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,a,c.cells);e.updateLabelElements(c.cells,function(a){a.removeAttribute("color");a.style.color=null})},Editor.isDarkMode()?"#ffffff":"#000000");h.style.fontWeight="bold";k.appendChild(h);k.appendChild(na);e.cellEditor.isContentEditing()||
+k.appendChild(oa);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";h=e.filterSelectionCells(mxUtils.bind(this,function(a){var b=e.view.getState(a);return null==b||this.format.isAutoSizeState(b)||e.getModel().isEdge(a)||!e.isTableRow(a)&&!e.isTableCell(a)&&!e.isCellResizable(a)}));n=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,h);n.style.fontWeight="bold";0<h.length&&k.appendChild(n);h=this.createCellOption(mxResources.get("formattedText"),
+"html",0,null,null,null,d.actions.get("formattedText"));h.style.fontWeight="bold";k.appendChild(h);h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="28px";h.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("spacing"));h.appendChild(n);var ea,pa,ta,qa,ua,ka=this.addUnitInput(h,"pt",87,52,function(){ea.apply(this,arguments)}),ga=this.addUnitInput(h,
+"pt",16,52,function(){pa.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("top"),87);this.addLabel(h,mxResources.get("global"),16);mxUtils.br(h);mxUtils.br(h);var ha=this.addUnitInput(h,"pt",158,52,function(){ta.apply(this,arguments)}),ca=this.addUnitInput(h,"pt",87,52,function(){qa.apply(this,arguments)}),fa=this.addUnitInput(h,"pt",16,52,function(){ua.apply(this,arguments)});mxUtils.br(h);this.addLabel(h,mxResources.get("left"),158);this.addLabel(h,mxResources.get("bottom"),
+87);this.addLabel(h,mxResources.get("right"),16);if(e.cellEditor.isContentEditing()){var ma=null,ia=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var b=""==a.value?120:parseInt(a.value),b=Math.max(0,isNaN(b)?120:b);null!=ma&&(e.cellEditor.restoreSelection(ma),ma=null);for(var c=e.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;null!=c&&c==e.cellEditor.textarea&&null!=e.cellEditor.textarea.firstChild&&("P"!=e.cellEditor.textarea.firstChild.nodeName&&
+(e.cellEditor.textarea.innerHTML="<p>"+e.cellEditor.textarea.innerHTML+"</p>"),c=e.cellEditor.textarea.firstChild);null!=c&&null!=e.cellEditor.textarea&&c!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(c)&&(c.style.lineHeight=b/100);a.value=b+" %"},function(a){ia=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==e.cellEditor.textarea&&(ma=e.cellEditor.saveSelection())});mxEvent.addListener(a,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(ma=e.cellEditor.saveSelection())});
+a.value="120 %"}));k=f.cloneNode(!1);k.style.paddingLeft="0px";h=this.editorUi.toolbar.addItems(["link","image"],k,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a,null,null,!1)}))];this.styleButtons(h);this.styleButtons(n);
+h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("insert")));h.appendChild(k);a.appendChild(h);h=f.cloneNode(!1);h.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=y&&e.insertColumn(y,null!=I?I.cellIndex:0)}catch(Z){this.editorUi.handleError(Z)}}),h),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",
+mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=y&&e.insertColumn(y,null!=I?I.cellIndex+1:-1)}catch(Z){this.editorUi.handleError(Z)}}),h),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=y&&null!=I&&e.deleteColumn(y,I.cellIndex)}catch(Z){this.editorUi.handleError(Z)}}),h),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=
+y&&null!=K&&e.insertRow(y,K.sectionRowIndex)}catch(Z){this.editorUi.handleError(Z)}}),h),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=y&&null!=K&&e.insertRow(y,K.sectionRowIndex+1)}catch(Z){this.editorUi.handleError(Z)}}),h),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=y&&null!=K&&e.deleteRow(y,K.sectionRowIndex)}catch(Z){this.editorUi.handleError(Z)}}),
+h)];this.styleButtons(n);n[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(h);f=f.cloneNode(!1);f.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(a){if(null!=y){var b=y.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+
+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){var c=null==I||null!=a&&mxEvent.isShiftDown(a)?y:I;e.processElements(c,function(a){a.style.border=null});null==b||b==mxConstants.NONE?(c.removeAttribute("border"),c.style.border="",c.style.borderCollapse=""):(c.setAttribute("border","1"),c.style.border="1px solid "+b,c.style.borderCollapse="collapse")})}}),f),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),
+mxUtils.bind(this,function(a){if(null!=y){var b=y.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(b,function(b){var c=null==I||null!=a&&mxEvent.isShiftDown(a)?y:I;e.processElements(c,function(a){a.style.backgroundColor=null});c.style.backgroundColor=null==b||b==mxConstants.NONE?"":b})}}),f),this.editorUi.toolbar.addButton("geSprite-fit",
+mxResources.get("spacing"),function(){if(null!=y){var a=y.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?y.setAttribute("cellPadding",a):y.removeAttribute("cellPadding")}),mxResources.get("spacing"));d.showDialog(a.container,300,80,!0,!0);a.init()}},f),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=y&&y.setAttribute("align","left")},f),this.editorUi.toolbar.addButton("geSprite-center",
+mxResources.get("center"),function(){null!=y&&y.setAttribute("align","center")},f),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=y&&y.setAttribute("align","right")},f)];this.styleButtons(n);n[2].style.marginRight="10px";k.appendChild(f);a.appendChild(k);F=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(h);var X=mxUtils.bind(this,function(a,d,e){c=this.format.getSelectionState();
+a=mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0);b(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(l[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);b(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.firstChild.nodeValue=mxUtils.getValue(c.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(m,"0"==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,"1"));if(e||document.activeElement!=Q)a=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSIZE,
+Menus.prototype.defaultFontSize)),Q.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(c.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);b(q,a==mxConstants.ALIGN_LEFT);b(u,a==mxConstants.ALIGN_CENTER);b(v,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(c.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(x,a==mxConstants.ALIGN_TOP);b(w,a==mxConstants.ALIGN_MIDDLE);b(z,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(c.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);
+d=mxUtils.getValue(c.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);L.value=a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&d==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&d==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&d==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&d==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?
+"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(c.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?P.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?P.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(P.value="automatic");if(e||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_SPACING,2)),ga.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ka)a=parseFloat(mxUtils.getValue(c.style,
+mxConstants.STYLE_SPACING_TOP,0)),ka.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_SPACING_RIGHT,0)),fa.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_SPACING_BOTTOM,0)),ca.value=isNaN(a)?"":a+" pt";if(e||document.activeElement!=ha)a=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_SPACING_LEFT,0)),ha.value=isNaN(a)?"":a+" pt"});pa=this.installInputHandler(ga,
+mxConstants.STYLE_SPACING,2,-999,999," pt");ea=this.installInputHandler(ka,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ua=this.installInputHandler(fa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");qa=this.installInputHandler(ca,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ta=this.installInputHandler(ha,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(Q,X);this.addKeyHandler(ga,X);this.addKeyHandler(ka,X);this.addKeyHandler(fa,X);this.addKeyHandler(ca,X);this.addKeyHandler(ha,
+X);e.getModel().addListener(mxEvent.CHANGE,X);this.listeners.push({destroy:function(){e.getModel().removeListener(X)}});X();if(e.cellEditor.isContentEditing()){var ra=!1,f=function(){ra||(ra=!0,window.setTimeout(function(){var a=e.getSelectedEditingElement();if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},f=function(b){if(null!=e.getParentByName(a,b,e.cellEditor.textarea))return!0;for(var c=
+a;null!=c&&1==c.childNodes.length;)if(c=c.childNodes[0],c.nodeName==b)return!0;return!1},k=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""},m=mxUtils.getCurrentStyle(a),n=k(m),
+p=h(n,m,a),t=a.getElementsByTagName("*");if(0<t.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var x=window.getSelection(),w=0;w<t.length;w++)if(x.containsNode(t[w],!0)){temp=mxUtils.getCurrentStyle(t[w]);var n=Math.max(k(temp),n),z=h(n,temp,t[w]);if(z!=p||isNaN(z))p=""}null!=m&&(b(l[0],"bold"==m.fontWeight||400<m.fontWeight||f("B")||f("STRONG")),b(l[1],"italic"==m.fontStyle||f("I")||f("EM")),b(l[2],f("U")),b(G,f("SUP")),b(E,f("SUB")),e.cellEditor.isTableSelected()?(b(D,d(m.textAlign,
+"justify")),b(q,d(m.textAlign,"left")),b(u,d(m.textAlign,"center")),b(v,d(m.textAlign,"right"))):(f=e.cellEditor.align||mxUtils.getValue(c.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),d(m.textAlign,"justify")?(b(D,d(m.textAlign,"justify")),b(q,!1),b(u,!1),b(v,!1)):(b(D,!1),b(q,f==mxConstants.ALIGN_LEFT),b(u,f==mxConstants.ALIGN_CENTER),b(v,f==mxConstants.ALIGN_RIGHT))),y=e.getParentByName(a,"TABLE",e.cellEditor.textarea),K=null==y?null:e.getParentByName(a,"TR",y),I=null==y?null:e.getParentByNames(a,
+["TD","TH"],y),F.style.display=null!=y?"":"none",document.activeElement!=Q&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=S?(a.removeAttribute("size"),a.style.fontSize=S+" pt",S=null):Q.value=isNaN(n)?"":n+" pt",z=parseFloat(p),isNaN(z)?ia.value="100 %":ia.value=Math.round(100*z)+" %"),d=m.color.replace(/\brgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+)\s*)?\)/g,function(a,b,c,d,e){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+
+(null!=e?("0"+Number(e).toString(16)).substr(-2):"")}),n=m.backgroundColor.replace(/\brgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+)\s*)?\)/g,function(a,b,c,d,e){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+(null!=e?("0"+Number(e).toString(16)).substr(-2):"")}),null!=da&&(ja="#"==d.charAt(0)?d:"#000000",da(ja,!0)),null!=R&&(U="#"==n.charAt(0)?n:null,R(U,!0)),null!=g.firstChild&&(g.firstChild.nodeValue=
Graph.stripQuotes(m.fontFamily)))}ra=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(e.cellEditor.textarea,"DOMSubtreeModified",f);mxEvent.addListener(e.cellEditor.textarea,"input",f);mxEvent.addListener(e.cellEditor.textarea,"touchend",f);mxEvent.addListener(e.cellEditor.textarea,"mouseup",f);mxEvent.addListener(e.cellEditor.textarea,"keyup",f);this.listeners.push({destroy:function(){}});f()}return a};
-StyleFormatPanel=function(a,c,b){BaseFormatPanel.call(this,a,c,b);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
+StyleFormatPanel=function(a,b,d){BaseFormatPanel.call(this,a,b,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();!a.containsLabel&&0<a.cells.length&&(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
-StyleFormatPanel.prototype.getCssRules=function(a){var c=document.implementation.createHTMLDocument(""),b=document.createElement("style");mxUtils.setTextContent(b,a);c.body.appendChild(b);return b.sheet.cssRules};
-StyleFormatPanel.prototype.addSvgStyles=function(a){var c=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var b=c.style.editableCssRules;if(null!=b){var e=new RegExp(b),d=c.style.image.substring(c.style.image.indexOf(",")+1),f=window.atob?atob(d):Base64.decode(d,!0),k=mxUtils.parseXml(f);if(null!=k)for(var h=k.getElementsByTagName("style"),c=0;c<h.length;c++)for(var g=this.getCssRules(mxUtils.getTextContent(h[c])),
-b=0;b<g.length;b++)this.addSvgRule(a,g[b],k,h[c],g,b,e)}}catch(l){}return a};
-StyleFormatPanel.prototype.addSvgRule=function(a,c,b,e,d,f,k){var h=this.editorUi.editor.graph;k.test(c.selectorText)&&(k=mxUtils.bind(this,function(c,k,m){var g=mxUtils.trim(c.style[k]);""!=g&&"url("!=g.substring(0,4)&&(c=this.createColorOption(m+" "+c.selectorText,function(){var a=g;return(a=a.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===a.length?"#"+("0"+parseInt(a[1],10).toString(16)).slice(-2)+("0"+parseInt(a[2],10).toString(16)).slice(-2)+("0"+parseInt(a[3],
-10).toString(16)).slice(-2):""},mxUtils.bind(this,function(a){d[f].style[k]=a;a="";for(var c=0;c<d.length;c++)a+=d[c].cssText+" ";e.textContent=a;a=mxUtils.getXml(b.documentElement);h.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(a):Base64.encode(a,!0)),this.format.getSelectionState().cells)}),"#ffffff",{install:function(a){},destroy:function(){}}),a.appendChild(c),a.style.display="")}),k(c,"fill",mxResources.get("fill")),k(c,"stroke",mxResources.get("line")),k(c,"stop-color",
+StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),d=document.createElement("style");mxUtils.setTextContent(d,a);b.body.appendChild(d);return d.sheet.cssRules};
+StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var d=b.style.editableCssRules;if(null!=d){var e=new RegExp(d),c=b.style.image.substring(b.style.image.indexOf(",")+1),f=window.atob?atob(c):Base64.decode(c,!0),k=mxUtils.parseXml(f);if(null!=k)for(var h=k.getElementsByTagName("style"),b=0;b<h.length;b++)for(var g=this.getCssRules(mxUtils.getTextContent(h[b])),
+d=0;d<g.length;d++)this.addSvgRule(a,g[d],k,h[b],g,d,e)}}catch(l){}return a};
+StyleFormatPanel.prototype.addSvgRule=function(a,b,d,e,c,f,k){var h=this.editorUi.editor.graph;k.test(b.selectorText)&&(k=mxUtils.bind(this,function(b,k,m){var g=mxUtils.trim(b.style[k]);""!=g&&"url("!=g.substring(0,4)&&(b=this.createColorOption(m+" "+b.selectorText,function(){var a=g;return(a=a.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===a.length?"#"+("0"+parseInt(a[1],10).toString(16)).slice(-2)+("0"+parseInt(a[2],10).toString(16)).slice(-2)+("0"+parseInt(a[3],
+10).toString(16)).slice(-2):""},mxUtils.bind(this,function(a){c[f].style[k]=a;a="";for(var b=0;b<c.length;b++)a+=c[b].cssText+" ";e.textContent=a;a=mxUtils.getXml(d.documentElement);h.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(a):Base64.encode(a,!0)),this.format.getSelectionState().cells)}),"#ffffff",{install:function(a){},destroy:function(){}}),a.appendChild(b),a.style.display="")}),k(b,"fill",mxResources.get("fill")),k(b,"stroke",mxResources.get("line")),k(b,"stop-color",
mxResources.get("gradient")))};
-StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==c.cells.length&&(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="210px",b.style.marginBottom="2px",a.appendChild(b));c.image&&0<c.cells.length&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,
-function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="210px":(b.style.width="104px",c.style.width="104px",c.style.marginLeft="2px"),a.appendChild(c));return a};
-StyleFormatPanel.prototype.addFill=function(a){var c=this.editorUi,b=c.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var d=document.createElement("select");d.style.position="absolute";d.style.left="104px";d.style.width="70px";d.style.height="22px";d.style.padding="0px";d.style.marginTop="-3px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.boxSizing="border-box";var f=d.cloneNode(!1);mxEvent.addListener(d,"click",
-function(a){mxEvent.consume(a)});mxEvent.addListener(f,"click",function(a){mxEvent.consume(a)});var k=1<=e.vertices.length?b.stylesheet.getDefaultVertexStyle():b.stylesheet.getDefaultEdgeStyle(),h=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,null!=k[mxConstants.STYLE_GRADIENTCOLOR]?k[mxConstants.STYLE_GRADIENTCOLOR]:"#ffffff",function(a){d.style.display=null==a||a==mxConstants.NONE?"none":""},function(a){b.updateCellStyles(mxConstants.STYLE_GRADIENTCOLOR,
-a,b.getSelectionCells())}),g="image"==e.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,k="image"==e.style.shape?mxResources.get("background"):mxResources.get("fill"),k=this.createCellColorOption(k,g,"default",null,mxUtils.bind(this,function(a){b.setCellStyles(g,a,e.cells)}),b.defaultPageBackgroundColor);k.style.fontWeight="bold";var l=mxUtils.getValue(e.style,g,null);h.style.display=null!=l&&l!=mxConstants.NONE&&e.fill&&"image"!=e.style.shape?"":"none";for(var m=[mxConstants.DIRECTION_NORTH,
-mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL],l=0;l<m.length;l++){var n=document.createElement("option");n.setAttribute("value",m[l]);mxUtils.write(n,mxResources.get(m[l]));d.appendChild(n)}h.appendChild(d);for(l=0;l<Editor.roughFillStyles.length;l++)m=document.createElement("option"),m.setAttribute("value",Editor.roughFillStyles[l].val),mxUtils.write(m,Editor.roughFillStyles[l].dispName),f.appendChild(m);k.appendChild(f);var p=mxUtils.bind(this,
-function(){e=this.format.getSelectionState();var b=mxUtils.getValue(e.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),c=mxUtils.getValue(e.style,"fillStyle","auto");""==b&&(b=mxConstants.DIRECTION_SOUTH);d.value=b;f.value=c;a.style.display=e.fill?"":"none";b=mxUtils.getValue(e.style,mxConstants.STYLE_FILLCOLOR,null);!e.fill||e.containsImage||null==b||b==mxConstants.NONE||"filledEdge"==e.style.shape?(f.style.display="none",h.style.display="none"):(f.style.display="1"==e.style.sketch?
-"":"none",h.style.display="1"!=e.style.sketch||"solid"==c||"auto"==c?"":"none")});b.getModel().addListener(mxEvent.CHANGE,p);this.listeners.push({destroy:function(){b.getModel().removeListener(p)}});p();mxEvent.addListener(d,"change",function(a){b.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,e.cells);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",e.cells));mxEvent.consume(a)});mxEvent.addListener(f,"change",function(a){b.setCellStyles("fillStyle",
-f.value,e.cells);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",e.cells));mxEvent.consume(a)});a.appendChild(k);a.appendChild(h);k=this.getCustomColors();for(l=0;l<k.length;l++)a.appendChild(this.createCellColorOption(k[l].title,k[l].key,k[l].defaultValue));return a};
-StyleFormatPanel.prototype.getCustomColors=function(){var a=this.format.getSelectionState(),c=[];"swimlane"!=a.style.shape&&"table"!=a.style.shape||c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return c};
-StyleFormatPanel.prototype.addStroke=function(a){function c(a){var b=parseFloat(u.value),b=Math.min(999,Math.max(0,isNaN(b)?1:b));b!=mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,b,f.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[b],"cells",f.cells)));u.value=b+" pt";mxEvent.consume(a)}function b(a){var b=parseFloat(x.value),b=Math.min(999,Math.max(0,isNaN(b)?1:b));b!=mxUtils.getValue(f.style,
-mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,b,f.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[b],"cells",f.cells)));x.value=b+" pt";mxEvent.consume(a)}var e=this.editorUi,d=e.editor.graph,f=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";f.stroke||(k.style.display="none");var h=document.createElement("select");
-h.style.position="absolute";h.style.height="22px";h.style.padding="0px";h.style.marginTop="-3px";h.style.boxSizing="border-box";h.style.left="94px";h.style.width="80px";h.style.border="1px solid rgb(160, 160, 160)";h.style.borderRadius="4px";for(var g=["sharp","rounded","curved"],l=0;l<g.length;l++){var m=document.createElement("option");m.setAttribute("value",g[l]);mxUtils.write(m,mxResources.get(g[l]));h.appendChild(m)}mxEvent.addListener(h,"change",function(a){d.getModel().beginUpdate();try{var b=
-[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],c=["0",null];"rounded"==h.value?c=["1",null]:"curved"==h.value&&(c=[null,"1"]);for(var g=0;g<b.length;g++)d.setCellStyles(b[g],c[g],f.cells);e.fireEvent(new mxEventObject("styleChanged","keys",b,"values",c,"cells",f.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(h,"click",function(a){mxEvent.consume(a)});var n="image"==f.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,g="image"==f.style.shape?
-mxResources.get("border"):mxResources.get("line"),g=this.createCellColorOption(g,n,"default",null,mxUtils.bind(this,function(a){d.setCellStyles(n,a,f.cells)}),Editor.isDarkMode()?"#ffffff":"#000000");g.appendChild(h);k.appendChild(g);var p=k.cloneNode(!1);p.style.fontWeight="normal";p.style.whiteSpace="nowrap";p.style.position="relative";p.style.paddingLeft="0px";p.style.marginBottom="2px";p.style.overflow="hidden";p.style.marginTop="2px";p.style.width="220px";p.className="geToolbarContainer";var q=
+StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),d=null;1==b.cells.length&&(d=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),d.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),d.style.width="210px",d.style.marginBottom="2px",a.appendChild(d));b.image&&0<b.cells.length&&(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==d?b.style.width="210px":(d.style.width="104px",b.style.width="104px",b.style.marginLeft="2px"),a.appendChild(b));return a};
+StyleFormatPanel.prototype.addFill=function(a){var b=this.editorUi,d=b.editor.graph,e=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var c=document.createElement("select");c.style.position="absolute";c.style.left="104px";c.style.width="70px";c.style.height="22px";c.style.padding="0px";c.style.marginTop="-3px";c.style.borderRadius="4px";c.style.border="1px solid rgb(160, 160, 160)";c.style.boxSizing="border-box";var f=c.cloneNode(!1);mxEvent.addListener(c,"click",
+function(a){mxEvent.consume(a)});mxEvent.addListener(f,"click",function(a){mxEvent.consume(a)});var k=1<=e.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle(),h=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,null!=k[mxConstants.STYLE_GRADIENTCOLOR]?k[mxConstants.STYLE_GRADIENTCOLOR]:"#ffffff",function(a){c.style.display=null==a||a==mxConstants.NONE?"none":""},function(a){d.updateCellStyles(mxConstants.STYLE_GRADIENTCOLOR,
+a,d.getSelectionCells())}),g="image"==e.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,k="image"==e.style.shape?mxResources.get("background"):mxResources.get("fill"),k=this.createCellColorOption(k,g,"default",null,mxUtils.bind(this,function(a){d.setCellStyles(g,a,e.cells)}),d.defaultPageBackgroundColor);k.style.fontWeight="bold";var l=mxUtils.getValue(e.style,g,null);h.style.display=null!=l&&l!=mxConstants.NONE&&e.fill&&"image"!=e.style.shape?"":"none";for(var m=[mxConstants.DIRECTION_NORTH,
+mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL],l=0;l<m.length;l++){var n=document.createElement("option");n.setAttribute("value",m[l]);mxUtils.write(n,mxResources.get(m[l]));c.appendChild(n)}h.appendChild(c);for(l=0;l<Editor.roughFillStyles.length;l++)m=document.createElement("option"),m.setAttribute("value",Editor.roughFillStyles[l].val),mxUtils.write(m,Editor.roughFillStyles[l].dispName),f.appendChild(m);k.appendChild(f);var p=mxUtils.bind(this,
+function(){e=this.format.getSelectionState();var b=mxUtils.getValue(e.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),d=mxUtils.getValue(e.style,"fillStyle","auto");""==b&&(b=mxConstants.DIRECTION_SOUTH);c.value=b;f.value=d;a.style.display=e.fill?"":"none";b=mxUtils.getValue(e.style,mxConstants.STYLE_FILLCOLOR,null);!e.fill||e.containsImage||null==b||b==mxConstants.NONE||"filledEdge"==e.style.shape?(f.style.display="none",h.style.display="none"):(f.style.display="1"==e.style.sketch?
+"":"none",h.style.display="1"!=e.style.sketch||"solid"==d||"auto"==d?"":"none")});d.getModel().addListener(mxEvent.CHANGE,p);this.listeners.push({destroy:function(){d.getModel().removeListener(p)}});p();mxEvent.addListener(c,"change",function(a){d.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,c.value,e.cells);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[c.value],"cells",e.cells));mxEvent.consume(a)});mxEvent.addListener(f,"change",function(a){d.setCellStyles("fillStyle",
+f.value,e.cells);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[c.value],"cells",e.cells));mxEvent.consume(a)});a.appendChild(k);a.appendChild(h);k=this.getCustomColors();for(l=0;l<k.length;l++)a.appendChild(this.createCellColorOption(k[l].title,k[l].key,k[l].defaultValue));return a};
+StyleFormatPanel.prototype.getCustomColors=function(){var a=this.format.getSelectionState(),b=[];"swimlane"!=a.style.shape&&"table"!=a.style.shape||b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return b};
+StyleFormatPanel.prototype.addStroke=function(a){function b(a){var b=parseFloat(t.value),b=Math.min(999,Math.max(0,isNaN(b)?1:b));b!=mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)&&(c.setCellStyles(mxConstants.STYLE_STROKEWIDTH,b,f.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[b],"cells",f.cells)));t.value=b+" pt";mxEvent.consume(a)}function d(a){var b=parseFloat(x.value),b=Math.min(999,Math.max(0,isNaN(b)?1:b));b!=mxUtils.getValue(f.style,
+mxConstants.STYLE_STROKEWIDTH,1)&&(c.setCellStyles(mxConstants.STYLE_STROKEWIDTH,b,f.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[b],"cells",f.cells)));x.value=b+" pt";mxEvent.consume(a)}var e=this.editorUi,c=e.editor.graph,f=this.format.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";f.stroke||(k.style.display="none");var h=document.createElement("select");
+h.style.position="absolute";h.style.height="22px";h.style.padding="0px";h.style.marginTop="-3px";h.style.boxSizing="border-box";h.style.left="94px";h.style.width="80px";h.style.border="1px solid rgb(160, 160, 160)";h.style.borderRadius="4px";for(var g=["sharp","rounded","curved"],l=0;l<g.length;l++){var m=document.createElement("option");m.setAttribute("value",g[l]);mxUtils.write(m,mxResources.get(g[l]));h.appendChild(m)}mxEvent.addListener(h,"change",function(a){c.getModel().beginUpdate();try{var b=
+[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],d=["0",null];"rounded"==h.value?d=["1",null]:"curved"==h.value&&(d=[null,"1"]);for(var g=0;g<b.length;g++)c.setCellStyles(b[g],d[g],f.cells);e.fireEvent(new mxEventObject("styleChanged","keys",b,"values",d,"cells",f.cells))}finally{c.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(h,"click",function(a){mxEvent.consume(a)});var n="image"==f.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,g="image"==f.style.shape?
+mxResources.get("border"):mxResources.get("line"),g=this.createCellColorOption(g,n,"default",null,mxUtils.bind(this,function(a){c.setCellStyles(n,a,f.cells)}),Editor.isDarkMode()?"#ffffff":"#000000");g.appendChild(h);k.appendChild(g);var p=k.cloneNode(!1);p.style.fontWeight="normal";p.style.whiteSpace="nowrap";p.style.position="relative";p.style.paddingLeft="0px";p.style.marginBottom="2px";p.style.overflow="hidden";p.style.marginTop="2px";p.style.width="220px";p.className="geToolbarContainer";var q=
mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom="1px "+c+" "+this.defaultStrokeColor;d.style.paddingTop="6px";a.firstChild.firstChild.style.padding="0px 4px 0px 4px";a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d);return a}),l=this.editorUi.toolbar.addMenuFunctionInContainer(p,"geSprite-orthogonal",mxResources.get("pattern"),
!1,mxUtils.bind(this,function(a){q(a,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),t=p.cloneNode(!1),v=this.editorUi.toolbar.addMenuFunctionInContainer(t,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,
+["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),u=p.cloneNode(!1),v=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,
null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",
-null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),m=this.editorUi.toolbar.addMenuFunctionInContainer(t,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
+null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),m=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
[null,null]).setAttribute("title",mxResources.get("solid"));q(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,
-mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),g=p.cloneNode(!1),u=document.createElement("input");u.style.position="absolute";u.style.textAlign="right";u.style.marginTop="2px";u.style.width="52px";u.style.height="21px";u.style.left="146px";u.style.border="1px solid rgb(160, 160, 160)";u.style.borderRadius="4px";u.style.boxSizing="border-box";u.setAttribute("title",mxResources.get("linewidth"));p.appendChild(u);var x=u.cloneNode(!0);t.appendChild(x);
-var w=this.createStepper(u,c,1,9);w.style.display=u.style.display;w.style.marginTop="2px";w.style.left="198px";p.appendChild(w);w=this.createStepper(x,b,1,9);w.style.display=x.style.display;w.style.marginTop="2px";x.style.position="absolute";w.style.left="198px";t.appendChild(w);mxEvent.addListener(u,"blur",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(x,"blur",b);mxEvent.addListener(x,"change",b);var A=this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-orthogonal",mxResources.get("waypoints"),
+mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),g=p.cloneNode(!1),t=document.createElement("input");t.style.position="absolute";t.style.textAlign="right";t.style.marginTop="2px";t.style.width="52px";t.style.height="21px";t.style.left="146px";t.style.border="1px solid rgb(160, 160, 160)";t.style.borderRadius="4px";t.style.boxSizing="border-box";t.setAttribute("title",mxResources.get("linewidth"));p.appendChild(t);var x=t.cloneNode(!0);u.appendChild(x);
+var w=this.createStepper(t,b,1,9);w.style.display=t.style.display;w.style.marginTop="2px";w.style.left="198px";p.appendChild(w);w=this.createStepper(x,d,1,9);w.style.display=x.style.display;w.style.marginTop="2px";x.style.position="absolute";w.style.left="198px";u.appendChild(w);mxEvent.addListener(t,"blur",b);mxEvent.addListener(t,"change",b);mxEvent.addListener(x,"blur",d);mxEvent.addListener(x,"change",d);var z=this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-orthogonal",mxResources.get("waypoints"),
!1,mxUtils.bind(this,function(a){"arrow"!=f.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",
mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",
null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
@@ -3149,7 +3152,7 @@ null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi
Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):this.editorUi.menus.edgeStyleChange(a,
-"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"));a.div.style.width="40px"}})),H=this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape||"filledEdge"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,
+"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"));a.div.style.width="40px"}})),G=this.editorUi.toolbar.addMenuFunctionInContainer(g,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape||"filledEdge"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,
0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));var c=document.createElement("font");c.style.fontSize="10px";mxUtils.write(c,mxResources.get("none"));b.firstChild.firstChild.appendChild(c);"connector"==f.style.shape||"filledEdge"==f.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),
"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,
@@ -3163,79 +3166,79 @@ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STY
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"));
-a.div.style.width="40px"}})),w=this.addArrow(v,8);w.nextSibling.style.position="relative";w.nextSibling.style.top="-2px";w=this.addArrow(A,10);w.nextSibling.style.position="relative";w.nextSibling.style.top="-3px";A.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(E);this.addArrow(H);w=this.addArrow(l,9);w.className="geIcon";w.style.width="auto";var D=this.addArrow(m,9);D.className="geIcon";D.style.width="22px";var F=document.createElement("div");F.style.width="84px";F.style.height="1px";
-F.style.borderBottom="1px solid "+this.defaultStrokeColor;F.style.marginBottom="7px";w.appendChild(F);var z=document.createElement("div");z.style.width="23px";z.style.height="1px";z.style.borderBottom="1px solid "+this.defaultStrokeColor;z.style.marginBottom="7px";D.appendChild(z);l.style.height="15px";l.style.marginLeft="16px";m.style.height="15px";m.style.marginLeft="3px";v.style.marginLeft="10px";v.style.height="15px";A.style.marginLeft="10px";A.style.height="17px";E.style.marginLeft="3px";E.style.height=
-"17px";H.style.marginLeft="3px";H.style.height="17px";a.appendChild(k);a.appendChild(t);a.appendChild(p);l=p.cloneNode(!1);l.style.padding="5px 4px 6px 0px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="0px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var I,K,L=this.addUnitInput(l,"pt",98,52,function(){I.apply(this,arguments)}),
-O=this.addUnitInput(l,"pt",30,52,function(){K.apply(this,arguments)});mxUtils.br(l);w=document.createElement("div");w.style.height="8px";l.appendChild(w);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var J,P,aa=this.addUnitInput(l,"pt",98,52,function(){J.apply(this,arguments)}),X=this.addUnitInput(l,"pt",30,52,function(){P.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),98,52);this.addLabel(l,mxResources.get("size"),30,52);mxUtils.br(l);
+a.div.style.width="40px"}})),w=this.addArrow(v,8);w.nextSibling.style.position="relative";w.nextSibling.style.top="-2px";w=this.addArrow(z,10);w.nextSibling.style.position="relative";w.nextSibling.style.top="-3px";z.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(E);this.addArrow(G);w=this.addArrow(l,9);w.className="geIcon";w.style.width="auto";var D=this.addArrow(m,9);D.className="geIcon";D.style.width="22px";var F=document.createElement("div");F.style.width="84px";F.style.height="1px";
+F.style.borderBottom="1px solid "+this.defaultStrokeColor;F.style.marginBottom="7px";w.appendChild(F);var y=document.createElement("div");y.style.width="23px";y.style.height="1px";y.style.borderBottom="1px solid "+this.defaultStrokeColor;y.style.marginBottom="7px";D.appendChild(y);l.style.height="15px";l.style.marginLeft="16px";m.style.height="15px";m.style.marginLeft="3px";v.style.marginLeft="10px";v.style.height="15px";z.style.marginLeft="10px";z.style.height="17px";E.style.marginLeft="3px";E.style.height=
+"17px";G.style.marginLeft="3px";G.style.height="17px";a.appendChild(k);a.appendChild(u);a.appendChild(p);l=p.cloneNode(!1);l.style.padding="5px 4px 6px 0px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="0px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var I,K,L=this.addUnitInput(l,"pt",98,52,function(){I.apply(this,arguments)}),
+O=this.addUnitInput(l,"pt",30,52,function(){K.apply(this,arguments)});mxUtils.br(l);w=document.createElement("div");w.style.height="8px";l.appendChild(w);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var J,P,ba=this.addUnitInput(l,"pt",98,52,function(){J.apply(this,arguments)}),Y=this.addUnitInput(l,"pt",30,52,function(){P.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),98,52);this.addLabel(l,mxResources.get("size"),30,52);mxUtils.br(l);
k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom="2px";k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));k.appendChild(m);var Q,S=this.addUnitInput(k,"pt",30,52,function(){Q.apply(this,
arguments)});f.edges.length==f.cells.length?(a.appendChild(g),a.appendChild(l)):f.vertices.length==f.cells.length&&a.appendChild(k);var R=mxUtils.bind(this,function(b,c,d){function g(a,b,c,d){c=c.getElementsByTagName("div")[0];null!=c&&(c.className=e.getCssClassForMarker(d,f.style.shape,a,b),c.nextSibling.style.marginLeft="1px",c.nextSibling.style.paddingRight="5px","geSprite geSprite-noarrow"==c.className?(c.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),c.style.backgroundImage="none",c.style.verticalAlign=
-"top",c.style.marginTop="4px",c.style.fontSize="10px",c.style.filter="none",c.style.color=this.defaultStrokeColor,c.nextSibling.style.marginTop="0px"):(c.nextSibling.style.position="relative",c.nextSibling.style.top="-2px"));return c}f=this.format.getSelectionState();mxUtils.getValue(f.style,n,null);if(d||document.activeElement!=u)b=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)),u.value=isNaN(b)?"":b+" pt";if(d||document.activeElement!=x)b=parseFloat(mxUtils.getValue(f.style,
+"top",c.style.marginTop="4px",c.style.fontSize="10px",c.style.filter="none",c.style.color=this.defaultStrokeColor,c.nextSibling.style.marginTop="0px"):(c.nextSibling.style.position="relative",c.nextSibling.style.top="-2px"));return c}f=this.format.getSelectionState();mxUtils.getValue(f.style,n,null);if(d||document.activeElement!=t)b=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)),t.value=isNaN(b)?"":b+" pt";if(d||document.activeElement!=x)b=parseFloat(mxUtils.getValue(f.style,
mxConstants.STYLE_STROKEWIDTH,1)),x.value=isNaN(b)?"":b+" pt";h.style.visibility="connector"==f.style.shape||"filledEdge"==f.style.shape?"":"hidden";"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?h.value="curved":"1"==mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,null)&&(h.value="rounded");"1"==mxUtils.getValue(f.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(f.style,mxConstants.STYLE_DASH_PATTERN,null)?F.style.borderBottom="1px dashed "+this.defaultStrokeColor:F.style.borderBottom=
-"1px dotted "+this.defaultStrokeColor:F.style.borderBottom="1px solid "+this.defaultStrokeColor;z.style.borderBottom=F.style.borderBottom;b=A.getElementsByTagName("div")[0];null!=b&&(c=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(f.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null),"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?b.className="geSprite geSprite-curved":b.className="straight"==c||"none"==c||null==c?"geSprite geSprite-straight":
+"1px dotted "+this.defaultStrokeColor:F.style.borderBottom="1px solid "+this.defaultStrokeColor;y.style.borderBottom=F.style.borderBottom;b=z.getElementsByTagName("div")[0];null!=b&&(c=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(f.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null),"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?b.className="geSprite geSprite-curved":b.className="straight"==c||"none"==c||null==c?"geSprite geSprite-straight":
"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(f.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(f.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");b=v.getElementsByTagName("div")[0];null!=b&&(b.className="link"==f.style.shape?"geSprite geSprite-linkedge":
-"flexArrow"==f.style.shape?"geSprite geSprite-arrow":"arrow"==f.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");f.edges.length==f.cells.length?(t.style.display="",p.style.display="none"):(t.style.display="none",p.style.display="");Graph.lineJumpsEnabled&&0<f.edges.length&&0==f.vertices.length&&f.lineJumps&&(a.style.borderBottomStyle="none");b=g(mxUtils.getValue(f.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(f.style,"startFill","1"),E,"start");c=g(mxUtils.getValue(f.style,
-mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(f.style,"endFill","1"),H,"end");null!=b&&null!=c&&("arrow"==f.style.shape?(b.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==f.style.shape&&(b.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(A,"arrow"==f.style.shape?30:100);"connector"!=f.style.shape&&"flexArrow"!=f.style.shape&&"filledEdge"!=f.style.shape?(mxUtils.setOpacity(E,30),mxUtils.setOpacity(H,
-30)):(mxUtils.setOpacity(E,100),mxUtils.setOpacity(H,100));if(d||document.activeElement!=X)b=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),X.value=isNaN(b)?"":b+" pt";if(d||document.activeElement!=aa)b=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),aa.value=isNaN(b)?"":b+" pt";if(d||document.activeElement!=O)b=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(b)?
-"":b+" pt";if(d||document.activeElement!=aa)b=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),L.value=isNaN(b)?"":b+" pt";if(d||document.activeElement!=S)b=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_PERIMETER_SPACING,0)),S.value=isNaN(b)?"":b+" pt"});P=this.installInputHandler(X,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(aa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");K=this.installInputHandler(O,
-mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");I=this.installInputHandler(L,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");Q=this.installInputHandler(S,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(u,R);this.addKeyHandler(X,R);this.addKeyHandler(aa,R);this.addKeyHandler(O,R);this.addKeyHandler(L,R);this.addKeyHandler(S,R);d.getModel().addListener(mxEvent.CHANGE,R);this.listeners.push({destroy:function(){d.getModel().removeListener(R)}});
+"flexArrow"==f.style.shape?"geSprite geSprite-arrow":"arrow"==f.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");f.edges.length==f.cells.length?(u.style.display="",p.style.display="none"):(u.style.display="none",p.style.display="");Graph.lineJumpsEnabled&&0<f.edges.length&&0==f.vertices.length&&f.lineJumps&&(a.style.borderBottomStyle="none");b=g(mxUtils.getValue(f.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(f.style,"startFill","1"),E,"start");c=g(mxUtils.getValue(f.style,
+mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(f.style,"endFill","1"),G,"end");null!=b&&null!=c&&("arrow"==f.style.shape?(b.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==f.style.shape&&(b.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(z,"arrow"==f.style.shape?30:100);"connector"!=f.style.shape&&"flexArrow"!=f.style.shape&&"filledEdge"!=f.style.shape?(mxUtils.setOpacity(E,30),mxUtils.setOpacity(G,
+30)):(mxUtils.setOpacity(E,100),mxUtils.setOpacity(G,100));if(d||document.activeElement!=Y)b=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),Y.value=isNaN(b)?"":b+" pt";if(d||document.activeElement!=ba)b=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ba.value=isNaN(b)?"":b+" pt";if(d||document.activeElement!=O)b=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(b)?
+"":b+" pt";if(d||document.activeElement!=ba)b=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),L.value=isNaN(b)?"":b+" pt";if(d||document.activeElement!=S)b=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_PERIMETER_SPACING,0)),S.value=isNaN(b)?"":b+" pt"});P=this.installInputHandler(Y,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");J=this.installInputHandler(ba,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");K=this.installInputHandler(O,
+mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");I=this.installInputHandler(L,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");Q=this.installInputHandler(S,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(t,R);this.addKeyHandler(Y,R);this.addKeyHandler(ba,R);this.addKeyHandler(O,R);this.addKeyHandler(L,R);this.addKeyHandler(S,R);c.getModel().addListener(mxEvent.CHANGE,R);this.listeners.push({destroy:function(){c.getModel().removeListener(R)}});
R();return a};
-StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="2px 0px 24px 14px";var b=this.editorUi,e=b.editor.graph,d=document.createElement("div");d.style.position="absolute";d.style.maxWidth="82px";d.style.overflow="hidden";d.style.textOverflow="ellipsis";mxUtils.write(d,mxResources.get("lineJumps"));a.appendChild(d);var f=document.createElement("select");f.style.position=
-"absolute";f.style.height="21px";f.style.padding="0px";f.style.marginTop="-2px";f.style.boxSizing="border-box";f.style.right="76px";f.style.width="54px";f.style.border="1px solid rgb(160, 160, 160)";f.style.borderRadius="4px";for(var d=["none","arc","gap","sharp","line"],k=0;k<d.length;k++){var h=document.createElement("option");h.setAttribute("value",d[k]);mxUtils.write(h,mxResources.get(d[k]));f.appendChild(h)}mxEvent.addListener(f,"change",function(a){e.getModel().beginUpdate();try{e.setCellStyles("jumpStyle",
-f.value,c.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[f.value],"cells",c.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(f,"click",function(a){mxEvent.consume(a)});a.appendChild(f);var g,l=this.addUnitInput(a,"pt",16,42,function(){g.apply(this,arguments)});g=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();f.value=mxUtils.getValue(c.style,
-"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,m);e.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){e.getModel().removeListener(m)}});m()}else a.style.display="none";return a};
-StyleFormatPanel.prototype.addEffects=function(a){var c=this.editorUi.editor.graph,b=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var e=document.createElement("table");e.style.width="210px";e.style.fontWeight="bold";e.style.tableLayout="fixed";var d=document.createElement("tbody"),f=document.createElement("tr");f.style.padding="0px";var k=document.createElement("td");k.style.padding="0px";k.style.width="50%";k.setAttribute("valign","top");var h=k.cloneNode(!0);
-h.style.paddingLeft="8px";f.appendChild(k);f.appendChild(h);d.appendChild(f);e.appendChild(d);a.appendChild(e);var g=k,l=0,m=mxUtils.bind(this,function(a,b,c){a=this.createCellOption(a,b,c);a.style.width="100%";g.appendChild(a);g=g==k?h:k;l++}),n=mxUtils.bind(this,function(a,c,d){b=this.format.getSelectionState();k.innerHTML="";h.innerHTML="";g=k;b.rounded&&m(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==b.style.shape&&m(mxResources.get("divider"),"swimlaneLine",1);b.containsImage||
-m(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);b.glass&&m(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);m(mxResources.get("sketch"),"sketch",0)});c.getModel().addListener(mxEvent.CHANGE,n);this.listeners.push({destroy:function(){c.getModel().removeListener(n)}});n();return a};
-StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";var c=mxUtils.button(mxResources.get("setAsDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("setAsDefaultStyle").funct()}));c.setAttribute("title",mxResources.get("setAsDefaultStyle")+" ("+this.editorUi.actions.get("setAsDefaultStyle").shortcut+")");c.style.width="210px";a.appendChild(c);return a};DiagramStylePanel=function(a,c,b){BaseFormatPanel.call(this,a,c,b);this.init()};
+StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<b.edges.length&&0==b.vertices.length&&b.lineJumps){a.style.padding="2px 0px 24px 14px";var d=this.editorUi,e=d.editor.graph,c=document.createElement("div");c.style.position="absolute";c.style.maxWidth="82px";c.style.overflow="hidden";c.style.textOverflow="ellipsis";mxUtils.write(c,mxResources.get("lineJumps"));a.appendChild(c);var f=document.createElement("select");f.style.position=
+"absolute";f.style.height="21px";f.style.padding="0px";f.style.marginTop="-2px";f.style.boxSizing="border-box";f.style.right="76px";f.style.width="54px";f.style.border="1px solid rgb(160, 160, 160)";f.style.borderRadius="4px";for(var c=["none","arc","gap","sharp","line"],k=0;k<c.length;k++){var h=document.createElement("option");h.setAttribute("value",c[k]);mxUtils.write(h,mxResources.get(c[k]));f.appendChild(h)}mxEvent.addListener(f,"change",function(a){e.getModel().beginUpdate();try{e.setCellStyles("jumpStyle",
+f.value,b.cells),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[f.value],"cells",b.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(f,"click",function(a){mxEvent.consume(a)});a.appendChild(f);var g,l=this.addUnitInput(a,"pt",16,42,function(){g.apply(this,arguments)});g=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,c,d){b=this.format.getSelectionState();f.value=mxUtils.getValue(b.style,
+"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(b.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,m);e.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){e.getModel().removeListener(m)}});m()}else a.style.display="none";return a};
+StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi.editor.graph,d=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var e=document.createElement("table");e.style.width="210px";e.style.fontWeight="bold";e.style.tableLayout="fixed";var c=document.createElement("tbody"),f=document.createElement("tr");f.style.padding="0px";var k=document.createElement("td");k.style.padding="0px";k.style.width="50%";k.setAttribute("valign","top");var h=k.cloneNode(!0);
+h.style.paddingLeft="8px";f.appendChild(k);f.appendChild(h);c.appendChild(f);e.appendChild(c);a.appendChild(e);var g=k,l=0,m=mxUtils.bind(this,function(a,b,c){a=this.createCellOption(a,b,c);a.style.width="100%";g.appendChild(a);g=g==k?h:k;l++}),n=mxUtils.bind(this,function(a,b,c){d=this.format.getSelectionState();k.innerHTML="";h.innerHTML="";g=k;d.rounded&&m(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);"swimlane"==d.style.shape&&m(mxResources.get("divider"),"swimlaneLine",1);d.containsImage||
+m(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);d.glass&&m(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);m(mxResources.get("sketch"),"sketch",0)});b.getModel().addListener(mxEvent.CHANGE,n);this.listeners.push({destroy:function(){b.getModel().removeListener(n)}});n();return a};
+StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";var b=mxUtils.button(mxResources.get("setAsDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("setAsDefaultStyle").funct()}));b.setAttribute("title",mxResources.get("setAsDefaultStyle")+" ("+this.editorUi.actions.get("setAsDefaultStyle").shortcut+")");b.style.width="210px";a.appendChild(b);return a};DiagramStylePanel=function(a,b,d){BaseFormatPanel.call(this,a,b,d);this.init()};
mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){this.container.appendChild(this.addView(this.createPanel()))};
-DiagramStylePanel.prototype.addView=function(a){var c=this.editorUi,b=c.editor.graph,e=b.getModel();a.style.whiteSpace="normal";var d="1"==b.currentVertexStyle.sketch&&"1"==b.currentEdgeStyle.sketch,f="1"==b.currentVertexStyle.rounded,k="1"==b.currentEdgeStyle.curved,h=document.createElement("div");h.style.paddingBottom="12px";h.style.marginRight="16px";a.style.paddingTop="8px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";var l=document.createElement("tbody"),
-m=document.createElement("tr");m.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","middle");var p=n.cloneNode(!0);p.style.paddingLeft="8px";m.appendChild(n);m.appendChild(p);l.appendChild(m);g.appendChild(l);n.appendChild(this.createOption(mxResources.get("sketch"),function(){return d},function(a){(d=a)?(b.currentEdgeStyle.sketch="1",b.currentVertexStyle.sketch="1"):(delete b.currentEdgeStyle.sketch,delete b.currentVertexStyle.sketch);
-b.updateCellStyles("sketch",a?"1":null,b.getVerticesAndEdges())},null,function(a){a.style.width="auto"}));p.appendChild(this.createOption(mxResources.get("rounded"),function(){return f},function(a){(f=a)?b.currentVertexStyle.rounded="1":delete b.currentVertexStyle.rounded;b.updateCellStyles("rounded",a?"1":null,b.getVerticesAndEdges(!0,!0))},null,function(a){a.style.width="auto"}));n=n.cloneNode(!1);p=p.cloneNode(!1);m=m.cloneNode(!1);m.appendChild(n);m.appendChild(p);l.appendChild(m);n.appendChild(this.createOption(mxResources.get("curved"),
-function(){return k},function(a){(k=a)?b.currentEdgeStyle.curved="1":delete b.currentEdgeStyle.curved;b.updateCellStyles("curved",a?"1":null,b.getVerticesAndEdges(!1,!0))},null,function(a){a.style.width="auto"}));h.appendChild(g);a.appendChild(h);var q=["fillColor","strokeColor","fontColor","gradientColor"],t=mxUtils.bind(this,function(a,c){var d=b.getVerticesAndEdges();e.beginUpdate();try{for(var f=0;f<d.length;f++){var g=b.getCellStyle(d[f]);null!=g.labelBackgroundColor&&b.updateCellStyles("labelBackgroundColor",
-null!=c?c.background:null,[d[f]]);for(var k=e.isEdge(d[f]),h=e.getStyle(d[f]),l=k?b.currentEdgeStyle:b.currentVertexStyle,m=0;m<a.length;m++)if(null!=g[a[m]]&&g[a[m]]!=mxConstants.NONE||a[m]!=mxConstants.STYLE_FILLCOLOR&&a[m]!=mxConstants.STYLE_STROKECOLOR)h=mxUtils.setStyle(h,a[m],l[a[m]]);e.setStyle(d[f],h)}}finally{e.endUpdate()}}),v=mxUtils.bind(this,function(a,b,c){if(null!=a)for(var d=0;d<b.length;d++)if(null!=a[b[d]]&&a[b[d]]!=mxConstants.NONE||b[d]!=mxConstants.STYLE_FILLCOLOR&&b[d]!=mxConstants.STYLE_STROKECOLOR)a[b[d]]=
-c[b[d]]}),u=mxUtils.bind(this,function(a,c,d,e,f){if(null!=a){null!=d&&null!=c.labelBackgroundColor&&(e=null!=e?e.background:null,f=null!=f?f:b,null==e&&(e=f.background),null==e&&(e=f.defaultPageBackgroundColor),c.labelBackgroundColor=e);for(var g in a)if(null==d||null!=c[g]&&c[g]!=mxConstants.NONE||g!=mxConstants.STYLE_FILLCOLOR&&g!=mxConstants.STYLE_STROKECOLOR)c[g]=a[g]}}),n=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(a){a=b.getVerticesAndEdges(!0,!0);if(0<a.length){e.beginUpdate();
-try{b.updateCellStyles("sketch",null,a),b.updateCellStyles("rounded",null,a),b.updateCellStyles("curved",null,b.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}b.defaultVertexStyle=mxUtils.clone(c.initialDefaultVertexStyle);b.defaultEdgeStyle=mxUtils.clone(c.initialDefaultEdgeStyle);c.clearDefaultStyle()}));n.setAttribute("title",mxResources.get("reset"));n.style.textOverflow="ellipsis";n.style.maxWidth="90px";p.appendChild(n);var x=mxUtils.bind(this,function(a,c,d,f,g){var k=document.createElement("div");
-k.style.cssText="position:absolute;display:inline-block;width:100%;height:100%;overflow:hidden;pointer-events:none;";g.appendChild(k);var h=new Graph(k,null,null,b.getStylesheet());h.resetViewOnRootChange=!1;h.foldingEnabled=!1;h.gridEnabled=!1;h.autoScroll=!1;h.setTooltips(!1);h.setConnectable(!1);h.setPanning(!1);h.setEnabled(!1);h.getCellStyle=function(g){var k=mxUtils.clone(Graph.prototype.getCellStyle.apply(this,arguments)),l=b.stylesheet.getDefaultVertexStyle(),m=c;e.isEdge(g)&&(l=b.stylesheet.getDefaultEdgeStyle(),
-m=d);v(k,q,l);u(a,k,g,f,h);u(m,k,g,f,h);return k};h.model.beginUpdate();try{var l=h.insertVertex(h.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),m=h.insertEdge(h.getDefaultParent(),null,"Connector",l,l,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");m.geometry.points=[new mxPoint(32,70)];m.geometry.offset=new mxPoint(0,8)}finally{h.model.endUpdate()}}),w=document.createElement("div");w.style.position="relative";a.appendChild(w);null==
-this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var A=mxUtils.bind(this,function(a,g,h,l,m){var n=this.format.cachedStyleEntries[m];null==n&&(n=document.createElement("div"),n.style.display="inline-block",n.style.position="relative",n.style.width="96px",n.style.height="90px",n.style.cursor="pointer",n.style.border="1px solid gray",n.style.borderRadius="8px",n.style.margin="2px",n.style.overflow="hidden",null!=l&&null!=l.background&&(n.style.backgroundColor=l.background),x(a,g,
-h,l,n),mxEvent.addGestureListeners(n,mxUtils.bind(this,function(a){n.style.opacity=.5}),null,mxUtils.bind(this,function(m){n.style.opacity=1;b.defaultVertexStyle=mxUtils.clone(c.initialDefaultVertexStyle);b.defaultEdgeStyle=mxUtils.clone(c.initialDefaultEdgeStyle);u(a,b.defaultVertexStyle);u(a,b.defaultEdgeStyle);u(g,b.defaultVertexStyle);u(h,b.defaultEdgeStyle);c.clearDefaultStyle();d?(b.currentEdgeStyle.sketch="1",b.currentVertexStyle.sketch="1"):(b.currentEdgeStyle.sketch="0",b.currentVertexStyle.sketch=
-"0");b.currentVertexStyle.rounded=f?"1":"0";b.currentEdgeStyle.rounded="1";b.currentEdgeStyle.curved=k?"1":"0";e.beginUpdate();try{t(q,l);var p=new ChangePageSetup(c,null!=l?l.background:null);p.ignoreImage=!0;e.execute(p);e.execute(new ChangeGridColor(c,null!=l&&null!=l.gridColor?l.gridColor:b.view.defaultGridColor))}finally{e.endUpdate()}})),mxEvent.addListener(n,"mouseenter",mxUtils.bind(this,function(c){var d=b.getCellStyle;c=b.background;var f=b.view.gridColor;b.background=null!=l?l.background:
-null;b.view.gridColor=null!=l&&null!=l.gridColor?l.gridColor:b.view.defaultGridColor;b.getCellStyle=function(c){var f=mxUtils.clone(d.apply(this,arguments)),k=b.stylesheet.getDefaultVertexStyle(),m=g;e.isEdge(c)&&(k=b.stylesheet.getDefaultEdgeStyle(),m=h);v(f,q,k);u(a,f,c,l);u(m,f,c,l);return f};b.refresh();b.getCellStyle=d;b.background=c;b.view.gridColor=f})),mxEvent.addListener(n,"mouseleave",mxUtils.bind(this,function(a){b.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[m]=
-n));w.appendChild(n)}),E=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var H=[],D=mxUtils.bind(this,function(){0<H.length&&(H[this.format.currentStylePage].style.background="#84d7ff");for(var a=10*this.format.currentStylePage;a<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);a++){var b=Editor.styles[a];A(b.commonStyle,b.vertexStyle,b.edgeStyle,b.graph,a)}}),F=mxUtils.bind(this,function(a){0<=a&&
-a<E&&(H[this.format.currentStylePage].style.background="transparent",w.innerHTML="",this.format.currentStylePage=a,D())});if(1<E){h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.position="relative";h.style.textAlign="center";h.style.paddingTop="4px";h.style.width="210px";a.style.paddingBottom="8px";for(p=0;p<E;p++){var z=document.createElement("div");z.style.display="inline-block";z.style.width="6px";z.style.height="6px";z.style.marginLeft="4px";z.style.marginRight="3px";z.style.borderRadius=
-"3px";z.style.cursor="pointer";z.style.background="transparent";z.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a,b){mxEvent.addListener(z,"click",mxUtils.bind(this,function(){F(a)}))})(p,z);h.appendChild(z);H.push(z)}a.appendChild(h);D();15>E&&(g=function(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})},n=document.createElement("div"),n.style.position="absolute",n.style.left="0px",n.style.top=
+DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,d=b.editor.graph,e=d.getModel();a.style.whiteSpace="normal";var c="1"==d.currentVertexStyle.sketch&&"1"==d.currentEdgeStyle.sketch,f="1"==d.currentVertexStyle.rounded,k="1"==d.currentEdgeStyle.curved,h=document.createElement("div");h.style.paddingBottom="12px";h.style.marginRight="16px";a.style.paddingTop="8px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";var l=document.createElement("tbody"),
+m=document.createElement("tr");m.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","middle");var p=n.cloneNode(!0);p.style.paddingLeft="8px";m.appendChild(n);m.appendChild(p);l.appendChild(m);g.appendChild(l);n.appendChild(this.createOption(mxResources.get("sketch"),function(){return c},function(a){(c=a)?(d.currentEdgeStyle.sketch="1",d.currentVertexStyle.sketch="1"):(delete d.currentEdgeStyle.sketch,delete d.currentVertexStyle.sketch);
+d.updateCellStyles("sketch",a?"1":null,d.getVerticesAndEdges())},null,function(a){a.style.width="auto"}));p.appendChild(this.createOption(mxResources.get("rounded"),function(){return f},function(a){(f=a)?d.currentVertexStyle.rounded="1":delete d.currentVertexStyle.rounded;d.updateCellStyles("rounded",a?"1":null,d.getVerticesAndEdges(!0,!0))},null,function(a){a.style.width="auto"}));n=n.cloneNode(!1);p=p.cloneNode(!1);m=m.cloneNode(!1);m.appendChild(n);m.appendChild(p);l.appendChild(m);n.appendChild(this.createOption(mxResources.get("curved"),
+function(){return k},function(a){(k=a)?d.currentEdgeStyle.curved="1":delete d.currentEdgeStyle.curved;d.updateCellStyles("curved",a?"1":null,d.getVerticesAndEdges(!1,!0))},null,function(a){a.style.width="auto"}));h.appendChild(g);a.appendChild(h);var q=["fillColor","strokeColor","fontColor","gradientColor"],u=mxUtils.bind(this,function(a,b){var c=d.getVerticesAndEdges();e.beginUpdate();try{for(var f=0;f<c.length;f++){var g=d.getCellStyle(c[f]);null!=g.labelBackgroundColor&&d.updateCellStyles("labelBackgroundColor",
+null!=b?b.background:null,[c[f]]);for(var k=e.isEdge(c[f]),h=e.getStyle(c[f]),l=k?d.currentEdgeStyle:d.currentVertexStyle,m=0;m<a.length;m++)if(null!=g[a[m]]&&g[a[m]]!=mxConstants.NONE||a[m]!=mxConstants.STYLE_FILLCOLOR&&a[m]!=mxConstants.STYLE_STROKECOLOR)h=mxUtils.setStyle(h,a[m],l[a[m]]);e.setStyle(c[f],h)}}finally{e.endUpdate()}}),v=mxUtils.bind(this,function(a,b,c){if(null!=a)for(var d=0;d<b.length;d++)if(null!=a[b[d]]&&a[b[d]]!=mxConstants.NONE||b[d]!=mxConstants.STYLE_FILLCOLOR&&b[d]!=mxConstants.STYLE_STROKECOLOR)a[b[d]]=
+c[b[d]]}),t=mxUtils.bind(this,function(a,b,c,e,f){if(null!=a){null!=c&&null!=b.labelBackgroundColor&&(e=null!=e?e.background:null,f=null!=f?f:d,null==e&&(e=f.background),null==e&&(e=f.defaultPageBackgroundColor),b.labelBackgroundColor=e);for(var g in a)if(null==c||null!=b[g]&&b[g]!=mxConstants.NONE||g!=mxConstants.STYLE_FILLCOLOR&&g!=mxConstants.STYLE_STROKECOLOR)b[g]=a[g]}}),n=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(a){a=d.getVerticesAndEdges(!0,!0);if(0<a.length){e.beginUpdate();
+try{d.updateCellStyles("sketch",null,a),d.updateCellStyles("rounded",null,a),d.updateCellStyles("curved",null,d.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}d.defaultVertexStyle=mxUtils.clone(b.initialDefaultVertexStyle);d.defaultEdgeStyle=mxUtils.clone(b.initialDefaultEdgeStyle);b.clearDefaultStyle()}));n.setAttribute("title",mxResources.get("reset"));n.style.textOverflow="ellipsis";n.style.maxWidth="90px";p.appendChild(n);var x=mxUtils.bind(this,function(a,b,c,f,g){var k=document.createElement("div");
+k.style.cssText="position:absolute;display:inline-block;width:100%;height:100%;overflow:hidden;pointer-events:none;";g.appendChild(k);var h=new Graph(k,null,null,d.getStylesheet());h.resetViewOnRootChange=!1;h.foldingEnabled=!1;h.gridEnabled=!1;h.autoScroll=!1;h.setTooltips(!1);h.setConnectable(!1);h.setPanning(!1);h.setEnabled(!1);h.getCellStyle=function(g){var k=mxUtils.clone(Graph.prototype.getCellStyle.apply(this,arguments)),l=d.stylesheet.getDefaultVertexStyle(),m=b;e.isEdge(g)&&(l=d.stylesheet.getDefaultEdgeStyle(),
+m=c);v(k,q,l);t(a,k,g,f,h);t(m,k,g,f,h);return k};h.model.beginUpdate();try{var l=h.insertVertex(h.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),m=h.insertEdge(h.getDefaultParent(),null,"Connector",l,l,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");m.geometry.points=[new mxPoint(32,70)];m.geometry.offset=new mxPoint(0,8)}finally{h.model.endUpdate()}}),w=document.createElement("div");w.style.position="relative";a.appendChild(w);null==
+this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var z=mxUtils.bind(this,function(a,g,h,l,m){var n=this.format.cachedStyleEntries[m];null==n&&(n=document.createElement("div"),n.style.display="inline-block",n.style.position="relative",n.style.width="96px",n.style.height="90px",n.style.cursor="pointer",n.style.border="1px solid gray",n.style.borderRadius="8px",n.style.margin="2px",n.style.overflow="hidden",null!=l&&null!=l.background&&(n.style.backgroundColor=l.background),x(a,g,
+h,l,n),mxEvent.addGestureListeners(n,mxUtils.bind(this,function(a){n.style.opacity=.5}),null,mxUtils.bind(this,function(m){n.style.opacity=1;d.defaultVertexStyle=mxUtils.clone(b.initialDefaultVertexStyle);d.defaultEdgeStyle=mxUtils.clone(b.initialDefaultEdgeStyle);t(a,d.defaultVertexStyle);t(a,d.defaultEdgeStyle);t(g,d.defaultVertexStyle);t(h,d.defaultEdgeStyle);b.clearDefaultStyle();c?(d.currentEdgeStyle.sketch="1",d.currentVertexStyle.sketch="1"):(d.currentEdgeStyle.sketch="0",d.currentVertexStyle.sketch=
+"0");d.currentVertexStyle.rounded=f?"1":"0";d.currentEdgeStyle.rounded="1";d.currentEdgeStyle.curved=k?"1":"0";e.beginUpdate();try{u(q,l);var p=new ChangePageSetup(b,null!=l?l.background:null);p.ignoreImage=!0;e.execute(p);e.execute(new ChangeGridColor(b,null!=l&&null!=l.gridColor?l.gridColor:d.view.defaultGridColor))}finally{e.endUpdate()}})),mxEvent.addListener(n,"mouseenter",mxUtils.bind(this,function(b){var c=d.getCellStyle;b=d.background;var f=d.view.gridColor;d.background=null!=l?l.background:
+null;d.view.gridColor=null!=l&&null!=l.gridColor?l.gridColor:d.view.defaultGridColor;d.getCellStyle=function(b){var f=mxUtils.clone(c.apply(this,arguments)),k=d.stylesheet.getDefaultVertexStyle(),m=g;e.isEdge(b)&&(k=d.stylesheet.getDefaultEdgeStyle(),m=h);v(f,q,k);t(a,f,b,l);t(m,f,b,l);return f};d.refresh();d.getCellStyle=c;d.background=b;d.view.gridColor=f})),mxEvent.addListener(n,"mouseleave",mxUtils.bind(this,function(a){d.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[m]=
+n));w.appendChild(n)}),E=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var G=[],D=mxUtils.bind(this,function(){0<G.length&&(G[this.format.currentStylePage].style.background="#84d7ff");for(var a=10*this.format.currentStylePage;a<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);a++){var b=Editor.styles[a];z(b.commonStyle,b.vertexStyle,b.edgeStyle,b.graph,a)}}),F=mxUtils.bind(this,function(a){0<=a&&
+a<E&&(G[this.format.currentStylePage].style.background="transparent",w.innerHTML="",this.format.currentStylePage=a,D())});if(1<E){h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.position="relative";h.style.textAlign="center";h.style.paddingTop="4px";h.style.width="210px";a.style.paddingBottom="8px";for(p=0;p<E;p++){var y=document.createElement("div");y.style.display="inline-block";y.style.width="6px";y.style.height="6px";y.style.marginLeft="4px";y.style.marginRight="3px";y.style.borderRadius=
+"3px";y.style.cursor="pointer";y.style.background="transparent";y.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(a,b){mxEvent.addListener(y,"click",mxUtils.bind(this,function(){F(a)}))})(p,y);h.appendChild(y);G.push(y)}a.appendChild(h);D();15>E&&(g=function(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})},n=document.createElement("div"),n.style.position="absolute",n.style.left="0px",n.style.top=
"0px",n.style.bottom="0px",n.style.width="24px",n.style.height="24px",n.style.margin="0px",n.style.cursor="pointer",n.style.opacity="0.5",n.style.backgroundRepeat="no-repeat",n.style.backgroundPosition="center center",n.style.backgroundSize="24px 24px",n.style.backgroundImage="url("+Editor.previousImage+")",Editor.isDarkMode()&&(n.style.filter="invert(100%)"),p=n.cloneNode(!1),p.style.backgroundImage="url("+Editor.nextImage+")",p.style.left="",p.style.right="2px",h.appendChild(n),h.appendChild(p),
-mxEvent.addListener(n,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage-1,E))})),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage+1,E))})),g(n),g(p))}else D();return a};DiagramFormatPanel=function(a,c,b){BaseFormatPanel.call(this,a,c,b);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
+mxEvent.addListener(n,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage-1,E))})),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){F(mxUtils.mod(this.format.currentStylePage+1,E))})),g(n),g(p))}else D();return a};DiagramFormatPanel=function(a,b,d){BaseFormatPanel.call(this,a,b,d);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
-DiagramFormatPanel.prototype.addView=function(a){var c=this.editorUi,b=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return b.pageVisible},function(a){c.actions.get("pageView").funct()},{install:function(a){this.listener=function(){a(b.pageVisible)};c.addListener("pageViewChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}}));
-if(b.isEnabled()){var e=this.createColorOption(mxResources.get("background"),function(){return b.background},function(a){a=new ChangePageSetup(c,a);a.ignoreImage=!0;b.model.execute(a)},"#ffffff",{install:function(a){this.listener=function(){a(b.background)};c.addListener("backgroundColorChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});if(this.showBackgroundImageOption){var d=e.getElementsByTagName("span")[0];d.style.display="inline-block";d.style.textOverflow="ellipsis";
-d.style.overflow="hidden";d.style.maxWidth="68px";mxClient.IS_FF&&(d.style.marginTop="1px");d=mxUtils.button(mxResources.get("change"),function(a){c.showBackgroundImageDialog(null,c.editor.graph.backgroundImage);mxEvent.consume(a)});d.className="geColorBtn";d.style.position="absolute";d.style.marginTop="-3px";d.style.height="22px";d.style.left="118px";d.style.width="56px";e.appendChild(d)}a.appendChild(e)}return a};
-DiagramFormatPanel.prototype.addOptions=function(a){var c=this.editorUi,b=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));b.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return b.connectionArrowsEnabled},function(a){c.actions.get("connectionArrows").funct()},{install:function(a){this.listener=function(){a(b.connectionArrowsEnabled)};c.addListener("connectionArrowsChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})),
-a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return b.connectionHandler.isEnabled()},function(a){c.actions.get("connectionPoints").funct()},{install:function(a){this.listener=function(){a(b.connectionHandler.isEnabled())};c.addListener("connectionPointsChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return b.graphHandler.guidesEnabled},function(a){c.actions.get("guides").funct()},
-{install:function(a){this.listener=function(){a(b.graphHandler.guidesEnabled)};c.addListener("guidesEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}})));return a};
-DiagramFormatPanel.prototype.addGridOption=function(a){function c(a){var c=b.isFloatUnit()?parseFloat(f.value):parseInt(f.value),c=b.fromUnit(Math.max(b.inUnit(1),isNaN(c)?b.inUnit(10):c));c!=d.getGridSize()&&d.setGridSize(c);f.value=b.inUnit(c)+" "+b.getUnit();mxEvent.consume(a)}var b=this,e=this.editorUi,d=e.editor.graph,f=document.createElement("input");f.style.position="absolute";f.style.textAlign="right";f.style.width="48px";f.style.marginTop="-2px";f.style.height="21px";f.style.border="1px solid rgb(160, 160, 160)";
-f.style.borderRadius="4px";f.style.boxSizing="border-box";f.value=this.inUnit(d.getGridSize())+" "+this.getUnit();var k=this.createStepper(f,c,this.getUnitStep(),null,null,null,this.isFloatUnit());f.style.display=d.isGridEnabled()?"":"none";k.style.display=f.style.display;mxEvent.addListener(f,"keydown",function(a){13==a.keyCode?(d.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(f.value=d.getGridSize(),d.container.focus(),mxEvent.consume(a))});mxEvent.addListener(f,"blur",c);mxEvent.addListener(f,
-"change",c);f.style.right="78px";k.style.marginTop="-17px";k.style.right="66px";var h=this.createColorOption(mxResources.get("grid"),function(){var a=d.view.gridColor;return d.isGridEnabled()?a:null},function(a){var b=d.isGridEnabled();a==mxConstants.NONE?d.setGridEnabled(!1):(d.setGridEnabled(!0),e.setGridColor(a));f.style.display=d.isGridEnabled()?"":"none";k.style.display=f.style.display;b!=d.isGridEnabled()&&e.fireEvent(new mxEventObject("gridEnabledChanged"))},Editor.isDarkMode()?d.view.defaultDarkGridColor:
-d.view.defaultGridColor,{install:function(a){this.listener=function(){a(d.isGridEnabled()?d.view.gridColor:null)};e.addListener("gridColorChanged",this.listener);e.addListener("gridEnabledChanged",this.listener)},destroy:function(){e.removeListener(this.listener)}});h.appendChild(f);h.appendChild(k);a.appendChild(h)};DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(this.createTitle(mxResources.get("options")));return a};
-DiagramFormatPanel.prototype.addPaperSize=function(a){var c=this.editorUi,b=c.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var e=PageSetupDialog.addPageFormatPanel(a,"formatpanel",b.pageFormat,function(a){if(null==b.pageFormat||b.pageFormat.width!=a.width||b.pageFormat.height!=a.height)a=new ChangePageSetup(c,null,null,a),a.ignoreColor=!0,a.ignoreImage=!0,b.model.execute(a)});this.addKeyHandler(e.widthInput,function(){e.set(b.pageFormat)});this.addKeyHandler(e.heightInput,
-function(){e.set(b.pageFormat)});var d=function(){e.set(b.pageFormat)};c.addListener("pageFormatChanged",d);this.listeners.push({destroy:function(){c.removeListener(d)}});b.getModel().addListener(mxEvent.CHANGE,d);this.listeners.push({destroy:function(){b.getModel().removeListener(d)}});return a};
-DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()}));c.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")");c.style.width="210px";c.style.marginBottom="2px";a.appendChild(c);mxUtils.br(a);c=mxUtils.button(mxResources.get("clearDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearDefaultStyle").funct()}));
-c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="210px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function h(){mxCylinder.call(this)}function g(){mxShape.call(this)}function l(){mxShape.call(this)}function m(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}function n(){mxActor.call(this)}function p(){mxCylinder.call(this)}
-function q(){mxCylinder.call(this)}function t(){mxActor.call(this)}function v(){mxActor.call(this)}function u(){mxActor.call(this)}function x(){mxActor.call(this)}function w(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxActor.call(this)}function H(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,H.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
-this.canvas.moveTo=mxUtils.bind(this,H.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,H.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,H.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,H.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,H.prototype.arcTo)}function D(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}
-function z(){mxActor.call(this)}function I(){mxActor.call(this)}function K(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function P(){mxShape.call(this)}function aa(){mxShape.call(this)}function X(){mxEllipse.call(this)}function Q(){mxShape.call(this)}function S(){mxShape.call(this)}function R(){mxRectangleShape.call(this)}function U(){mxShape.call(this)}function da(){mxShape.call(this)}function ja(){mxShape.call(this)}
-function na(){mxShape.call(this)}function oa(){mxShape.call(this)}function ea(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function ta(){mxRectangleShape.call(this)}function qa(){mxDoubleEllipse.call(this)}function ua(){mxDoubleEllipse.call(this)}function ka(){mxArrowConnector.call(this);this.spacing=0}function ga(){mxArrowConnector.call(this);this.spacing=0}function ha(){mxActor.call(this)}function ba(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function ma(){mxActor.call(this)}
-function ia(){mxActor.call(this)}function W(){mxActor.call(this)}function ra(){mxActor.call(this)}function Y(){mxActor.call(this)}function M(){mxActor.call(this)}function Z(){mxActor.call(this)}function V(){mxActor.call(this)}function ca(){mxActor.call(this)}function la(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ma(){mxRhombus.call(this)}function Na(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}
-function Ga(){mxEllipse.call(this)}function Ha(){mxActor.call(this)}function ya(){mxActor.call(this)}function za(){mxActor.call(this)}function N(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function wa(){mxConnector.call(this)}function Sa(a,b,c,d,e,f,g,k,h,l){g+=h;var r=d.clone();d.x-=e*(2*g+h);d.y-=f*(2*g+h);e*=g+h;f*=g+h;return function(){a.ellipse(r.x-
+DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,d=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return d.pageVisible},function(a){b.actions.get("pageView").funct()},{install:function(a){this.listener=function(){a(d.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
+if(d.isEnabled()){var e=this.createColorOption(mxResources.get("background"),function(){return d.background},function(a){a=new ChangePageSetup(b,a);a.ignoreImage=!0;d.model.execute(a)},"#ffffff",{install:function(a){this.listener=function(){a(d.background)};b.addListener("backgroundColorChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});if(this.showBackgroundImageOption){var c=e.getElementsByTagName("span")[0];c.style.display="inline-block";c.style.textOverflow="ellipsis";
+c.style.overflow="hidden";c.style.maxWidth="68px";mxClient.IS_FF&&(c.style.marginTop="1px");c=mxUtils.button(mxResources.get("change"),function(a){b.showBackgroundImageDialog(null,b.editor.graph.backgroundImage);mxEvent.consume(a)});c.className="geColorBtn";c.style.position="absolute";c.style.marginTop="-3px";c.style.height="22px";c.style.left="118px";c.style.width="56px";e.appendChild(c)}a.appendChild(e)}return a};
+DiagramFormatPanel.prototype.addOptions=function(a){var b=this.editorUi,d=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));d.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return d.connectionArrowsEnabled},function(a){b.actions.get("connectionArrows").funct()},{install:function(a){this.listener=function(){a(d.connectionArrowsEnabled)};b.addListener("connectionArrowsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),
+a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return d.connectionHandler.isEnabled()},function(a){b.actions.get("connectionPoints").funct()},{install:function(a){this.listener=function(){a(d.connectionHandler.isEnabled())};b.addListener("connectionPointsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return d.graphHandler.guidesEnabled},function(a){b.actions.get("guides").funct()},
+{install:function(a){this.listener=function(){a(d.graphHandler.guidesEnabled)};b.addListener("guidesEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})));return a};
+DiagramFormatPanel.prototype.addGridOption=function(a){function b(a){var b=d.isFloatUnit()?parseFloat(f.value):parseInt(f.value),b=d.fromUnit(Math.max(d.inUnit(1),isNaN(b)?d.inUnit(10):b));b!=c.getGridSize()&&c.setGridSize(b);f.value=d.inUnit(b)+" "+d.getUnit();mxEvent.consume(a)}var d=this,e=this.editorUi,c=e.editor.graph,f=document.createElement("input");f.style.position="absolute";f.style.textAlign="right";f.style.width="48px";f.style.marginTop="-2px";f.style.height="21px";f.style.border="1px solid rgb(160, 160, 160)";
+f.style.borderRadius="4px";f.style.boxSizing="border-box";f.value=this.inUnit(c.getGridSize())+" "+this.getUnit();var k=this.createStepper(f,b,this.getUnitStep(),null,null,null,this.isFloatUnit());f.style.display=c.isGridEnabled()?"":"none";k.style.display=f.style.display;mxEvent.addListener(f,"keydown",function(a){13==a.keyCode?(c.container.focus(),mxEvent.consume(a)):27==a.keyCode&&(f.value=c.getGridSize(),c.container.focus(),mxEvent.consume(a))});mxEvent.addListener(f,"blur",b);mxEvent.addListener(f,
+"change",b);f.style.right="78px";k.style.marginTop="-17px";k.style.right="66px";var h=this.createColorOption(mxResources.get("grid"),function(){var a=c.view.gridColor;return c.isGridEnabled()?a:null},function(a){var b=c.isGridEnabled();a==mxConstants.NONE?c.setGridEnabled(!1):(c.setGridEnabled(!0),e.setGridColor(a));f.style.display=c.isGridEnabled()?"":"none";k.style.display=f.style.display;b!=c.isGridEnabled()&&e.fireEvent(new mxEventObject("gridEnabledChanged"))},Editor.isDarkMode()?c.view.defaultDarkGridColor:
+c.view.defaultGridColor,{install:function(a){this.listener=function(){a(c.isGridEnabled()?c.view.gridColor:null)};e.addListener("gridColorChanged",this.listener);e.addListener("gridEnabledChanged",this.listener)},destroy:function(){e.removeListener(this.listener)}});h.appendChild(f);h.appendChild(k);a.appendChild(h)};DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(this.createTitle(mxResources.get("options")));return a};
+DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,d=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var e=PageSetupDialog.addPageFormatPanel(a,"formatpanel",d.pageFormat,function(a){if(null==d.pageFormat||d.pageFormat.width!=a.width||d.pageFormat.height!=a.height)a=new ChangePageSetup(b,null,null,a),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a)});this.addKeyHandler(e.widthInput,function(){e.set(d.pageFormat)});this.addKeyHandler(e.heightInput,
+function(){e.set(d.pageFormat)});var c=function(){e.set(d.pageFormat)};b.addListener("pageFormatChanged",c);this.listeners.push({destroy:function(){b.removeListener(c)}});d.getModel().addListener(mxEvent.CHANGE,c);this.listeners.push({destroy:function(){d.getModel().removeListener(c)}});return a};
+DiagramFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("editData"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editData").funct()}));b.setAttribute("title",mxResources.get("editData")+" ("+this.editorUi.actions.get("editData").shortcut+")");b.style.width="210px";b.style.marginBottom="2px";a.appendChild(b);mxUtils.br(a);b=mxUtils.button(mxResources.get("clearDefaultStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("clearDefaultStyle").funct()}));
+b.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");b.style.width="210px";a.appendChild(b);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxSwimlane.call(this)}function b(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function e(){mxActor.call(this)}function c(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function h(){mxCylinder.call(this)}function g(){mxShape.call(this)}function l(){mxShape.call(this)}function m(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}function n(){mxActor.call(this)}function p(){mxCylinder.call(this)}
+function q(){mxCylinder.call(this)}function u(){mxActor.call(this)}function v(){mxActor.call(this)}function t(){mxActor.call(this)}function x(){mxActor.call(this)}function w(){mxActor.call(this)}function z(){mxActor.call(this)}function E(){mxActor.call(this)}function G(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,G.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
+this.canvas.moveTo=mxUtils.bind(this,G.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,G.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,G.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,G.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,G.prototype.arcTo)}function D(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}
+function y(){mxActor.call(this)}function I(){mxActor.call(this)}function K(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function J(){mxCylinder.call(this)}function P(){mxShape.call(this)}function ba(){mxShape.call(this)}function Y(){mxEllipse.call(this)}function Q(){mxShape.call(this)}function S(){mxShape.call(this)}function R(){mxRectangleShape.call(this)}function U(){mxShape.call(this)}function da(){mxShape.call(this)}function ja(){mxShape.call(this)}
+function na(){mxShape.call(this)}function oa(){mxShape.call(this)}function ea(){mxCylinder.call(this)}function pa(){mxCylinder.call(this)}function ta(){mxRectangleShape.call(this)}function qa(){mxDoubleEllipse.call(this)}function ua(){mxDoubleEllipse.call(this)}function ka(){mxArrowConnector.call(this);this.spacing=0}function ga(){mxArrowConnector.call(this);this.spacing=0}function ha(){mxActor.call(this)}function ca(){mxRectangleShape.call(this)}function fa(){mxActor.call(this)}function ma(){mxActor.call(this)}
+function ia(){mxActor.call(this)}function X(){mxActor.call(this)}function ra(){mxActor.call(this)}function Z(){mxActor.call(this)}function N(){mxActor.call(this)}function aa(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function la(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Ba(){mxEllipse.call(this)}function Ma(){mxRhombus.call(this)}function Na(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}
+function Ga(){mxEllipse.call(this)}function Ha(){mxActor.call(this)}function ya(){mxActor.call(this)}function za(){mxActor.call(this)}function M(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function wa(){mxConnector.call(this)}function Sa(a,b,c,d,e,f,g,k,h,l){g+=h;var r=d.clone();d.x-=e*(2*g+h);d.y-=f*(2*g+h);e*=g+h;f*=g+h;return function(){a.ellipse(r.x-
e-g,r.y-f-g,2*g,2*g);l?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,c,d,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),a.translate(-b,-c));this.paintForeground(a,
b,c,d,e)};a.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.state){var r=this.flipH,f=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var g=r,r=f,f=g;a.rotate(-this.getShapeRotation(),r,f,b+d/2,c+e/2);s=this.scale;b=this.bounds.x/s;c=this.bounds.y/s;d=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(a,b,c,d,e)}};a.prototype.paintTableForeground=function(a,b,c,d,e){var r=this.state.view.graph,f=r.getActualStartSize(this.state.cell),
-g=r.model.getChildCells(this.state.cell,!0);if(0<g.length){var y="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),C="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),k=r.getCellGeometry(g[0]),h=[{y:null!=k?k.y+k.height:0,cells:r.model.getChildCells(g[0],!0)}];if(y)for(y=1;y<g.length;y++){var k=r.getCellGeometry(g[y]),G={y:0,cells:r.model.getChildCells(g[y],!0)};h.push(G);null!=k&&(G.y=k.y+k.height,a.begin(),a.moveTo(b+f.x,c+k.y),a.lineTo(b+d-f.width,c+k.y),a.end(),a.stroke())}if(C)for(d=
-r.model.getChildCells(g[0],!0),y=1;y<d.length;y++)if(k=r.getCellGeometry(d[y]),null!=k){a.begin();a.moveTo(b+k.x+f.x,c+f.y);for(C=g=0;C<h.length;C++)G=h[C],null!=G&&(r.model.isVisible(G.cells[y])?g=G.y:(0<g&&a.lineTo(b+k.x+f.x,c+g-f.height),a.moveTo(b+k.x+f.x,c+G.y),g=0));a.lineTo(b+k.x+f.x,c+e-f.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,
+g=r.model.getChildCells(this.state.cell,!0);if(0<g.length){var C="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),B="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),k=r.getCellGeometry(g[0]),h=[{y:null!=k?k.y+k.height:0,cells:r.model.getChildCells(g[0],!0)}];if(C)for(C=1;C<g.length;C++){var k=r.getCellGeometry(g[C]),H={y:0,cells:r.model.getChildCells(g[C],!0)};h.push(H);null!=k&&(H.y=k.y+k.height,a.begin(),a.moveTo(b+f.x,c+k.y),a.lineTo(b+d-f.width,c+k.y),a.end(),a.stroke())}if(B)for(d=
+r.model.getChildCells(g[0],!0),C=1;C<d.length;C++)if(k=r.getCellGeometry(d[C]),null!=k){a.begin();a.moveTo(b+k.x+f.x,c+f.y);for(B=g=0;B<h.length;B++)H=h[B],null!=H&&(r.model.isVisible(H.cells[C])?g=H.y:(0<g&&a.lineTo(b+k.x+f.x,c+g-f.height),a.moveTo(b+k.x+f.x,c+H.y),g=0));a.lineTo(b+k.x+f.x,c+e-f.height);a.end();a.stroke()}}};mxCellRenderer.registerShape("table",a);mxUtils.extend(b,mxCylinder);b.prototype.size=20;b.prototype.darkOpacity=0;b.prototype.darkOpacity2=0;b.prototype.paintVertexShape=function(a,
b,c,d,e){var r=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-r,0);a.lineTo(d,r);a.lineTo(d,e);a.lineTo(r,e);a.lineTo(0,e-r);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),
-0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-r,0),a.lineTo(d,r),a.lineTo(r,r),a.close(),a.fill()),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(r,r),a.lineTo(r,e),a.lineTo(0,e-r),a.close(),a.fill()),a.begin(),a.moveTo(r,e),a.lineTo(r,r),a.lineTo(0,0),a.moveTo(r,r),a.lineTo(d,r),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 Pa=Math.tan(mxUtils.toRadians(30)),xa=(.5-Pa)/2;mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(b,mxCylinder);b.prototype.size=6;b.prototype.paintVertexShape=function(a,b,c,d,e){a.setFillColor(this.stroke);var r=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;a.ellipse(b+.5*(d-r),
-c+.5*(e-r),r,r);a.fill();a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};mxCellRenderer.registerShape("waypoint",b);mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Pa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*xa);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-xa)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=
-function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Pa));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-xa)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-xa)*b),a.lineTo(.5*b,(1-xa)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*xa),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-xa)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(f,mxCylinder);f.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=
+0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-r,0),a.lineTo(d,r),a.lineTo(r,r),a.close(),a.fill()),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(r,r),a.lineTo(r,e),a.lineTo(0,e-r),a.close(),a.fill()),a.begin(),a.moveTo(r,e),a.lineTo(r,r),a.lineTo(0,0),a.moveTo(r,r),a.lineTo(d,r),a.end(),a.stroke())};b.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",b);var Pa=Math.tan(mxUtils.toRadians(30)),xa=(.5-Pa)/2;mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(d,mxCylinder);d.prototype.size=6;d.prototype.paintVertexShape=function(a,b,c,d,e){a.setFillColor(this.stroke);var r=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;a.ellipse(b+.5*(d-r),
+c+.5*(e-r),r,r);a.fill();a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};mxCellRenderer.registerShape("waypoint",d);mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/Pa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*xa);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-xa)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.redrawPath=
+function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Pa));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-xa)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-xa)*b),a.lineTo(.5*b,(1-xa)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*xa),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-xa)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",c);mxUtils.extend(f,mxCylinder);f.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=
this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};f.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",f);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=0;k.prototype.paintVertexShape=function(a,b,c,d,e){var r=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),f=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-r,0);a.lineTo(d,r);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,
0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=f&&(a.setFillAlpha(Math.abs(f)),a.setFillColor(0>f?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-r,0),a.lineTo(d-r,r),a.lineTo(d,r),a.close(),a.fill()),a.begin(),a.moveTo(d-r,0),a.lineTo(d-r,r),a.lineTo(d,r),a.end(),a.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(h,k);mxCellRenderer.registerShape("note2",h);h.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,
@@ -3244,46 +3247,46 @@ a.begin();a.moveTo(0,r);a.lineTo(.5*d,2*r);a.lineTo(d,r);a.moveTo(.5*d,2*r);a.li
r,0,0,1,.5*d,e),a.arcTo(.5*d,r,0,0,1,0,e-r),a.close(),a.fillAndStroke(),a.setShadow(!1),a.begin(),a.moveTo(d,r),a.arcTo(.5*d,r,0,0,1,.5*d,2*r),a.arcTo(.5*d,r,0,0,1,0,r),a.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(a,b,c,d,e){var r=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=mxUtils.getValue(this.style,"lid",!0);a.translate(b,c);0==r?(a.rect(0,0,d,e),a.fillAndStroke()):
(a.begin(),f?(a.moveTo(0,r),a.arcTo(.5*d,r,0,0,1,.5*d,0),a.arcTo(.5*d,r,0,0,1,d,r)):(a.moveTo(0,0),a.arcTo(.5*d,r,0,0,0,.5*d,r),a.arcTo(.5*d,r,0,0,0,d,0)),a.lineTo(d,e-r),a.arcTo(.5*d,r,0,0,1,.5*d,e),a.arcTo(.5*d,r,0,0,1,0,e-r),a.close(),a.fillAndStroke(),a.setShadow(!1),f&&(a.begin(),a.moveTo(d,r),a.arcTo(.5*d,r,0,0,1,.5*d,2*r),a.arcTo(.5*d,r,0,0,1,0,r),a.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(n,mxActor);n.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/
2,.5*e,d,0);a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",n);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.arcSize=.1;p.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
-var r=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),f=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g||(y*=Math.min(d,e));y=Math.min(y,.5*d,.5*(e-c));b=Math.max(b,y);b=Math.min(d-y,b);f||(y=0);a.begin();"left"==r?(a.moveTo(Math.max(y,0),c),a.lineTo(Math.max(y,0),0),a.lineTo(b,0),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d-Math.max(y,0),0),a.lineTo(d-Math.max(y,
-0),c));f?(a.moveTo(0,y+c),a.arcTo(y,y,0,0,1,y,c),a.lineTo(d-y,c),a.arcTo(y,y,0,0,1,d,y+c),a.lineTo(d,e-y),a.arcTo(y,y,0,0,1,d-y,e),a.lineTo(y,e),a.arcTo(y,y,0,0,1,0,e-y)):(a.moveTo(0,c),a.lineTo(d,c),a.lineTo(d,e),a.lineTo(0,e));a.close();a.fillAndStroke();a.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(a.begin(),a.moveTo(d-30,c+20),a.lineTo(d-20,c+10),a.lineTo(d-10,c+20),a.close(),a.stroke())};mxCellRenderer.registerShape("folder",p);p.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,
+var r=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),f=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));g||(k*=Math.min(d,e));k=Math.min(k,.5*d,.5*(e-c));b=Math.max(b,k);b=Math.min(d-k,b);f||(k=0);a.begin();"left"==r?(a.moveTo(Math.max(k,0),c),a.lineTo(Math.max(k,0),0),a.lineTo(b,0),a.lineTo(b,c)):(a.moveTo(d-b,c),a.lineTo(d-b,0),a.lineTo(d-Math.max(k,0),0),a.lineTo(d-Math.max(k,
+0),c));f?(a.moveTo(0,k+c),a.arcTo(k,k,0,0,1,k,c),a.lineTo(d-k,c),a.arcTo(k,k,0,0,1,d,k+c),a.lineTo(d,e-k),a.arcTo(k,k,0,0,1,d-k,e),a.lineTo(k,e),a.arcTo(k,k,0,0,1,0,e-k)):(a.moveTo(0,c),a.lineTo(d,c),a.lineTo(d,e),a.lineTo(0,e));a.close();a.fillAndStroke();a.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(a.begin(),a.moveTo(d-30,c+20),a.lineTo(d-20,c+10),a.lineTo(d-10,c+20),a.close(),a.stroke())};mxCellRenderer.registerShape("folder",p);p.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var c=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,d=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),r=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(r*=Math.min(a.width,a.height));r=Math.min(r,.5*a.width,.5*(a.height-b));d||(r=0);return"left"==
mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(r,0,Math.min(a.width,a.width-c),Math.min(a.height,a.height-b)):new mxRectangle(Math.min(a.width,a.width-c),0,r,Math.min(a.height,a.height-b))}return new mxRectangle(0,Math.min(a.height,b),0,0)}return null};mxUtils.extend(q,mxCylinder);q.prototype.arcSize=.1;q.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);var r=mxUtils.getValue(this.style,"rounded",!1),f=mxUtils.getValue(this.style,"absoluteArcSize",!1);b=
parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));c=mxUtils.getValue(this.style,"umlStateConnection",null);f||(b*=Math.min(d,e));b=Math.min(b,.5*d,.5*e);r||(b=0);r=0;null!=c&&(r=10);a.begin();a.moveTo(r,b);a.arcTo(b,b,0,0,1,r+b,0);a.lineTo(d-b,0);a.arcTo(b,b,0,0,1,d,b);a.lineTo(d,e-b);a.arcTo(b,b,0,0,1,d-b,e);a.lineTo(r+b,e);a.arcTo(b,b,0,0,1,r,e-b);a.close();a.fillAndStroke();a.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(a.roundrect(d-40,e-20,
10,10,3,3),a.stroke(),a.roundrect(d-20,e-20,10,10,3,3),a.stroke(),a.begin(),a.moveTo(d-30,e-15),a.lineTo(d-20,e-15),a.stroke());"connPointRefEntry"==c?(a.ellipse(0,.5*e-10,20,20),a.fillAndStroke()):"connPointRefExit"==c&&(a.ellipse(0,.5*e-10,20,20),a.fillAndStroke(),a.begin(),a.moveTo(5,.5*e-5),a.lineTo(15,.5*e+5),a.moveTo(15,.5*e-5),a.lineTo(5,.5*e+5),a.stroke())};q.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",
-null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",q);mxUtils.extend(t,mxActor);t.prototype.size=30;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,
-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",t);mxUtils.extend(v,mxActor);v.prototype.size=.4;v.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};v.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",v);mxUtils.extend(u,mxActor);u.prototype.size=.3;u.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};u.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",u);var Xa=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=
+null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",q);mxUtils.extend(u,mxActor);u.prototype.size=30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,
+b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(v,mxActor);v.prototype.size=.4;v.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};v.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",v);mxUtils.extend(t,mxActor);t.prototype.size=.3;t.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};t.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",t);var Xa=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=
mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,Math.min(1,e)):Xa.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};m.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,
"lid",!0)||(b/=2);return new mxRectangle(0,Math.min(a.height*this.scale,2*b*this.scale),0,Math.max(0,.3*b*this.scale))}return null};p.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var c=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,b=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,d=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,
"absoluteArcSize",!1),r=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(r*=Math.min(a.width,a.height));r=Math.min(r,.5*a.width,.5*(a.height-b));d||(r=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(r,0,Math.min(a.width,a.width-c),Math.min(a.height,a.height-b)):new mxRectangle(Math.min(a.width,a.width-c),0,r,Math.min(a.height,a.height-b))}return new mxRectangle(0,Math.min(a.height,b),0,0)}return null};q.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,
"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};h.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(a.height*this.scale,b*this.scale),0,Math.max(0,b*this.scale))}return null};mxUtils.extend(x,mxActor);x.prototype.size=.2;x.prototype.fixedSize=20;x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=
function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",x);mxUtils.extend(w,
mxActor);w.prototype.size=.2;w.prototype.fixedSize=20;w.prototype.isRoundable=function(){return!0};w.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,
-0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",w);mxUtils.extend(A,mxActor);A.prototype.size=.5;A.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,
-e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",A);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",E);H.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=
-b};H.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};H.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};H.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};H.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,
-arguments);this.lastX=f;this.lastY=g};H.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),r=Math.sqrt(d*d+e*e);if(2>r){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var f=Math.round(r/10),g=this.defaultVariation;5>f&&(f=5,g/=3);for(var k=c(a-this.lastX)*d/f,c=c(b-this.lastY)*e/f,d=d/r,e=e/r,r=0;r<f;r++){var y=(Math.random()-
-.5)*g;this.originalLineTo.call(this.canvas,k*r+this.lastX-y*e,c*r+this.lastY-y*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};H.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=
-1.5;var Ya=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){Ya.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var Za=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){Za.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new H(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(a){return this.outline||
+0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",w);mxUtils.extend(z,mxActor);z.prototype.size=.5;z.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,
+e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",z);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",E);G.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=
+b};G.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)};G.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};G.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};G.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,
+arguments);this.lastX=f;this.lastY=g};G.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),r=Math.sqrt(d*d+e*e);if(2>r){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var f=Math.round(r/10),g=this.defaultVariation;5>f&&(f=5,g/=3);for(var k=c(a-this.lastX)*d/f,c=c(b-this.lastY)*e/f,d=d/r,e=e/r,r=0;r<f;r++){var h=(Math.random()-
+.5)*g;this.originalLineTo.call(this.canvas,k*r+this.lastX-h*e,c*r+this.lastY-h*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};G.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 Ya=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(a){Ya.apply(this,arguments);null==a.handJiggle&&(a.handJiggle=this.createHandJiggle(a))};var Za=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(a){Za.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxShape.prototype.createComicCanvas=function(a){return new G(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 $a=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"))&&$a.apply(this,arguments)};var ab=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=
-function(a,b,c,d,e){if(null==a.handJiggle||a.handJiggle.constructor!=H)ab.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};mxUtils.extend(D,
+function(a,b,c,d,e){if(null==a.handJiggle||a.handJiggle.constructor!=G)ab.apply(this,arguments);else{var r=!0;null!=this.style&&(r="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(r||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)r||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?r=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,r=Math.min(d*r,e*r)),a.moveTo(b+r,c),a.lineTo(b+d-r,c),a.quadTo(b+d,c,b+d,c+r),a.lineTo(b+d,c+e-r),a.quadTo(b+d,c+e,b+d-r,c+e),a.lineTo(b+r,c+e),a.quadTo(b,c+e,b,c+e-r),a.lineTo(b,c+r),a.quadTo(b,c,b+r,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};mxUtils.extend(D,
mxRectangleShape);D.prototype.size=.1;D.prototype.fixedSize=!1;D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=
-mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};D.prototype.paintForeground=function(a,b,c,d,e){var f=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),r=parseFloat(mxUtils.getValue(this.style,"size",this.size)),r=f?Math.max(0,Math.min(d,r)):d*Math.max(0,Math.min(1,r));this.isRounded&&(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
-100,r=Math.max(r,Math.min(d*f,e*f)));r=Math.round(r);a.begin();a.moveTo(b+r,c);a.lineTo(b+r,c+e);a.moveTo(b+d-r,c);a.lineTo(b+d-r,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",D);mxCellRenderer.registerShape("process2",D);mxUtils.extend(F,mxRectangleShape);F.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};F.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",
-F);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,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",
-this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),r=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+g),e-c),new mxPoint(r,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",
-z);mxUtils.extend(I,mxActor);I.prototype.size=.2;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
+mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};D.prototype.paintForeground=function(a,b,c,d,e){var r=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),f=r?Math.max(0,Math.min(d,f)):d*Math.max(0,Math.min(1,f));this.isRounded&&(r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
+100,f=Math.max(f,Math.min(d*r,e*r)));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",D);mxCellRenderer.registerShape("process2",D);mxUtils.extend(F,mxRectangleShape);F.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};F.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",
+F);mxUtils.extend(y,mxHexagon);y.prototype.size=30;y.prototype.position=.5;y.prototype.position2=.5;y.prototype.base=20;y.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))));var r=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),g=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,r+g),e-c),new mxPoint(f,e),new mxPoint(Math.max(0,r),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.registerShape("callout",
+y);mxUtils.extend(I,mxActor);I.prototype.size=.2;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("step",I);mxUtils.extend(K,mxHexagon);K.prototype.size=.25;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("hexagon",K);mxUtils.extend(L,mxRectangleShape);L.prototype.isHtmlAllowed=function(){return!1};L.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,
c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",L);var Ua=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=
function(a,b,c,d,e){Ua.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ua.apply(this,[a,b,c,d,e]))}};mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.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};O.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,r;do{r=mxCellRenderer.defaultShapes[this.style["symbol"+f]];if(null!=r){var g=this.style["symbol"+f+"Align"],
-k=this.style["symbol"+f+"VerticalAlign"],h=this.style["symbol"+f+"Width"],y=this.style["symbol"+f+"Height"],C=this.style["symbol"+f+"Spacing"]||0,l=this.style["symbol"+f+"VSpacing"]||C,B=this.style["symbol"+f+"ArcSpacing"];null!=B&&(B*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),C+=B,l+=B);var B=b,G=c,B=g==mxConstants.ALIGN_CENTER?B+(d-h)/2:g==mxConstants.ALIGN_RIGHT?B+(d-h-C):B+C,G=k==mxConstants.ALIGN_MIDDLE?G+(e-y)/2:k==mxConstants.ALIGN_BOTTOM?G+(e-y-l):G+l;a.save();g=new r;g.style=
-this.style;r.prototype.paintVertexShape.call(g,a,B,G,h,y);a.restore()}f++}while(null!=r)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",O);mxUtils.extend(J,mxCylinder);J.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",J);mxUtils.extend(P,mxShape);P.prototype.paintBackground=function(a,
-b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",P);mxUtils.extend(aa,mxShape);aa.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};aa.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();
-a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",aa);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",X);mxUtils.extend(Q,mxShape);Q.prototype.paintVertexShape=
+k=this.style["symbol"+f+"VerticalAlign"],h=this.style["symbol"+f+"Width"],C=this.style["symbol"+f+"Height"],B=this.style["symbol"+f+"Spacing"]||0,l=this.style["symbol"+f+"VSpacing"]||B,A=this.style["symbol"+f+"ArcSpacing"];null!=A&&(A*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),B+=A,l+=A);var A=b,m=c,A=g==mxConstants.ALIGN_CENTER?A+(d-h)/2:g==mxConstants.ALIGN_RIGHT?A+(d-h-B):A+B,m=k==mxConstants.ALIGN_MIDDLE?m+(e-C)/2:k==mxConstants.ALIGN_BOTTOM?m+(e-C-l):m+l;a.save();g=new r;g.style=
+this.style;r.prototype.paintVertexShape.call(g,a,A,m,h,C);a.restore()}f++}while(null!=r)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",O);mxUtils.extend(J,mxCylinder);J.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",J);mxUtils.extend(P,mxShape);P.prototype.paintBackground=function(a,
+b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",P);mxUtils.extend(ba,mxShape);ba.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};ba.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();
+a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",ba);mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",Y);mxUtils.extend(Q,mxShape);Q.prototype.paintVertexShape=
function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",Q);mxUtils.extend(S,mxShape);S.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};S.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};S.prototype.paintForeground=
function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",S);mxUtils.extend(R,mxRectangleShape);R.prototype.size=40;R.prototype.isHtmlAllowed=function(){return!1};R.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)};R.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,
parseFloat(mxUtils.getValue(this.style,"size",this.size)))),r=mxUtils.getValue(this.style,"participant");null==r||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(r=this.state.view.graph.cellRenderer.getShape(r),null!=r&&r!=R&&(r=new r,r.apply(this.state),a.save(),r.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};R.prototype.paintForeground=
@@ -3292,19 +3295,19 @@ function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this
mxConstants.NONE?(this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b,c,d,e,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(b,c);a.lineTo(b+r,c);a.lineTo(b+r,c+Math.max(0,g-1.5*f));a.lineTo(b+Math.max(0,r-f),c+g);a.lineTo(b,c+g);a.close();a.fillAndStroke();a.begin();a.moveTo(b+r,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+g);a.stroke()};mxCellRenderer.registerShape("umlFrame",U);mxPerimeter.CenterPerimeter=function(a,b,c,d){return new mxPoint(a.getCenterX(),
a.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=R.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),
-new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",z.prototype.size))*b.view.scale))),b.style),
+new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",y.prototype.size))*b.view.scale))),b.style),
b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?x.prototype.fixedSize:x.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var r=a.x,g=a.y,k=a.width,h=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?
(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g),new mxPoint(r+k,g+e),new mxPoint(r+k,g+h),new mxPoint(r,g+h-e),new mxPoint(r,g)]):(e=e?Math.max(0,Math.min(.5*k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(r+e,g),new mxPoint(r+k,g),new mxPoint(r+k-e,g+h),new mxPoint(r,g+h),new mxPoint(r+e,g)]);h=a.getCenterX();a=a.getCenterY();a=new mxPoint(h,a);d&&(c.x<r||c.x>r+k?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",
mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?w.prototype.fixedSize:w.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var r=a.x,g=a.y,k=a.width,h=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(r+
e,g),new mxPoint(r+k-e,g),new mxPoint(r+k,g+h),new mxPoint(r,g+h),new mxPoint(r+e,g)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g),new mxPoint(r+k,g),new mxPoint(r+k-e,g+h),new mxPoint(r+e,g+h),new mxPoint(r,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g+e),new mxPoint(r+k,g),new mxPoint(r+k,g+h),new mxPoint(r,g+h-e),new mxPoint(r,g+e)]):(e=e?Math.max(0,Math.min(h,f)):
h*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g),new mxPoint(r+k,g+e),new mxPoint(r+k,g+h-e),new mxPoint(r,g+h),new mxPoint(r,g)]);h=a.getCenterX();a=a.getCenterY();a=new mxPoint(h,a);d&&(c.x<r||c.x>r+k?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?I.prototype.fixedSize:I.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,
-"size",f));e&&(f*=b.view.scale);var r=a.x,g=a.y,k=a.width,h=a.height,l=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?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g),new mxPoint(r+k-e,g),new mxPoint(r+k,a),new mxPoint(r+k-e,g+h),new mxPoint(r,g+h),new mxPoint(r+e,a),new mxPoint(r,g)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,
-f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(r+e,g),new mxPoint(r+k,g),new mxPoint(r+k-e,a),new mxPoint(r+k,g+h),new mxPoint(r+e,g+h),new mxPoint(r,a),new mxPoint(r+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g+e),new mxPoint(l,g),new mxPoint(r+k,g+e),new mxPoint(r+k,g+h),new mxPoint(l,g+h-e),new mxPoint(r,g+h),new mxPoint(r,g+e)]):(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(r,g),new mxPoint(l,g+
-e),new mxPoint(r+k,g),new mxPoint(r+k,g+h-e),new mxPoint(l,g+h),new mxPoint(r,g+h-e),new mxPoint(r,g)]);l=new mxPoint(l,a);d&&(c.x<r||c.x>r+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?K.prototype.fixedSize:K.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var r=a.x,g=a.y,k=a.width,
-h=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),g=[new mxPoint(l,g),new mxPoint(r+k,g+e),new mxPoint(r+k,g+h-e),new mxPoint(l,g+h),new mxPoint(r,g+h-e),new mxPoint(r,g+e),new mxPoint(l,g)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),g=[new mxPoint(r+
-e,g),new mxPoint(r+k-e,g),new mxPoint(r+k,a),new mxPoint(r+k-e,g+h),new mxPoint(r+e,g+h),new mxPoint(r,a),new mxPoint(r+e,g)]);l=new mxPoint(l,a);d&&(c.x<r||c.x>r+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);
-a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",da);mxUtils.extend(ja,mxShape);ja.prototype.size=10;ja.prototype.inset=2;ja.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),r=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+r);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-r,f/2);a.quadTo((d-
-f)/2-r,f+r,d/2,f+r);a.quadTo((d+f)/2+r,f+r,(d+f)/2+r,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",ja);mxUtils.extend(na,mxShape);na.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",na);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+
+"size",f));e&&(f*=b.view.scale);var g=a.x,r=a.y,k=a.width,h=a.height,l=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?(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),r=[new mxPoint(g,r),new mxPoint(g+k-e,r),new mxPoint(g+k,a),new mxPoint(g+k-e,r+h),new mxPoint(g,r+h),new mxPoint(g+e,a),new mxPoint(g,r)]):b==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,
+f)):k*Math.max(0,Math.min(1,f)),r=[new mxPoint(g+e,r),new mxPoint(g+k,r),new mxPoint(g+k-e,a),new mxPoint(g+k,r+h),new mxPoint(g+e,r+h),new mxPoint(g,a),new mxPoint(g+e,r)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),r=[new mxPoint(g,r+e),new mxPoint(l,r),new mxPoint(g+k,r+e),new mxPoint(g+k,r+h),new mxPoint(l,r+h-e),new mxPoint(g,r+h),new mxPoint(g,r+e)]):(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),r=[new mxPoint(g,r),new mxPoint(l,r+
+e),new mxPoint(g+k,r),new mxPoint(g+k,r+h-e),new mxPoint(l,r+h),new mxPoint(g,r+h-e),new mxPoint(g,r)]);l=new mxPoint(l,a);d&&(c.x<g||c.x>g+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(r,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e="0"!=mxUtils.getValue(b.style,"fixedSize","0"),f=e?K.prototype.fixedSize:K.prototype.size;null!=b&&(f=mxUtils.getValue(b.style,"size",f));e&&(f*=b.view.scale);var g=a.x,r=a.y,k=a.width,
+h=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(h,f)):h*Math.max(0,Math.min(1,f)),r=[new mxPoint(l,r),new mxPoint(g+k,r+e),new mxPoint(g+k,r+h-e),new mxPoint(l,r+h),new mxPoint(g,r+h-e),new mxPoint(g,r+e),new mxPoint(l,r)]):(e=e?Math.max(0,Math.min(k,f)):k*Math.max(0,Math.min(1,f)),r=[new mxPoint(g+
+e,r),new mxPoint(g+k-e,r),new mxPoint(g+k,a),new mxPoint(g+k-e,r+h),new mxPoint(g+e,r+h),new mxPoint(g,a),new mxPoint(g+e,r)]);l=new mxPoint(l,a);d&&(c.x<g||c.x>g+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(r,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);
+a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",da);mxUtils.extend(ja,mxShape);ja.prototype.size=10;ja.prototype.inset=2;ja.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-
+f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",ja);mxUtils.extend(na,mxShape);na.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",na);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+
this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(ea,mxCylinder);ea.prototype.jettyWidth=20;ea.prototype.jettyHeight=10;ea.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));
c=g/2;var g=c+g/2,r=Math.min(b,e-b),k=Math.min(r+2*b,e-b);f?(a.moveTo(c,r),a.lineTo(g,r),a.lineTo(g,r+b),a.lineTo(c,r+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,r+b),a.lineTo(0,r+b),a.lineTo(0,r),a.lineTo(c,r),a.close());a.end()};mxCellRenderer.registerShape("module",ea);mxUtils.extend(pa,mxCylinder);pa.prototype.jettyWidth=32;pa.prototype.jettyHeight=
12;pa.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,r=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,r),a.lineTo(g,r),a.lineTo(g,r+b),a.lineTo(c,r+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,r+b),a.lineTo(0,
@@ -3312,74 +3315,74 @@ r+b),a.lineTo(0,r),a.lineTo(c,r),a.close());a.end()};mxCellRenderer.registerShap
ta);mxUtils.extend(qa,mxDoubleEllipse);qa.prototype.outerStroke=!0;qa.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",qa);mxUtils.extend(ua,qa);ua.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ua);mxUtils.extend(ka,mxArrowConnector);ka.prototype.defaultWidth=4;ka.prototype.isOpenEnded=
function(){return!0};ka.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ka.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ka);mxUtils.extend(ga,mxArrowConnector);ga.prototype.defaultWidth=10;ga.prototype.defaultArrowWidth=20;ga.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};ga.prototype.getEndArrowWidth=
function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};ga.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",ga);mxUtils.extend(ha,mxActor);ha.prototype.size=30;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",ha);mxUtils.extend(ba,mxRectangleShape);ba.prototype.dx=20;ba.prototype.dy=20;ba.prototype.isHtmlAllowed=function(){return!1};ba.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",ba);mxUtils.extend(fa,mxActor);fa.prototype.dx=20;fa.prototype.dy=
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",ha);mxUtils.extend(ca,mxRectangleShape);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.isHtmlAllowed=function(){return!1};ca.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",ca);mxUtils.extend(fa,mxActor);fa.prototype.dx=20;fa.prototype.dy=
20;fa.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};
mxCellRenderer.registerShape("corner",fa);mxUtils.extend(ma,mxActor);ma.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",ma);mxUtils.extend(ia,mxActor);ia.prototype.dx=20;ia.prototype.dy=20;ia.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",ia);mxUtils.extend(W,mxActor);W.prototype.arrowWidth=.3;W.prototype.arrowSize=.2;W.prototype.redrawPath=
+"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",ia);mxUtils.extend(X,mxActor);X.prototype.arrowWidth=.3;X.prototype.arrowSize=.2;X.prototype.redrawPath=
function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",
-W);mxUtils.extend(ra,mxActor);ra.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",W.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",W.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,
-e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ra);mxUtils.extend(Y,mxActor);Y.prototype.size=.1;Y.prototype.fixedSize=20;Y.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,
-0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",Y);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(Z,mxActor);Z.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",
-Z);mxUtils.extend(V,mxActor);V.prototype.size=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",
-V);mxUtils.extend(ca,mxActor);ca.prototype.size=.375;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",
-ca);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",la);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);
-a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",Ea);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",Ba);mxUtils.extend(Ma,mxRhombus);Ma.prototype.paintVertexShape=
-function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",Ma);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",
-Na);mxUtils.extend(Oa,mxEllipse);Oa.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Oa);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);
+X);mxUtils.extend(ra,mxActor);ra.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",X.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",X.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,
+e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ra);mxUtils.extend(Z,mxActor);Z.prototype.size=.1;Z.prototype.fixedSize=20;Z.prototype.redrawPath=function(a,b,c,d,e){b="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,
+0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",Z);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",N);mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",
+aa);mxUtils.extend(V,mxActor);V.prototype.size=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",
+V);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(la,
+mxEllipse);la.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",la);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);
+a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",Ea);mxUtils.extend(Ba,mxEllipse);Ba.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",Ba);mxUtils.extend(Ma,mxRhombus);Ma.prototype.paintVertexShape=function(a,
+b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",Ma);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",Na);
+mxUtils.extend(Oa,mxEllipse);Oa.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",Oa);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);
if(null!=this.style){var f=a.pointerEvents;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1);a.rect(b,c,d,e);a.fill();a.pointerEvents=f;a.setStrokeColor(this.stroke);a.begin();a.moveTo(b,c);this.outline||"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c);this.outline||"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e);this.outline||"1"==mxUtils.getValue(this.style,
"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e);(this.outline||"1"==mxUtils.getValue(this.style,"left","1"))&&a.lineTo(b,c);a.end();a.stroke()}};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(Ga,mxEllipse);Ga.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};
mxCellRenderer.registerShape("lineEllipse",Ga);mxUtils.extend(Ha,mxActor);Ha.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",Ha);mxUtils.extend(ya,mxActor);ya.prototype.size=.2;ya.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-
f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",ya);mxUtils.extend(za,mxActor);za.prototype.size=.25;za.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/
-2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",za);mxUtils.extend(N,mxActor);N.prototype.cst={RECT2:"mxgraph.basic.rect"};N.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",
+2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.registerShape("display",za);mxUtils.extend(M,mxActor);M.prototype.cst={RECT2:"mxgraph.basic.rect"};M.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",
dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",
type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},
{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",
type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",
-dispName:"Fold"}]}];N.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);this.strictDrawShape(a,0,0,d,e)};N.prototype.strictDrawShape=function(a,b,c,d,e,f){var g=f&&f.rectStyle?f.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=f&&f.absoluteCornerSize?f.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),h=f&&f.size?f.size:Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),r=f&&f.rectOutline?f.rectOutline:
-mxUtils.getValue(this.style,"rectOutline",this.rectOutline),l=f&&f.indent?f.indent:Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),m=f&&f.dashed?f.dashed:mxUtils.getValue(this.style,"dashed",!1),n=f&&f.dashPattern?f.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),p=f&&f.relIndent?f.relIndent:Math.max(0,Math.min(50,l)),y=f&&f.top?f.top:mxUtils.getValue(this.style,"top",!0),C=f&&f.right?f.right:mxUtils.getValue(this.style,"right",!0),B=f&&f.bottom?f.bottom:
-mxUtils.getValue(this.style,"bottom",!0),q=f&&f.left?f.left:mxUtils.getValue(this.style,"left",!0),t=f&&f.topLeftStyle?f.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),G=f&&f.topRightStyle?f.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),u=f&&f.bottomRightStyle?f.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),v=f&&f.bottomLeftStyle?f.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Aa=f&&f.fillColor?f.fillColor:
-mxUtils.getValue(this.style,"fillColor","#ffffff");f&&f.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var x=f&&f.strokeWidth?f.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),w=f&&f.fillColor2?f.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),z=f&&f.gradientColor2?f.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),A=f&&f.gradientDirection2?f.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),F=f&&f.opacity?f.opacity:
-mxUtils.getValue(this.style,"opacity","100"),D=Math.max(0,Math.min(50,h));f=N.prototype;a.setDashed(m);n&&""!=n&&a.setDashPattern(n);a.setStrokeWidth(x);h=Math.min(.5*e,.5*d,h);k||(h=D*Math.min(d,e)/100);h=Math.min(h,.5*Math.min(d,e));k||(l=Math.min(p*Math.min(d,e)/100));l=Math.min(l,.5*Math.min(d,e)-h);(y||C||B||q)&&"frame"!=r&&(a.begin(),y?f.moveNW(a,b,c,d,e,g,t,h,q):a.moveTo(0,0),y&&f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),C&&f.paintNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,
-e,g,u,h,B),B&&f.paintSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),q&&f.paintSW(a,b,c,d,e,g,v,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),a.close(),a.fill(),a.setShadow(!1),a.setFillColor(w),m=k=F,"none"==w&&(k=0),"none"==z&&(m=0),a.setGradient(w,z,0,0,d,e,A,k,m),a.begin(),y?f.moveNWInner(a,b,c,d,e,g,t,h,l,y,q):a.moveTo(l,0),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q),q&&B&&f.paintSWInner(a,b,c,d,e,g,v,h,l,B),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B),B&&C&&f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,
-b,c,d,e,g,G,h,l,y,C),C&&y&&f.paintNEInner(a,b,c,d,e,g,G,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y),y&&q&&f.paintNWInner(a,b,c,d,e,g,t,h,l),a.fill(),"none"==Aa&&(a.begin(),f.paintFolds(a,b,c,d,e,g,t,G,u,v,h,y,C,B,q),a.stroke()));y||C||B||!q?y||C||!B||q?!y&&!C&&B&&q?"frame"!=r?(a.begin(),f.moveSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),"double"==r&&(f.moveNWInner(a,b,c,d,e,g,t,h,l,y,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q),f.paintSWInner(a,
-b,c,d,e,g,v,h,l,B),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B)),a.stroke()):(a.begin(),f.moveSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),f.lineNWInner(a,b,c,d,e,g,t,h,l,y,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,B),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B),a.close(),a.fillAndStroke()):y||!C||B||q?!y&&C&&!B&&q?"frame"!=r?(a.begin(),f.moveSW(a,b,c,d,e,g,t,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),"double"==
-r&&(f.moveNWInner(a,b,c,d,e,g,t,h,l,y,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q)),a.stroke(),a.begin(),f.moveNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,e,g,u,h,B),"double"==r&&(f.moveSEInner(a,b,c,d,e,g,u,h,l,B),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C)),a.stroke()):(a.begin(),f.moveSW(a,b,c,d,e,g,t,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),f.lineNWInner(a,b,c,d,e,g,t,h,l,y,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q),a.close(),a.fillAndStroke(),a.begin(),f.moveNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,e,
-g,u,h,B),f.lineSEInner(a,b,c,d,e,g,u,h,l,B),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C),a.close(),a.fillAndStroke()):!y&&C&&B&&!q?"frame"!=r?(a.begin(),f.moveNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,e,g,u,h,B),f.paintSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),"double"==r&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C)),a.stroke()):(a.begin(),f.moveNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,
-b,c,d,e,g,u,h,B),f.paintSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.lineSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C),a.close(),a.fillAndStroke()):!y&&C&&B&&q?"frame"!=r?(a.begin(),f.moveNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,e,g,u,h,B),f.paintSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),"double"==r&&(f.moveNWInner(a,
-b,c,d,e,g,t,h,l,y,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,B),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C)),a.stroke()):(a.begin(),f.moveNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,e,g,u,h,B),f.paintSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),f.lineNWInner(a,b,c,d,e,g,t,h,l,y,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q),f.paintSWInner(a,
-b,c,d,e,g,v,h,l,B),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C),a.close(),a.fillAndStroke()):!y||C||B||q?y&&!C&&!B&&q?"frame"!=r?(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),"double"==r&&(f.moveNEInner(a,b,c,d,e,g,G,h,l,C),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q)),a.stroke()):
-(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),f.lineNEInner(a,b,c,d,e,g,G,h,l,C),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q),a.close(),a.fillAndStroke()):y&&!C&&B&&!q?"frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),"double"==r&&(f.moveNEInner(a,b,c,d,e,g,G,h,l,C),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y)),a.stroke(),a.begin(),
-f.moveSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),"double"==r&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),f.lineNEInner(a,b,c,d,e,g,G,h,l,C),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y),a.close(),a.fillAndStroke(),a.begin(),f.moveSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.lineSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B),a.close(),a.fillAndStroke()):
-y&&!C&&B&&q?"frame"!=r?(a.begin(),f.moveSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),"double"==r&&(f.moveNEInner(a,b,c,d,e,g,G,h,l,C),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,B),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B)),a.stroke()):(a.begin(),f.moveSE(a,b,c,d,e,g,u,
-h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),f.lineNEInner(a,b,c,d,e,g,G,h,l,C),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,B),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B),a.close(),a.fillAndStroke()):y&&C&&!B&&!q?"frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,
-C),f.paintNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,e,g,u,h,B),"double"==r&&(f.moveSEInner(a,b,c,d,e,g,u,h,l,B),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C),f.paintNEInner(a,b,c,d,e,g,G,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),f.paintNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,e,g,u,h,B),f.lineSEInner(a,b,c,d,e,g,u,h,l,B),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C),f.paintNEInner(a,b,c,d,e,g,G,h,l),f.paintTopInner(a,b,c,
-d,e,g,t,h,l,q,y),a.close(),a.fillAndStroke()):y&&C&&!B&&q?"frame"!=r?(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),f.paintNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,e,g,u,h,B),"double"==r&&(f.moveSEInner(a,b,c,d,e,g,u,h,l,B),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C),f.paintNEInner(a,b,c,d,e,g,G,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q)),a.stroke()):
-(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),f.paintNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,e,g,u,h,B),f.lineSEInner(a,b,c,d,e,g,u,h,l,B),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C),f.paintNEInner(a,b,c,d,e,g,G,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q),a.close(),a.fillAndStroke()):y&&C&&B&&!q?"frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,
-q),f.paintTop(a,b,c,d,e,g,G,h,C),f.paintNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,e,g,u,h,B),f.paintSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),"double"==r&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C),f.paintNEInner(a,b,c,d,e,g,G,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),f.paintNE(a,b,c,d,e,g,G,
-h,y),f.paintRight(a,b,c,d,e,g,u,h,B),f.paintSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.lineSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C),f.paintNEInner(a,b,c,d,e,g,G,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y),a.close(),a.fillAndStroke()):y&&C&&B&&q&&("frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),f.paintNE(a,b,c,d,e,g,G,h,
-y),f.paintRight(a,b,c,d,e,g,u,h,B),f.paintSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),a.close(),"double"==r&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,B),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C),f.paintNEInner(a,b,c,d,e,g,G,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,
-e,g,v,h,l,B,q),a.close()),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),f.paintNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,e,g,u,h,B),f.paintSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),a.close(),f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,B),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B),f.paintSEInner(a,b,c,d,e,g,u,h,l),f.paintRightInner(a,b,c,d,
-e,g,G,h,l,y,C),f.paintNEInner(a,b,c,d,e,g,G,h,l),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y),f.paintNWInner(a,b,c,d,e,g,t,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q),a.close(),a.fillAndStroke())):"frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),"double"==r&&(f.moveNEInner(a,b,c,d,e,g,G,h,l,C),f.paintTopInner(a,b,c,d,e,g,t,h,l,q,y)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,t,h,q),f.paintTop(a,b,c,d,e,g,G,h,C),f.lineNEInner(a,b,c,d,e,g,G,h,l,C),f.paintTopInner(a,b,c,d,
-e,g,t,h,l,q,y),a.close(),a.fillAndStroke()):"frame"!=r?(a.begin(),f.moveNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,e,g,u,h,B),"double"==r&&(f.moveSEInner(a,b,c,d,e,g,u,h,l,B),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C)),a.stroke()):(a.begin(),f.moveNE(a,b,c,d,e,g,G,h,y),f.paintRight(a,b,c,d,e,g,u,h,B),f.lineSEInner(a,b,c,d,e,g,u,h,l,B),f.paintRightInner(a,b,c,d,e,g,G,h,l,y,C),a.close(),a.fillAndStroke()):"frame"!=r?(a.begin(),f.moveSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),"double"==r&&
-(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B)),a.stroke()):(a.begin(),f.moveSE(a,b,c,d,e,g,u,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.lineSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,u,h,l,C,B),a.close(),a.fillAndStroke()):"frame"!=r?(a.begin(),f.moveSW(a,b,c,d,e,g,t,h,B),f.paintLeft(a,b,c,d,e,g,t,h,y),"double"==r&&(f.moveNWInner(a,b,c,d,e,g,t,h,l,y,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q)),a.stroke()):(a.begin(),f.moveSW(a,b,c,d,e,g,t,h,B),f.paintLeft(a,
-b,c,d,e,g,t,h,y),f.lineNWInner(a,b,c,d,e,g,t,h,l,y,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,B,q),a.close(),a.fillAndStroke());a.begin();f.paintFolds(a,b,c,d,e,g,t,G,u,v,h,y,C,B,q);a.stroke()};N.prototype.moveNW=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.moveTo(0,0):a.moveTo(0,h)};N.prototype.moveNE=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.moveTo(d,0):a.moveTo(d-h,0)};N.prototype.moveSE=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&
-"square"==f||!k?a.moveTo(d,e):a.moveTo(d,e-h)};N.prototype.moveSW=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.moveTo(0,e):a.moveTo(h,e)};N.prototype.paintNW=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,h,0)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(h,0);else a.lineTo(0,0)};N.prototype.paintTop=
-function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.lineTo(d,0):a.lineTo(d-h,0)};N.prototype.paintNE=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,d,h)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d,h);else a.lineTo(d,0)};N.prototype.paintRight=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==
-g&&"square"==f||!k?a.lineTo(d,e):a.lineTo(d,e-h)};N.prototype.paintLeft=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.lineTo(0,0):a.lineTo(0,h)};N.prototype.paintSE=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,d-h,e)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d-h,e);else a.lineTo(d,
-e)};N.prototype.paintBottom=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.lineTo(0,e):a.lineTo(h,e)};N.prototype.paintSW=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,0,e-h)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(0,e-h);else a.lineTo(0,e)};N.prototype.paintNWInner=function(a,b,c,
-d,e,f,g,h,k){if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,k,.5*k+h);else if("invRound"==g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,k,k+h);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(k,.5*k+h);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(k+h,k+h),a.lineTo(k,k+h)};N.prototype.paintTopInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(0,k):l&&!m?a.lineTo(k,0):l?"square"==g||"default"==g&&"square"==f?a.lineTo(k,k):"rounded"==g||"default"==g&&
-"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(h+.5*k,k):a.lineTo(h+k,k):a.lineTo(0,k):a.lineTo(0,0)};N.prototype.paintNEInner=function(a,b,c,d,e,f,g,h,k){if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,d-h-.5*k,k);else if("invRound"==g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,d-h-k,k);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(d-h-.5*k,k);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(d-h-k,h+k),a.lineTo(d-h-k,k)};N.prototype.paintRightInner=
-function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(d-k,0):l&&!m?a.lineTo(d,k):l?"square"==g||"default"==g&&"square"==f?a.lineTo(d-k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(d-k,h+.5*k):a.lineTo(d-k,h+k):a.lineTo(d-k,0):a.lineTo(d,0)};N.prototype.paintLeftInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(k,e):l&&!m?a.lineTo(0,e-k):l?"square"==g||"default"==g&&"square"==f?a.lineTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==
-g&&"snip"==f?a.lineTo(k,e-h-.5*k):a.lineTo(k,e-h-k):a.lineTo(k,e):a.lineTo(0,e)};N.prototype.paintSEInner=function(a,b,c,d,e,f,g,h,k){if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,d-k,e-h-.5*k);else if("invRound"==g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,d-k,e-h-k);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(d-k,e-h-.5*k);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(d-h-k,e-h-k),a.lineTo(d-k,e-h-k)};N.prototype.paintBottomInner=function(a,b,c,d,
-e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(d,e-k):l&&!m?a.lineTo(d-k,e):"square"==g||"default"==g&&"square"==f||!l?a.lineTo(d-k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(d-h-.5*k,e-k):a.lineTo(d-h-k,e-k):a.lineTo(d,e)};N.prototype.paintSWInner=function(a,b,c,d,e,f,g,h,k,l){if(!l)a.lineTo(k,e);else if("square"==g||"default"==g&&"square"==f)a.lineTo(k,e-k);else if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,h+.5*k,e-k);else if("invRound"==
-g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,h+k,e-k);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(h+.5*k,e-k);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(k+h,e-h-k),a.lineTo(k+h,e-k)};N.prototype.moveSWInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.moveTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(k,
-e-h-k):a.moveTo(0,e-k)};N.prototype.lineSWInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.lineTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(k,e-h-k):a.lineTo(0,e-k)};N.prototype.moveSEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.moveTo(d-k,e-k):"rounded"==g||"default"==g&&"rounded"==
-f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(d-k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(d-k,e-h-k):a.moveTo(d-k,e)};N.prototype.lineSEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.lineTo(d-k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(d-k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d-k,e-h-k):a.lineTo(d-
-k,e)};N.prototype.moveNEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f||l?a.moveTo(d-k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(d-k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(d-k,h+k):a.moveTo(d,k)};N.prototype.lineNEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f||l?a.lineTo(d-k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==
-g&&"snip"==f?a.lineTo(d-k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d-k,h+k):a.lineTo(d,k)};N.prototype.moveNWInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.moveTo(k,0):l&&!m?a.moveTo(0,k):"square"==g||"default"==g&&"square"==f?a.moveTo(k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(k,h+k):a.moveTo(0,
-0)};N.prototype.lineNWInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(k,0):l&&!m?a.lineTo(0,k):"square"==g||"default"==g&&"square"==f?a.lineTo(k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(k,h+k):a.lineTo(0,0)};N.prototype.paintFolds=function(a,b,c,d,e,f,g,h,k,l,m,n,p,q,t){if("fold"==f||"fold"==g||"fold"==h||"fold"==k||"fold"==l)("fold"==g||"default"==
-g&&"fold"==f)&&n&&t&&(a.moveTo(0,m),a.lineTo(m,m),a.lineTo(m,0)),("fold"==h||"default"==h&&"fold"==f)&&n&&p&&(a.moveTo(d-m,0),a.lineTo(d-m,m),a.lineTo(d,m)),("fold"==k||"default"==k&&"fold"==f)&&q&&p&&(a.moveTo(d-m,e),a.lineTo(d-m,e-m),a.lineTo(d,e-m)),("fold"==l||"default"==l&&"fold"==f)&&q&&t&&(a.moveTo(0,e-m),a.lineTo(m,e-m),a.lineTo(m,e))};mxCellRenderer.registerShape(N.prototype.cst.RECT2,N);N.prototype.constraints=null;mxUtils.extend(wa,mxConnector);wa.prototype.origPaintEdgeShape=wa.prototype.paintEdgeShape;
+dispName:"Fold"}]}];M.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);this.strictDrawShape(a,0,0,d,e)};M.prototype.strictDrawShape=function(a,b,c,d,e,f){var g=f&&f.rectStyle?f.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=f&&f.absoluteCornerSize?f.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),h=f&&f.size?f.size:Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),r=f&&f.rectOutline?f.rectOutline:
+mxUtils.getValue(this.style,"rectOutline",this.rectOutline),l=f&&f.indent?f.indent:Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),m=f&&f.dashed?f.dashed:mxUtils.getValue(this.style,"dashed",!1),n=f&&f.dashPattern?f.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),p=f&&f.relIndent?f.relIndent:Math.max(0,Math.min(50,l)),B=f&&f.top?f.top:mxUtils.getValue(this.style,"top",!0),C=f&&f.right?f.right:mxUtils.getValue(this.style,"right",!0),A=f&&f.bottom?f.bottom:
+mxUtils.getValue(this.style,"bottom",!0),q=f&&f.left?f.left:mxUtils.getValue(this.style,"left",!0),u=f&&f.topLeftStyle?f.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),t=f&&f.topRightStyle?f.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),H=f&&f.bottomRightStyle?f.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),v=f&&f.bottomLeftStyle?f.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Aa=f&&f.fillColor?f.fillColor:
+mxUtils.getValue(this.style,"fillColor","#ffffff");f&&f.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var x=f&&f.strokeWidth?f.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),w=f&&f.fillColor2?f.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),y=f&&f.gradientColor2?f.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),z=f&&f.gradientDirection2?f.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),F=f&&f.opacity?f.opacity:
+mxUtils.getValue(this.style,"opacity","100"),D=Math.max(0,Math.min(50,h));f=M.prototype;a.setDashed(m);n&&""!=n&&a.setDashPattern(n);a.setStrokeWidth(x);h=Math.min(.5*e,.5*d,h);k||(h=D*Math.min(d,e)/100);h=Math.min(h,.5*Math.min(d,e));k||(l=Math.min(p*Math.min(d,e)/100));l=Math.min(l,.5*Math.min(d,e)-h);(B||C||A||q)&&"frame"!=r&&(a.begin(),B?f.moveNW(a,b,c,d,e,g,u,h,q):a.moveTo(0,0),B&&f.paintNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),C&&f.paintNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,
+e,g,H,h,A),A&&f.paintSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),q&&f.paintSW(a,b,c,d,e,g,v,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),a.close(),a.fill(),a.setShadow(!1),a.setFillColor(w),m=k=F,"none"==w&&(k=0),"none"==y&&(m=0),a.setGradient(w,y,0,0,d,e,z,k,m),a.begin(),B?f.moveNWInner(a,b,c,d,e,g,u,h,l,B,q):a.moveTo(l,0),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q),q&&A&&f.paintSWInner(a,b,c,d,e,g,v,h,l,A),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A),A&&C&&f.paintSEInner(a,b,c,d,e,g,H,h,l),f.paintRightInner(a,
+b,c,d,e,g,t,h,l,B,C),C&&B&&f.paintNEInner(a,b,c,d,e,g,t,h,l),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B),B&&q&&f.paintNWInner(a,b,c,d,e,g,u,h,l),a.fill(),"none"==Aa&&(a.begin(),f.paintFolds(a,b,c,d,e,g,u,t,H,v,h,B,C,A,q),a.stroke()));B||C||A||!q?B||C||!A||q?!B&&!C&&A&&q?"frame"!=r?(a.begin(),f.moveSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),"double"==r&&(f.moveNWInner(a,b,c,d,e,g,u,h,l,B,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q),f.paintSWInner(a,
+b,c,d,e,g,v,h,l,A),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A)),a.stroke()):(a.begin(),f.moveSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),f.lineNWInner(a,b,c,d,e,g,u,h,l,B,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,A),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A),a.close(),a.fillAndStroke()):B||!C||A||q?!B&&C&&!A&&q?"frame"!=r?(a.begin(),f.moveSW(a,b,c,d,e,g,u,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),"double"==
+r&&(f.moveNWInner(a,b,c,d,e,g,u,h,l,B,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q)),a.stroke(),a.begin(),f.moveNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,e,g,H,h,A),"double"==r&&(f.moveSEInner(a,b,c,d,e,g,H,h,l,A),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C)),a.stroke()):(a.begin(),f.moveSW(a,b,c,d,e,g,u,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),f.lineNWInner(a,b,c,d,e,g,u,h,l,B,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q),a.close(),a.fillAndStroke(),a.begin(),f.moveNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,e,
+g,H,h,A),f.lineSEInner(a,b,c,d,e,g,H,h,l,A),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C),a.close(),a.fillAndStroke()):!B&&C&&A&&!q?"frame"!=r?(a.begin(),f.moveNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,e,g,H,h,A),f.paintSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),"double"==r&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A),f.paintSEInner(a,b,c,d,e,g,H,h,l),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C)),a.stroke()):(a.begin(),f.moveNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,
+b,c,d,e,g,H,h,A),f.paintSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.lineSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A),f.paintSEInner(a,b,c,d,e,g,H,h,l),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C),a.close(),a.fillAndStroke()):!B&&C&&A&&q?"frame"!=r?(a.begin(),f.moveNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,e,g,H,h,A),f.paintSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),"double"==r&&(f.moveNWInner(a,
+b,c,d,e,g,u,h,l,B,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,A),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A),f.paintSEInner(a,b,c,d,e,g,H,h,l),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C)),a.stroke()):(a.begin(),f.moveNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,e,g,H,h,A),f.paintSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),f.lineNWInner(a,b,c,d,e,g,u,h,l,B,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q),f.paintSWInner(a,
+b,c,d,e,g,v,h,l,A),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A),f.paintSEInner(a,b,c,d,e,g,H,h,l),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C),a.close(),a.fillAndStroke()):!B||C||A||q?B&&!C&&!A&&q?"frame"!=r?(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),f.paintNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),"double"==r&&(f.moveNEInner(a,b,c,d,e,g,t,h,l,C),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B),f.paintNWInner(a,b,c,d,e,g,u,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q)),a.stroke()):
+(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),f.paintNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),f.lineNEInner(a,b,c,d,e,g,t,h,l,C),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B),f.paintNWInner(a,b,c,d,e,g,u,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q),a.close(),a.fillAndStroke()):B&&!C&&A&&!q?"frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),"double"==r&&(f.moveNEInner(a,b,c,d,e,g,t,h,l,C),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B)),a.stroke(),a.begin(),
+f.moveSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),"double"==r&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),f.lineNEInner(a,b,c,d,e,g,t,h,l,C),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B),a.close(),a.fillAndStroke(),a.begin(),f.moveSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.lineSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A),a.close(),a.fillAndStroke()):
+B&&!C&&A&&q?"frame"!=r?(a.begin(),f.moveSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),f.paintNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),"double"==r&&(f.moveNEInner(a,b,c,d,e,g,t,h,l,C),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B),f.paintNWInner(a,b,c,d,e,g,u,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,A),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A)),a.stroke()):(a.begin(),f.moveSE(a,b,c,d,e,g,H,
+h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),f.paintNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),f.lineNEInner(a,b,c,d,e,g,t,h,l,C),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B),f.paintNWInner(a,b,c,d,e,g,u,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,A),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A),a.close(),a.fillAndStroke()):B&&C&&!A&&!q?"frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,
+C),f.paintNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,e,g,H,h,A),"double"==r&&(f.moveSEInner(a,b,c,d,e,g,H,h,l,A),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C),f.paintNEInner(a,b,c,d,e,g,t,h,l),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),f.paintNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,e,g,H,h,A),f.lineSEInner(a,b,c,d,e,g,H,h,l,A),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C),f.paintNEInner(a,b,c,d,e,g,t,h,l),f.paintTopInner(a,b,c,
+d,e,g,u,h,l,q,B),a.close(),a.fillAndStroke()):B&&C&&!A&&q?"frame"!=r?(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),f.paintNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),f.paintNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,e,g,H,h,A),"double"==r&&(f.moveSEInner(a,b,c,d,e,g,H,h,l,A),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C),f.paintNEInner(a,b,c,d,e,g,t,h,l),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B),f.paintNWInner(a,b,c,d,e,g,u,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q)),a.stroke()):
+(a.begin(),f.moveSW(a,b,c,d,e,g,v,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),f.paintNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),f.paintNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,e,g,H,h,A),f.lineSEInner(a,b,c,d,e,g,H,h,l,A),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C),f.paintNEInner(a,b,c,d,e,g,t,h,l),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B),f.paintNWInner(a,b,c,d,e,g,u,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q),a.close(),a.fillAndStroke()):B&&C&&A&&!q?"frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,u,h,
+q),f.paintTop(a,b,c,d,e,g,t,h,C),f.paintNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,e,g,H,h,A),f.paintSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),"double"==r&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A),f.paintSEInner(a,b,c,d,e,g,H,h,l),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C),f.paintNEInner(a,b,c,d,e,g,t,h,l),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),f.paintNE(a,b,c,d,e,g,t,
+h,B),f.paintRight(a,b,c,d,e,g,H,h,A),f.paintSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.lineSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A),f.paintSEInner(a,b,c,d,e,g,H,h,l),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C),f.paintNEInner(a,b,c,d,e,g,t,h,l),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B),a.close(),a.fillAndStroke()):B&&C&&A&&q&&("frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,u,h,q),f.paintNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),f.paintNE(a,b,c,d,e,g,t,h,
+B),f.paintRight(a,b,c,d,e,g,H,h,A),f.paintSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),a.close(),"double"==r&&(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,A),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A),f.paintSEInner(a,b,c,d,e,g,H,h,l),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C),f.paintNEInner(a,b,c,d,e,g,t,h,l),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B),f.paintNWInner(a,b,c,d,e,g,u,h,l),f.paintLeftInner(a,b,c,d,
+e,g,v,h,l,A,q),a.close()),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,u,h,q),f.paintNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),f.paintNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,e,g,H,h,A),f.paintSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.paintSW(a,b,c,d,e,g,v,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),a.close(),f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintSWInner(a,b,c,d,e,g,v,h,l,A),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A),f.paintSEInner(a,b,c,d,e,g,H,h,l),f.paintRightInner(a,b,c,d,
+e,g,t,h,l,B,C),f.paintNEInner(a,b,c,d,e,g,t,h,l),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B),f.paintNWInner(a,b,c,d,e,g,u,h,l),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q),a.close(),a.fillAndStroke())):"frame"!=r?(a.begin(),f.moveNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),"double"==r&&(f.moveNEInner(a,b,c,d,e,g,t,h,l,C),f.paintTopInner(a,b,c,d,e,g,u,h,l,q,B)),a.stroke()):(a.begin(),f.moveNW(a,b,c,d,e,g,u,h,q),f.paintTop(a,b,c,d,e,g,t,h,C),f.lineNEInner(a,b,c,d,e,g,t,h,l,C),f.paintTopInner(a,b,c,d,
+e,g,u,h,l,q,B),a.close(),a.fillAndStroke()):"frame"!=r?(a.begin(),f.moveNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,e,g,H,h,A),"double"==r&&(f.moveSEInner(a,b,c,d,e,g,H,h,l,A),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C)),a.stroke()):(a.begin(),f.moveNE(a,b,c,d,e,g,t,h,B),f.paintRight(a,b,c,d,e,g,H,h,A),f.lineSEInner(a,b,c,d,e,g,H,h,l,A),f.paintRightInner(a,b,c,d,e,g,t,h,l,B,C),a.close(),a.fillAndStroke()):"frame"!=r?(a.begin(),f.moveSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),"double"==r&&
+(f.moveSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A)),a.stroke()):(a.begin(),f.moveSE(a,b,c,d,e,g,H,h,C),f.paintBottom(a,b,c,d,e,g,v,h,q),f.lineSWInner(a,b,c,d,e,g,v,h,l,q),f.paintBottomInner(a,b,c,d,e,g,H,h,l,C,A),a.close(),a.fillAndStroke()):"frame"!=r?(a.begin(),f.moveSW(a,b,c,d,e,g,u,h,A),f.paintLeft(a,b,c,d,e,g,u,h,B),"double"==r&&(f.moveNWInner(a,b,c,d,e,g,u,h,l,B,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q)),a.stroke()):(a.begin(),f.moveSW(a,b,c,d,e,g,u,h,A),f.paintLeft(a,
+b,c,d,e,g,u,h,B),f.lineNWInner(a,b,c,d,e,g,u,h,l,B,q),f.paintLeftInner(a,b,c,d,e,g,v,h,l,A,q),a.close(),a.fillAndStroke());a.begin();f.paintFolds(a,b,c,d,e,g,u,t,H,v,h,B,C,A,q);a.stroke()};M.prototype.moveNW=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.moveTo(0,0):a.moveTo(0,h)};M.prototype.moveNE=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.moveTo(d,0):a.moveTo(d-h,0)};M.prototype.moveSE=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&
+"square"==f||!k?a.moveTo(d,e):a.moveTo(d,e-h)};M.prototype.moveSW=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.moveTo(0,e):a.moveTo(h,e)};M.prototype.paintNW=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,h,0)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(h,0);else a.lineTo(0,0)};M.prototype.paintTop=
+function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.lineTo(d,0):a.lineTo(d-h,0)};M.prototype.paintNE=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,d,h)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d,h);else a.lineTo(d,0)};M.prototype.paintRight=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==
+g&&"square"==f||!k?a.lineTo(d,e):a.lineTo(d,e-h)};M.prototype.paintLeft=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.lineTo(0,0):a.lineTo(0,h)};M.prototype.paintSE=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,d-h,e)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d-h,e);else a.lineTo(d,
+e)};M.prototype.paintBottom=function(a,b,c,d,e,f,g,h,k){"square"==g||"default"==g&&"square"==f||!k?a.lineTo(0,e):a.lineTo(h,e)};M.prototype.paintSW=function(a,b,c,d,e,f,g,h,k){if(k)if("rounded"==g||"default"==g&&"rounded"==f||"invRound"==g||"default"==g&&"invRound"==f){b=0;if("rounded"==g||"default"==g&&"rounded"==f)b=1;a.arcTo(h,h,0,0,b,0,e-h)}else("snip"==g||"default"==g&&"snip"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(0,e-h);else a.lineTo(0,e)};M.prototype.paintNWInner=function(a,b,c,
+d,e,f,g,h,k){if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,k,.5*k+h);else if("invRound"==g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,k,k+h);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(k,.5*k+h);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(k+h,k+h),a.lineTo(k,k+h)};M.prototype.paintTopInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(0,k):l&&!m?a.lineTo(k,0):l?"square"==g||"default"==g&&"square"==f?a.lineTo(k,k):"rounded"==g||"default"==g&&
+"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(h+.5*k,k):a.lineTo(h+k,k):a.lineTo(0,k):a.lineTo(0,0)};M.prototype.paintNEInner=function(a,b,c,d,e,f,g,h,k){if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,d-h-.5*k,k);else if("invRound"==g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,d-h-k,k);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(d-h-.5*k,k);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(d-h-k,h+k),a.lineTo(d-h-k,k)};M.prototype.paintRightInner=
+function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(d-k,0):l&&!m?a.lineTo(d,k):l?"square"==g||"default"==g&&"square"==f?a.lineTo(d-k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(d-k,h+.5*k):a.lineTo(d-k,h+k):a.lineTo(d-k,0):a.lineTo(d,0)};M.prototype.paintLeftInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(k,e):l&&!m?a.lineTo(0,e-k):l?"square"==g||"default"==g&&"square"==f?a.lineTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==
+g&&"snip"==f?a.lineTo(k,e-h-.5*k):a.lineTo(k,e-h-k):a.lineTo(k,e):a.lineTo(0,e)};M.prototype.paintSEInner=function(a,b,c,d,e,f,g,h,k){if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,d-k,e-h-.5*k);else if("invRound"==g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,d-k,e-h-k);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(d-k,e-h-.5*k);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(d-h-k,e-h-k),a.lineTo(d-k,e-h-k)};M.prototype.paintBottomInner=function(a,b,c,d,
+e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(d,e-k):l&&!m?a.lineTo(d-k,e):"square"==g||"default"==g&&"square"==f||!l?a.lineTo(d-k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(d-h-.5*k,e-k):a.lineTo(d-h-k,e-k):a.lineTo(d,e)};M.prototype.paintSWInner=function(a,b,c,d,e,f,g,h,k,l){if(!l)a.lineTo(k,e);else if("square"==g||"default"==g&&"square"==f)a.lineTo(k,e-k);else if("rounded"==g||"default"==g&&"rounded"==f)a.arcTo(h-.5*k,h-.5*k,0,0,0,h+.5*k,e-k);else if("invRound"==
+g||"default"==g&&"invRound"==f)a.arcTo(h+k,h+k,0,0,1,h+k,e-k);else if("snip"==g||"default"==g&&"snip"==f)a.lineTo(h+.5*k,e-k);else if("fold"==g||"default"==g&&"fold"==f)a.lineTo(k+h,e-h-k),a.lineTo(k+h,e-k)};M.prototype.moveSWInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.moveTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(k,
+e-h-k):a.moveTo(0,e-k)};M.prototype.lineSWInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.lineTo(k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(k,e-h-k):a.lineTo(0,e-k)};M.prototype.moveSEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.moveTo(d-k,e-k):"rounded"==g||"default"==g&&"rounded"==
+f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(d-k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(d-k,e-h-k):a.moveTo(d-k,e)};M.prototype.lineSEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f?a.lineTo(d-k,e-k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(d-k,e-h-.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d-k,e-h-k):a.lineTo(d-
+k,e)};M.prototype.moveNEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f||l?a.moveTo(d-k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(d-k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(d-k,h+k):a.moveTo(d,k)};M.prototype.lineNEInner=function(a,b,c,d,e,f,g,h,k,l){l?"square"==g||"default"==g&&"square"==f||l?a.lineTo(d-k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==
+g&&"snip"==f?a.lineTo(d-k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(d-k,h+k):a.lineTo(d,k)};M.prototype.moveNWInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.moveTo(k,0):l&&!m?a.moveTo(0,k):"square"==g||"default"==g&&"square"==f?a.moveTo(k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.moveTo(k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.moveTo(k,h+k):a.moveTo(0,
+0)};M.prototype.lineNWInner=function(a,b,c,d,e,f,g,h,k,l,m){l||m?!l&&m?a.lineTo(k,0):l&&!m?a.lineTo(0,k):"square"==g||"default"==g&&"square"==f?a.lineTo(k,k):"rounded"==g||"default"==g&&"rounded"==f||"snip"==g||"default"==g&&"snip"==f?a.lineTo(k,h+.5*k):("invRound"==g||"default"==g&&"invRound"==f||"fold"==g||"default"==g&&"fold"==f)&&a.lineTo(k,h+k):a.lineTo(0,0)};M.prototype.paintFolds=function(a,b,c,d,e,f,g,h,k,l,m,n,p,q,u){if("fold"==f||"fold"==g||"fold"==h||"fold"==k||"fold"==l)("fold"==g||"default"==
+g&&"fold"==f)&&n&&u&&(a.moveTo(0,m),a.lineTo(m,m),a.lineTo(m,0)),("fold"==h||"default"==h&&"fold"==f)&&n&&p&&(a.moveTo(d-m,0),a.lineTo(d-m,m),a.lineTo(d,m)),("fold"==k||"default"==k&&"fold"==f)&&q&&p&&(a.moveTo(d-m,e),a.lineTo(d-m,e-m),a.lineTo(d,e-m)),("fold"==l||"default"==l&&"fold"==f)&&q&&u&&(a.moveTo(0,e-m),a.lineTo(m,e-m),a.lineTo(m,e))};mxCellRenderer.registerShape(M.prototype.cst.RECT2,M);M.prototype.constraints=null;mxUtils.extend(wa,mxConnector);wa.prototype.origPaintEdgeShape=wa.prototype.paintEdgeShape;
wa.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;wa.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),wa.prototype.origPaintEdgeShape.apply(this,[a,b,c])))};mxCellRenderer.registerShape("filledEdge",wa);"undefined"!==typeof StyleFormatPanel&&function(){var a=
StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),r=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-r/2,d.y-r/2+m/2);a.lineTo(d.x+r/2-3*m/2,d.y-3*r/2-m/2);a.stroke()}});mxMarker.addMarker("box",
function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),r=f*(g+k+1),n=d.x+m/2,p=d.y+r/2;d.x-=m;d.y-=r;return function(){a.begin();a.moveTo(n-m/2-r/2,p-r/2+m/2);a.lineTo(n-m/2+r/2,p-r/2-m/2);a.lineTo(n+r/2-3*m/2,p-3*r/2-m/2);a.lineTo(n-r/2-3*m/2,p-3*r/2+m/2);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),r=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-r/2,d.y-r/2+m/2);a.lineTo(d.x+r/2-3*m/2,d.y-3*r/2-m/2);a.moveTo(d.x-m/2+r/2,d.y-
@@ -3387,7 +3390,7 @@ r/2-m/2);a.lineTo(d.x-r/2-3*m/2,d.y-3*r/2+m/2);a.stroke()}});mxMarker.addMarker(
k+1),n=d.clone();d.x-=m;d.y-=r;return function(){a.begin();a.moveTo(n.x-r,n.y+m);a.quadTo(d.x-r,d.y+m,d.x,d.y);a.quadTo(d.x+r,d.y-m,n.x+r,n.y-m);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",
function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var r=e.clone();return function(){b.begin();b.moveTo(r.x,r.y);k?b.lineTo(r.x-f-g/a,r.y-g+f/a):b.lineTo(r.x+g/a-f,r.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Va=function(a,b,c){return Da(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=
Math.round(2*b)/a.view.scale-c})},Da=function(a,b,c,d,e){return T(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,r=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,
-r,h/r,m/r,l,g,d,f)})},va=function(a){return function(b){return[T(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",W.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",W.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,
+r,h/r,m/r,l,g,d,f)})},va=function(a){return function(b){return[T(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",X.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",X.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,
Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Wa=function(a){return function(b){return[T(b,["size"],function(b){var c=Math.max(0,Math.min(.5*b.height,parseFloat(mxUtils.getValue(this.state.style,"size",a))));return new mxPoint(b.x,b.y+c)},function(a,b){this.state.style.size=Math.max(0,b.y-a.y)},!0)]}},Qa=function(a,b,c){return function(d){var e=[T(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+
d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)},!1)];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(sa(d));return e}},Ia=function(a,b,c,d,e){c=null!=c?c:.5;return function(f){var g=[T(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(.5*b.width,
d*(c?1:b.width))),b.getCenterY())},function(a,b,d){a=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/a.width));this.state.style.size=a},!1,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(sa(f));return g}},Ta=function(a,b,c){a=null!=a?a:.5;return function(d){var e=[T(d,["size"],function(d){var e=null!=c?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,f=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
@@ -3411,36 +3414,36 @@ c=Math.max(1.5*U.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.
"size",D.prototype.size));return b?new mxPoint(a.x+c,a.y+a.height/4):new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,b){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*a.width,b.x-a.x)):Math.max(0,Math.min(.5,(b.x-a.x)/a.width));this.state.style.size=c},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b},cross:function(a){return[T(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 c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[T(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-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))))})]},note2:function(a){return[T(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",h.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=[T(a,["size"],function(a){var b=
-Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ha.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(sa(a));return b},dataStorage:function(a){return[T(a,["size"],function(a){var b="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),c=parseFloat(mxUtils.getValue(this.state.style,"size",b?Y.prototype.fixedSize:
-Y.prototype.size));return new mxPoint(a.x+a.width-c*(b?1:a.width),a.getCenterY())},function(a,b){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(a.width,a.x+a.width-b.x)):Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width));this.state.style.size=c},!1)]},callout:function(a){var b=[T(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),c=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+c*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),T(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),T(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position))),d=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,
-c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",z.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b},internalStorage:function(a){var b=[T(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ba.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",ba.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b},module:function(a){return[T(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",ea.prototype.jettyWidth))),c=Math.max(0,Math.min(a.height,
+Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ha.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(sa(a));return b},dataStorage:function(a){return[T(a,["size"],function(a){var b="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),c=parseFloat(mxUtils.getValue(this.state.style,"size",b?Z.prototype.fixedSize:
+Z.prototype.size));return new mxPoint(a.x+a.width-c*(b?1:a.width),a.getCenterY())},function(a,b){var c="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(a.width,a.x+a.width-b.x)):Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width));this.state.style.size=c},!1)]},callout:function(a){var b=[T(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",y.prototype.position)));mxUtils.getValue(this.state.style,"base",y.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",y.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),T(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",y.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),T(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",y.prototype.base)));return new mxPoint(a.x+Math.min(a.width,
+c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b},internalStorage:function(a){var b=[T(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+"dy",ca.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(sa(a));return b},module:function(a){return[T(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",ea.prototype.jettyWidth))),c=Math.max(0,Math.min(a.height,
mxUtils.getValue(this.state.style,"jettyHeight",ea.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*c)},function(a,b){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y))/2)})]},corner:function(a){return[T(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",fa.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
"dy",fa.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},tee:function(a){return[T(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ia.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ia.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,
b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},singleArrow:va(1),doubleArrow:va(.5),folder:function(a){return[T(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,
"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},document:function(a){return[T(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",u.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[T(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",v.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)]},isoCube2:function(a){return[T(a,
-["isoAngle"],function(a){var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",g.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(b),.5*a.height))},function(a,b){this.state.style.isoAngle=Math.max(0,50*(b.y-a.y)/a.height)},!0)]},cylinder2:Wa(l.prototype.size),cylinder3:Wa(m.prototype.size),offPageConnector:function(a){return[T(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));
+"size",t.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[T(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",v.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)]},isoCube2:function(a){return[T(a,
+["isoAngle"],function(a){var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",g.isoAngle))))*Math.PI/200;return new mxPoint(a.x,a.y+Math.min(a.width*Math.tan(b),.5*a.height))},function(a,b){this.state.style.isoAngle=Math.max(0,50*(b.y-a.y)/a.height)},!0)]},cylinder2:Wa(l.prototype.size),cylinder3:Wa(m.prototype.size),offPageConnector:function(a){return[T(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.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)]},"mxgraph.basic.rect":function(a){var b=[Graph.createHandle(a,["size"],function(a){var b=Math.max(0,Math.min(a.width/2,a.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(a.x+b,a.y+b)},function(a,b){this.state.style.size=Math.round(100*Math.max(0,Math.min(a.height/2,a.width/2,b.x-a.x)))/100})];a=Graph.createHandle(a,
-["indent"],function(a){var b=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(a.x+.75*a.width,a.y+b*a.height/200)},function(a,b){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(b.y-a.y)/a.height)))/100});b.push(a);return b},step:Ia(I.prototype.size,!0,null,!0,I.prototype.fixedSize),hexagon:Ia(K.prototype.size,!0,.5,!0,K.prototype.fixedSize),curlyBracket:Ia(A.prototype.size,!1),display:Ia(za.prototype.size,!1),cube:Qa(1,
-c.prototype.size,!1),card:Qa(.5,t.prototype.size,!0),loopLimit:Qa(.5,V.prototype.size,!0),trapezoid:Ta(.5,w.prototype.size,w.prototype.fixedSize),parallelogram:Ta(1,x.prototype.size,x.prototype.fixedSize)};Graph.createHandle=T;Graph.handleFactory=Ja;var bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=bb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&
+["indent"],function(a){var b=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(a.x+.75*a.width,a.y+b*a.height/200)},function(a,b){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(b.y-a.y)/a.height)))/100});b.push(a);return b},step:Ia(I.prototype.size,!0,null,!0,I.prototype.fixedSize),hexagon:Ia(K.prototype.size,!0,.5,!0,K.prototype.fixedSize),curlyBracket:Ia(z.prototype.size,!1),display:Ia(za.prototype.size,!1),cube:Qa(1,
+b.prototype.size,!1),card:Qa(.5,u.prototype.size,!0),loopLimit:Qa(.5,V.prototype.size,!0),trapezoid:Ta(.5,w.prototype.size,w.prototype.fixedSize),parallelogram:Ta(1,x.prototype.size,x.prototype.fixedSize)};Graph.createHandle=T;Graph.handleFactory=Ja;var bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=bb.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=Ja[b];null==b&&null!=this.state.shape&&this.state.shape.isRoundable()&&(b=Ja[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=Ja[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ka=new mxPoint(1,0),La=new mxPoint(1,0),va=mxUtils.toRadians(-30),Ka=mxUtils.getRotatedPoint(Ka,Math.cos(va),Math.sin(va)),va=mxUtils.toRadians(-150),La=mxUtils.getRotatedPoint(La,Math.cos(va),Math.sin(va));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==
h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=Ka.x,l=Ka.y,m=La.x,n=La.y,r="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=p.x;var d=b-p.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);r?(c&&(p=new mxPoint(p.x+k*b,p.y+l*b),e.push(p)),p=new mxPoint(p.x+m*a,p.y+n*a)):(c&&(p=new mxPoint(p.x+m*a,p.y+n*a),e.push(p)),p=new mxPoint(p.x+k*b,p.y+l*b));e.push(p)};var p=h;null==
-d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var cb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return cb.apply(this,arguments)};e.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-
+d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var cb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return cb.apply(this,arguments)};e.prototype.constraints=[];c.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-
d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};g.prototype.getConstraints=
function(a,b,c){a=[];var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,d=Math.min(b*Math.tan(d),.5*c);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));return a};z.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));return a};y.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,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))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,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-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};t.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,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+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};c.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.style,
+.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};u.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,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+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};b.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,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-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));return a};m.prototype.getConstraints=function(a,b,c){a=[];b=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-b));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b+.5*(.5*c-b)));a.push(new mxConnectionConstraint(new mxPoint(1,
@@ -3448,12 +3451,12 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim
function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};ba.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxEllipse.prototype.constraints;Ea.prototype.constraints=mxEllipse.prototype.constraints;
+0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};ca.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxEllipse.prototype.constraints;Ea.prototype.constraints=mxEllipse.prototype.constraints;
Ba.prototype.constraints=mxEllipse.prototype.constraints;Ga.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;Ha.prototype.constraints=mxRectangleShape.prototype.constraints;za.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};ea.prototype.getConstraints=function(a,b,c){b=parseFloat(mxUtils.getValue(a,
"jettyWidth",ea.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",ea.prototype.jettyHeight));var d=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,3.5*a))];c>5*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,b));c>8*a&&d.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,b));c>15*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return d};V.prototype.constraints=mxRectangleShape.prototype.constraints;ca.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),!1,null,b));c>15*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return d};V.prototype.constraints=mxRectangleShape.prototype.constraints;W.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)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
@@ -3464,154 +3467,155 @@ Ba.prototype.constraints=mxEllipse.prototype.constraints;Ga.prototype.constraint
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)];x.prototype.constraints=mxRectangleShape.prototype.constraints;w.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+.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)];x.prototype.constraints=mxRectangleShape.prototype.constraints;w.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(0,.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;ia.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*b+.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};fa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return a};ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];W.prototype.getConstraints=
+1),!1));return a};ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];X.prototype.getConstraints=
function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};ra.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",W.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",W.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};ra.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",X.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",X.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};ya.prototype.getConstraints=
function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(c-e)/2,f=d+e,g=(b-e)/2,e=g+e;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};R.prototype.constraints=null;M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};R.prototype.constraints=null;N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)];aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(a){d.escape();a=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),a);null!=a&&d.setSelectionCells(a)}function c(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var a=d.getSelectionCells(),b=0;b<a.length;b++)d.cellLabelChanged(a[b],"")}finally{d.getModel().endUpdate()}}}var b=this.editorUi,e=b.editor,d=e.graph,f=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(b.getUrl())});
-this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("smartFit",function(){d.popupMenuHandler.hideMenu();var a=d.view.scale,c=d.view.translate.x,e=d.view.translate.y;b.actions.get("resetView").funct();1E-5>Math.abs(a-d.view.scale)&&c==d.view.translate.x&&e==d.view.translate.y&&b.actions.get(d.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){d.isEnabled()&&(d.isSelectionEmpty()?b.actions.get("smartFit").funct():
-d.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(n){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+n.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
-null})}).isEnabled=f;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=f;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=f;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,
-320,240,!0,!0)}).isEnabled=f;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var a=null;try{a=b.copyXml(),
-null!=a&&d.removeCells(a,!1)}catch(l){}null==a&&mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{b.copyXml()}catch(g){}try{mxClipboard.copy(d)}catch(g){b.handleError(g)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=!1;try{Editor.enableNativeCipboard&&(b.readGraphModelFromClipboard(function(a){if(null!=a){d.getModel().beginUpdate();try{b.pasteXml(a,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),
-a=!0)}catch(l){}a||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){function c(a){if(null!=a){for(var b=!0,c=0;c<a.length&&b;c++)b=b&&d.model.isEdge(a[c]);var e=d.view.translate,c=d.view.scale,f=e.x,g=e.y,e=null;if(1==a.length&&b){var h=d.getCellGeometry(a[0]);null!=h&&(e=h.getTerminalPoint(!0))}e=null!=e?e:d.getBoundingBoxFromGeometry(a,b);null!=e&&(b=Math.round(d.snap(d.popupMenuHandler.triggerX/c-f)),c=Math.round(d.snap(d.popupMenuHandler.triggerY/
-c-g)),d.cellsMoved(a,b-e.x,c-e.y))}}function e(){d.getModel().beginUpdate();try{c(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){a=!1;try{Editor.enableNativeCipboard&&(b.readGraphModelFromClipboard(function(a){if(null!=a){d.getModel().beginUpdate();try{c(b.pasteXml(a,!0))}finally{d.getModel().endUpdate()}}else e()}),a=!0)}catch(n){}a||e()}});this.addAction("copySize",function(){var a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&
-(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{for(var a=d.getResizableCells(d.getSelectionCells()),c=0;c<a.length;c++)if(d.getModel().isVertex(a[c])){var e=d.getCellGeometry(a[c]);null!=e&&(e=e.clone(),e.width=b.copiedSize.width,e.height=b.copiedSize.height,d.getModel().setGeometry(a[c],e))}}finally{d.getModel().endUpdate()}}},
-null,null,"Alt+Shift+V");this.addAction("copyData",function(){var a=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&null!=a&&(a=a.cloneValue(),null==a||isNaN(a.nodeType)||(b.copiedValue=a))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(a,c){function e(b,c){var e=f.getValue(b);c=b.cloneValue(c);c.removeAttribute("placeholders");null==e||isNaN(e.nodeType)||c.setAttribute("placeholders",e.getAttribute("placeholders"));null!=a&&mxEvent.isShiftDown(a)||c.setAttribute("label",
-d.convertValueToString(b));f.setValue(b,c)}a=null!=c?c:a;var f=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedValue){f.beginUpdate();try{var g=d.getEditableCells(d.getSelectionCells());if(0==g.length)e(f.getRoot(),b.copiedValue);else for(var h=0;h<g.length;h++)e(g[h],b.copiedValue)}finally{f.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(b,d){b=null!=d?d:b;null!=b&&mxEvent.isShiftDown(b)?c():a(null!=b&&(mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||
-mxEvent.isAltDown(b)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){c()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(g){b.handleError(g)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(a,b){a=null!=b?b:a;d.turnShapes(d.getResizableCells(d.getSelectionCells()),
-null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.addSelectionCells(d.getEdges(a))}));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.getSelectionCells(),b=d.getCurrentCellStyle(d.getSelectionCell()),c=1==mxUtils.getValue(b,mxConstants.STYLE_EDITABLE,1)?0:1;d.setCellStyles(mxConstants.STYLE_MOVABLE,c,a);d.setCellStyles(mxConstants.STYLE_RESIZABLE,c,a);d.setCellStyles(mxConstants.STYLE_ROTATABLE,c,a);d.setCellStyles(mxConstants.STYLE_DELETABLE,
-c,a);d.setCellStyles(mxConstants.STYLE_EDITABLE,c,a);d.setCellStyles("connectable",c,a)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",
-function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(a){d.orderCells(!1,null,!0)});this.addAction("sendBackward",function(a){d.orderCells(!0,null,!0)});this.addAction("group",function(){if(d.isEnabled()){var a=mxUtils.sortCells(d.getSelectionCells(),!0);1!=a.length||d.isTable(a[0])||
-d.isTableRow(a[0])?(a=d.getCellsForGroup(a),1<a.length&&d.setSelectionCell(d.groupCells(null,0,a))):d.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(d.isEnabled()){var a=d.getEditableCells(d.getSelectionCells());d.model.beginUpdate();try{var b=d.ungroupCells();if(null!=a)for(var c=0;c<a.length;c++)d.model.contains(a[c])&&(0==d.model.getChildCount(a[c])&&d.model.isVertex(a[c])&&d.setCellStyles("container","0",[a[c]]),b.push(a[c]))}finally{d.model.endUpdate()}0<
-b.length&&d.setSelectionCells(b)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(d.isEnabled()){var a=d.getSelectionCells();if(null!=a){for(var b=[],c=0;c<a.length;c++)d.isTableRow(a[c])||d.isTableCell(a[c])||b.push(a[c]);d.removeCellsFromParent(b)}}});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();b.showDataDialog(a)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=d.getSelectionCell();if(d.isEnabled()&&null!=a&&d.isCellEditable(a)){var c="";if(mxUtils.isNode(a.value)){var e=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&a.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(e=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==e&&(e=a.value.getAttribute("tooltip"));null!=e&&(c=e)}c=new TextareaDialog(b,mxResources.get("editTooltip")+":",c,function(b){d.setTooltipForCell(a,
-b)});b.showDialog(c.container,320,200,!0,!0);c.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&d.openLink(a)});this.addAction("editLink...",function(){var a=d.getSelectionCell();if(d.isEnabled()&&null!=a&&d.isCellEditable(a)){var c=d.getLinkForCell(a)||"";b.showLinkDialog(c,mxResources.get("apply"),function(b,c,e){b=mxUtils.trim(b);d.setLinkForCell(a,0<b.length?b:null);d.setAttributeForCell(a,"linkTarget",e)},!0,d.getLinkTargetForCell(a))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=f;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,b,c){a=mxUtils.trim(a);if(0<a.length){var e=null,f=d.getLinkTitle(a);null!=b&&0<b.length&&(e=b[0].iconUrl,
-f=b[0].name||b[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));b=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=e?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+e:"spacing=10;"));b.vertex=!0;e=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([b],!0));b.geometry.x=e.x;b.geometry.y=e.y;d.setAttributeForCell(b,"linkTarget",c);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())}},!0)})).isEnabled=f;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var a=d.getSelectedElement(),c=d.getParentByName(a,"A",d.cellEditor.textarea),e="";if(null==c&&null!=a&&null!=a.getElementsByTagName)for(var f=a.getElementsByTagName("a"),
-h=0;h<f.length&&null==c;h++)f[h].textContent==a.textContent&&(c=f[h]);null!=c&&"A"==c.nodeName&&(e=c.getAttribute("href")||"",d.selectNode(c));var k=d.cellEditor.saveSelection();b.showLinkDialog(e,mxResources.get("apply"),mxUtils.bind(this,function(a){d.cellEditor.restoreSelection(k);null!=a&&d.insertLink(a)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=f;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();
-try{for(var b=0;b<a.length;b++){var c=a[b];0<d.getModel().getChildCount(c)?d.updateGroupBounds([c],0,!0):d.updateCellSize(c)}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){d.stopEditing();var a=d.getCommonStyle(d.getSelectionCells()),a="1"==mxUtils.getValue(a,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var c=d.getEditableCells(d.getSelectionCells()),e=0;e<c.length;e++)if(state=d.getView().getState(c[e]),null!=state){var f=
-mxUtils.getValue(state.style,"html","0");if("1"==f&&null==a){var h=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(h=h.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var k=document.createElement("div");k.innerHTML=d.sanitizeHtml(h);h=mxUtils.extractTextWithWhitespace(k.childNodes);d.cellLabelChanged(state.cell,h);d.setCellStyles("html",a,[c[e]])}else"0"==f&&"1"==a&&(h=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
-"1")&&(h=h.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(h)),d.setCellStyles("html",a,[c[e]]))}b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",c))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),b="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",
-function(){var a="0",c=d.getView().getState(d.getSelectionCell());null!=c&&(a=c.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(a){d.isFastZoomEnabled()?
-d.lazyZoom(!0,!0,b.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,b.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),c=d.view.translate,e=d.view.scale;a.x=a.x/e-c.x;a.y=a.y/e-c.y;a.width/=e;a.height/=e;null!=d.backgroundImage&&
-a.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height));0==a.width||0==a.height?(d.zoomTo(1),b.resetScrollbars()):(c=Editor.fitWindowBorders,null!=c&&(a.x-=c.x,a.y-=c.y,a.width+=c.width+c.x,a.height+=c.height+c.y),d.fitWindow(a))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/b,(d.container.clientHeight-
-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/b,(d.container.clientHeight-10)/a.height/
-b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=
-d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,
-Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&(a=new ChangePageSetup(b,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var k=null,k=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());
-b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");k.setToggleAction(!0);k.setSelectedCallback(function(){return d.isGridEnabled()});k.setEnabled(!1);k=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});k.setEnabled(!1);k=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled());
-b.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});k=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.foldingEnabled});k.isEnabled=f;k=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});k.setToggleAction(!0);
-k.setSelectedCallback(function(){return d.scrollbars});k=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));k.setToggleAction(!0);k.setSelectedCallback(function(){return d.pageVisible});k=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");k.setToggleAction(!0);k.setSelectedCallback(function(){return d.connectionArrowsEnabled});k=
-this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");k.setToggleAction(!0);k.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});k=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});
-k.isEnabled=f;k=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});k.setToggleAction(!0);k.setSelectedCallback(function(){return b.editor.autosave});k.isEnabled=f;k.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var h=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){h||(b.showDialog((new AboutDialog(b)).container,
-320,280,!0,!0,function(){h=!1}),h=!0)}));k=mxUtils.bind(this,function(a,b,c,e){return this.addAction(a,function(){if(null!=c&&d.cellEditor.isContentEditing())c();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b,a);(b&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(a,function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
-d.updateLabelElements(a,function(a){a.style.fontStyle=null;"I"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(a,function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});for(var e=0;e<a.length;e++)0==d.model.getChildCount(a[e])&&d.autoSizeCell(a[e],!1)}finally{d.getModel().endUpdate()}}},null,null,e)});k("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");k("italic",
-mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");k("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});
-this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",
-function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),
-b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",
-d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,
-"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),c=d.getCurrentCellStyle(a[0]),e="1"==mxUtils.getValue(c,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,
-e);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[e,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
-"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=d.view.getState(d.getSelectionCell()),c="1";null!=a&&null!=d.getFoldingImage(a)&&(c="0");d.setCellStyles("collapsible",c);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[c],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getEditableCells(d.getSelectionCells());if(null!=a&&0<a.length){var b=
-d.getModel(),b=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(b){null!=b&&d.setCellStyle(mxUtils.trim(b),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()},
-null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var c=d.view.translate,f=d.view.scale,h=c.x,c=c.y,a=d.getModel().getParent(a),k=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=k;)h+=k.x,c+=k.y,a=d.getModel().getParent(a),k=d.getCellGeometry(a);h=Math.round(d.snap(d.popupMenuHandler.triggerX/f-h));f=Math.round(d.snap(d.popupMenuHandler.triggerY/
-f-c));b.addPointAt(b.state,h,f)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(a,b){a=null!=b?b:a;var c=d.getSelectionCells();if(null!=c){c=d.getEditableCells(d.addAllEdges(c));d.getModel().beginUpdate();try{for(var e=0;e<c.length;e++){var f=c[e];if(d.getModel().isEdge(f)){var g=d.getCellGeometry(f);mxEvent.isShiftDown(a)?(d.setCellStyles(mxConstants.STYLE_EXIT_X,
-null,[f]),d.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[f]),d.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[f]),d.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[f])):null!=g&&(g=g.clone(),g.points=null,g.x=0,g.y=0,g.offset=null,d.getModel().setGeometry(f,g))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");k=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");k=this.addAction("superscript",
-mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",c=d.getView().getState(d.getSelectionCell()),e="";null!=c&&(e=c.style[mxConstants.STYLE_IMAGE]||e);var f=d.cellEditor.saveSelection();b.showImageDialog(a,e,function(a,b,c){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(f),
-d.insertImage(a,b,c);else{var e=d.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;d.getModel().beginUpdate();try{if(0==e.length){var e=[d.insertVertex(d.getDefaultParent(),null,"",0,0,b,c,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],h=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(e,!0));e[0].geometry.x=h.x;e[0].geometry.y=h.y;g=e;d.fireEvent(new mxEventObject("cellsInserted","cells",g))}d.setCellStyles(mxConstants.STYLE_IMAGE,
-0<a.length?a:null,e);var k=d.getCurrentCellStyle(e[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==d.getSelectionCount()&&null!=b&&null!=c){var l=e[0],m=d.getModel().getGeometry(l);null!=m&&(m=m.clone(),m.width=b,m.height=c,d.getModel().setGeometry(l,m))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},
-d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=f;k=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers")),
-this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));k=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));
-k=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
-null,null,Editor.ctrlKey+"+Shift+O");k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,c,b,e,d){var f;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),f=mxResources.get(a)+"..."):f=mxResources.get(a);return this.put(a,new Action(f,c,b,e,d))};Actions.prototype.put=function(a,c){return this.actions[a]=c};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,c,b,e,d){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(c);this.enabled=null!=b?b:!0;this.iconCls=e;this.shortcut=d;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};
+Actions.prototype.init=function(){function a(a){c.escape();a=c.deleteCells(c.getDeletableCells(c.getSelectionCells()),a);null!=a&&c.setSelectionCells(a)}function b(){if(!c.isSelectionEmpty()){c.getModel().beginUpdate();try{for(var a=c.getSelectionCells(),b=0;b<a.length;b++)c.cellLabelChanged(a[b],"")}finally{c.getModel().endUpdate()}}}var d=this.editorUi,e=d.editor,c=e.graph,f=function(){return Action.prototype.isEnabled.apply(this,arguments)&&c.isEnabled()};this.addAction("new...",function(){c.openLink(d.getUrl())});
+this.addAction("open...",function(){window.openNew=!0;window.openKey="open";d.openFile()});this.addAction("smartFit",function(){c.popupMenuHandler.hideMenu();var a=c.view.scale,b=c.view.translate.x,e=c.view.translate.y;d.actions.get("resetView").funct();1E-5>Math.abs(a-c.view.scale)&&b==c.view.translate.x&&e==c.view.translate.y&&d.actions.get(c.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){c.isEnabled()&&(c.isSelectionEmpty()?d.actions.get("smartFit").funct():
+c.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){d.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(n){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+n.message)}}));d.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
+null})}).isEnabled=f;this.addAction("save",function(){d.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=f;this.addAction("saveAs...",function(){d.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=f;this.addAction("export...",function(){d.showDialog((new ExportDialog(d)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(d);d.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){d.showDialog((new PageSetupDialog(d)).container,
+320,240,!0,!0)}).isEnabled=f;this.addAction("print...",function(){d.showDialog((new PrintDialog(d)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(c,null,10,10)});this.addAction("undo",function(){d.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){d.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var a=null;try{a=d.copyXml(),
+null!=a&&c.removeCells(a,!1)}catch(l){}null==a&&mxClipboard.cut(c)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{d.copyXml()}catch(g){}try{mxClipboard.copy(c)}catch(g){d.handleError(g)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){var a=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(a){if(null!=a){c.getModel().beginUpdate();try{d.pasteXml(a,!0)}finally{c.getModel().endUpdate()}}else mxClipboard.paste(c)}),
+a=!0)}catch(l){}a||mxClipboard.paste(c)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){function b(a){if(null!=a){for(var b=!0,d=0;d<a.length&&b;d++)b=b&&c.model.isEdge(a[d]);var e=c.view.translate,d=c.view.scale,f=e.x,g=e.y,e=null;if(1==a.length&&b){var h=c.getCellGeometry(a[0]);null!=h&&(e=h.getTerminalPoint(!0))}e=null!=e?e:c.getBoundingBoxFromGeometry(a,b);null!=e&&(b=Math.round(c.snap(c.popupMenuHandler.triggerX/d-f)),d=Math.round(c.snap(c.popupMenuHandler.triggerY/
+d-g)),c.cellsMoved(a,b-e.x,d-e.y))}}function e(){c.getModel().beginUpdate();try{b(mxClipboard.paste(c))}finally{c.getModel().endUpdate()}}if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){a=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(a){if(null!=a){c.getModel().beginUpdate();try{b(d.pasteXml(a,!0))}finally{c.getModel().endUpdate()}}else e()}),a=!0)}catch(n){}a||e()}});this.addAction("copySize",function(){var a=c.getSelectionCell();c.isEnabled()&&null!=a&&c.getModel().isVertex(a)&&
+(a=c.getCellGeometry(a),null!=a&&(d.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(c.isEnabled()&&!c.isSelectionEmpty()&&null!=d.copiedSize){c.getModel().beginUpdate();try{for(var a=c.getResizableCells(c.getSelectionCells()),b=0;b<a.length;b++)if(c.getModel().isVertex(a[b])){var e=c.getCellGeometry(a[b]);null!=e&&(e=e.clone(),e.width=d.copiedSize.width,e.height=d.copiedSize.height,c.getModel().setGeometry(a[b],e))}}finally{c.getModel().endUpdate()}}},
+null,null,"Alt+Shift+V");this.addAction("copyData",function(){var a=c.getSelectionCell()||c.getModel().getRoot();c.isEnabled()&&null!=a&&(a=a.cloneValue(),null==a||isNaN(a.nodeType)||(d.copiedValue=a))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(a,b){function e(b,d){var e=f.getValue(b);d=b.cloneValue(d);d.removeAttribute("placeholders");null==e||isNaN(e.nodeType)||d.setAttribute("placeholders",e.getAttribute("placeholders"));null!=a&&mxEvent.isShiftDown(a)||d.setAttribute("label",
+c.convertValueToString(b));f.setValue(b,d)}a=null!=b?b:a;var f=c.getModel();if(c.isEnabled()&&!c.isSelectionEmpty()&&null!=d.copiedValue){f.beginUpdate();try{var g=c.getEditableCells(c.getSelectionCells());if(0==g.length)e(f.getRoot(),d.copiedValue);else for(var h=0;h<g.length;h++)e(g[h],d.copiedValue)}finally{f.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(c,d){c=null!=d?d:c;null!=c&&mxEvent.isShiftDown(c)?b():a(null!=c&&(mxEvent.isControlDown(c)||mxEvent.isMetaDown(c)||
+mxEvent.isAltDown(c)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{c.setSelectionCells(c.duplicateCells()),c.scrollCellToVisible(c.getSelectionCell())}catch(g){d.handleError(g)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(a,b){a=null!=b?b:a;c.turnShapes(c.getResizableCells(c.getSelectionCells()),
+null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(a){a=c.getSelectionCell();c.isEnabled()&&null!=a&&c.addSelectionCells(c.getEdges(a))}));this.addAction("selectVertices",function(){c.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){c.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){c.selectAll(null,!0)},null,
+null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){c.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!c.isSelectionEmpty()){c.getModel().beginUpdate();try{var a=c.getSelectionCells(),b=c.getCurrentCellStyle(c.getSelectionCell()),d=1==mxUtils.getValue(b,mxConstants.STYLE_EDITABLE,1)?0:1;c.setCellStyles(mxConstants.STYLE_MOVABLE,d,a);c.setCellStyles(mxConstants.STYLE_RESIZABLE,d,a);c.setCellStyles(mxConstants.STYLE_ROTATABLE,d,a);c.setCellStyles(mxConstants.STYLE_DELETABLE,
+d,a);c.setCellStyles(mxConstants.STYLE_EDITABLE,d,a);c.setCellStyles("connectable",d,a)}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){c.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){c.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){c.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){c.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",
+function(){c.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){c.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){c.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(a){c.orderCells(!1,null,!0)});this.addAction("sendBackward",function(a){c.orderCells(!0,null,!0)});this.addAction("group",function(){if(c.isEnabled()){var a=mxUtils.sortCells(c.getSelectionCells(),!0);1!=a.length||c.isTable(a[0])||
+c.isTableRow(a[0])?(a=c.getCellsForGroup(a),1<a.length&&c.setSelectionCell(c.groupCells(null,0,a))):c.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(c.isEnabled()){var a=c.getEditableCells(c.getSelectionCells());c.model.beginUpdate();try{var b=c.ungroupCells();if(null!=a)for(var d=0;d<a.length;d++)c.model.contains(a[d])&&(0==c.model.getChildCount(a[d])&&c.model.isVertex(a[d])&&c.setCellStyles("container","0",[a[d]]),b.push(a[d]))}finally{c.model.endUpdate()}0<
+b.length&&c.setSelectionCells(b)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(c.isEnabled()){var a=c.getSelectionCells();if(null!=a){for(var b=[],d=0;d<a.length;d++)c.isTableRow(a[d])||c.isTableCell(a[d])||b.push(a[d]);c.removeCellsFromParent(b)}}});this.addAction("edit",function(){c.isEnabled()&&c.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=c.getSelectionCell()||c.getModel().getRoot();d.showDataDialog(a)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=c.getSelectionCell();if(c.isEnabled()&&null!=a&&c.isCellEditable(a)){var b="";if(mxUtils.isNode(a.value)){var e=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&a.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(e=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==e&&(e=a.value.getAttribute("tooltip"));null!=e&&(b=e)}b=new TextareaDialog(d,mxResources.get("editTooltip")+":",b,function(b){c.setTooltipForCell(a,
+b)});d.showDialog(b.container,320,200,!0,!0);b.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=c.getLinkForCell(c.getSelectionCell());null!=a&&c.openLink(a)});this.addAction("editLink...",function(){var a=c.getSelectionCell();if(c.isEnabled()&&null!=a&&c.isCellEditable(a)){var b=c.getLinkForCell(a)||"";d.showLinkDialog(b,mxResources.get("apply"),function(b,d,e){b=mxUtils.trim(b);c.setLinkForCell(a,0<b.length?b:null);c.setAttributeForCell(a,"linkTarget",e)},!0,c.getLinkTargetForCell(a))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(c.clearSelection(),d.actions.get("image").funct())})).isEnabled=f;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&d.showLinkDialog("",mxResources.get("insert"),function(a,b,d){a=mxUtils.trim(a);if(0<a.length){var e=null,f=c.getLinkTitle(a);null!=b&&0<b.length&&(e=b[0].iconUrl,
+f=b[0].name||b[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));b=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=e?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+e:"spacing=10;"));b.vertex=!0;e=c.getCenterInsertPoint(c.getBoundingBoxFromGeometry([b],!0));b.geometry.x=e.x;b.geometry.y=e.y;c.setAttributeForCell(b,"linkTarget",d);c.setLinkForCell(b,a);c.cellSizeUpdated(b,
+!0);c.getModel().beginUpdate();try{b=c.addCell(b),c.fireEvent(new mxEventObject("cellsInserted","cells",[b]))}finally{c.getModel().endUpdate()}c.setSelectionCell(b);c.scrollCellToVisible(c.getSelectionCell())}},!0)})).isEnabled=f;this.addAction("link...",mxUtils.bind(this,function(){if(c.isEnabled())if(c.cellEditor.isContentEditing()){var a=c.getSelectedElement(),b=c.getParentByName(a,"A",c.cellEditor.textarea),e="";if(null==b&&null!=a&&null!=a.getElementsByTagName)for(var f=a.getElementsByTagName("a"),
+h=0;h<f.length&&null==b;h++)f[h].textContent==a.textContent&&(b=f[h]);null!=b&&"A"==b.nodeName&&(e=b.getAttribute("href")||"",c.selectNode(b));var k=c.cellEditor.saveSelection();d.showLinkDialog(e,mxResources.get("apply"),mxUtils.bind(this,function(a){c.cellEditor.restoreSelection(k);null!=a&&c.insertLink(a)}))}else c.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=f;this.addAction("autosize",function(){var a=c.getSelectionCells();if(null!=a){c.getModel().beginUpdate();
+try{for(var b=0;b<a.length;b++){var d=a[b];0<c.getModel().getChildCount(d)?c.updateGroupBounds([d],0,!0):c.updateCellSize(d)}}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){c.stopEditing();var a=c.getCommonStyle(c.getSelectionCells()),a="1"==mxUtils.getValue(a,"html","0")?null:"1";c.getModel().beginUpdate();try{for(var b=c.getEditableCells(c.getSelectionCells()),e=0;e<b.length;e++)if(state=c.getView().getState(b[e]),null!=state){var f=
+mxUtils.getValue(state.style,"html","0");if("1"==f&&null==a){var h=c.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(h=h.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var k=document.createElement("div");k.innerHTML=c.sanitizeHtml(h);h=mxUtils.extractTextWithWhitespace(k.childNodes);c.cellLabelChanged(state.cell,h);c.setCellStyles("html",a,[b[e]])}else"0"==f&&"1"==a&&(h=mxUtils.htmlEntities(c.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
+"1")&&(h=h.replace(/\n/g,"<br/>")),c.cellLabelChanged(state.cell,c.sanitizeHtml(h)),c.setCellStyles("html",a,[b[e]]))}d.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",b))}finally{c.getModel().endUpdate()}});this.addAction("wordWrap",function(){var a=c.getView().getState(c.getSelectionCell()),b="wrap";c.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);c.setCellStyles(mxConstants.STYLE_WHITE_SPACE,b)});this.addAction("rotation",
+function(){var a="0",b=c.getView().getState(c.getSelectionCell());null!=b&&(a=b.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(d,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&c.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");d.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){c.zoomTo(1);d.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(a){c.isFastZoomEnabled()?
+c.lazyZoom(!0,!0,d.buttonZoomDelay):c.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){c.isFastZoomEnabled()?c.lazyZoom(!1,!0,d.buttonZoomDelay):c.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=c.isSelectionEmpty()?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),b=c.view.translate,e=c.view.scale;a.x=a.x/e-b.x;a.y=a.y/e-b.y;a.width/=e;a.height/=e;null!=c.backgroundImage&&
+a.add(new mxRectangle(0,0,c.backgroundImage.width,c.backgroundImage.height));0==a.width||0==a.height?(c.zoomTo(1),d.resetScrollbars()):(b=Editor.fitWindowBorders,null!=b&&(a.x-=b.x,a.y-=b.y,a.width+=b.width+b.x,a.height+=b.height+b.y),c.fitWindow(a))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();var a=c.pageFormat,b=c.pageScale;c.zoomTo(Math.floor(20*Math.min((c.container.clientWidth-10)/a.width/b,(c.container.clientHeight-
+10)/a.height/b))/20);mxUtils.hasScrollbars(c.container)&&(a=c.getPagePadding(),c.container.scrollTop=a.y*c.view.scale-1,c.container.scrollLeft=Math.min(a.x*c.view.scale,(c.container.scrollWidth-c.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();var a=c.pageFormat,b=c.pageScale;c.zoomTo(Math.floor(20*Math.min((c.container.clientWidth-10)/(2*a.width)/b,(c.container.clientHeight-10)/a.height/
+b))/20);mxUtils.hasScrollbars(c.container)&&(a=c.getPagePadding(),c.container.scrollTop=Math.min(a.y,(c.container.scrollHeight-c.container.clientHeight)/2),c.container.scrollLeft=Math.min(a.x,(c.container.scrollWidth-c.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();c.zoomTo(Math.floor(20*(c.container.clientWidth-10)/c.pageFormat.width/c.pageScale)/20);if(mxUtils.hasScrollbars(c.container)){var a=
+c.getPagePadding();c.container.scrollLeft=Math.min(a.x*c.view.scale,(c.container.scrollWidth-c.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*c.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&c.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,
+Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*c.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&(a=new ChangePageSetup(d,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,c.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var k=null,k=this.addAction("grid",function(){c.setGridEnabled(!c.isGridEnabled());
+d.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");k.setToggleAction(!0);k.setSelectedCallback(function(){return c.isGridEnabled()});k.setEnabled(!1);k=this.addAction("guides",function(){c.graphHandler.guidesEnabled=!c.graphHandler.guidesEnabled;d.fireEvent(new mxEventObject("guidesEnabledChanged"))});k.setToggleAction(!0);k.setSelectedCallback(function(){return c.graphHandler.guidesEnabled});k.setEnabled(!1);k=this.addAction("tooltips",function(){c.tooltipHandler.setEnabled(!c.tooltipHandler.isEnabled());
+d.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});k.setToggleAction(!0);k.setSelectedCallback(function(){return c.tooltipHandler.isEnabled()});k=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(d);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!c.foldingEnabled;c.model.execute(a)});k.setToggleAction(!0);k.setSelectedCallback(function(){return c.foldingEnabled});k.isEnabled=f;k=this.addAction("scrollbars",function(){d.setScrollbars(!d.hasScrollbars())});k.setToggleAction(!0);
+k.setSelectedCallback(function(){return c.scrollbars});k=this.addAction("pageView",mxUtils.bind(this,function(){d.setPageVisible(!c.pageVisible)}));k.setToggleAction(!0);k.setSelectedCallback(function(){return c.pageVisible});k=this.addAction("connectionArrows",function(){c.connectionArrowsEnabled=!c.connectionArrowsEnabled;d.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");k.setToggleAction(!0);k.setSelectedCallback(function(){return c.connectionArrowsEnabled});k=
+this.addAction("connectionPoints",function(){c.setConnectable(!c.connectionHandler.isEnabled());d.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");k.setToggleAction(!0);k.setSelectedCallback(function(){return c.connectionHandler.isEnabled()});k=this.addAction("copyConnect",function(){c.connectionHandler.setCreateTarget(!c.connectionHandler.isCreateTarget());d.fireEvent(new mxEventObject("copyConnectChanged"))});k.setToggleAction(!0);k.setSelectedCallback(function(){return c.connectionHandler.isCreateTarget()});
+k.isEnabled=f;k=this.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.autosave});k.isEnabled=f;k.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);c.openLink(RESOURCES_PATH+"/help"+a+".html")});var h=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){h||(d.showDialog((new AboutDialog(d)).container,
+320,280,!0,!0,function(){h=!1}),h=!0)}));k=mxUtils.bind(this,function(a,b,d,e){return this.addAction(a,function(){if(null!=d&&c.cellEditor.isContentEditing())d();else{c.stopEditing(!1);c.getModel().beginUpdate();try{var a=c.getEditableCells(c.getSelectionCells());c.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b,a);(b&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?c.updateLabelElements(a,function(a){a.style.fontWeight=null;"B"==a.nodeName&&c.replaceElement(a)}):(b&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
+c.updateLabelElements(a,function(a){a.style.fontStyle=null;"I"==a.nodeName&&c.replaceElement(a)}):(b&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&c.updateLabelElements(a,function(a){a.style.textDecoration=null;"U"==a.nodeName&&c.replaceElement(a)});for(var e=0;e<a.length;e++)0==c.model.getChildCount(a[e])&&c.autoSizeCell(a[e],!1)}finally{c.getModel().endUpdate()}}},null,null,e)});k("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");k("italic",
+mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");k("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){d.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){d.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){d.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});
+this.addAction("gradientColor...",function(){d.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){d.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){d.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",
+function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,null),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("dashed",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,"1"),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),
+d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("dotted",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,"1"),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",
+c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("sharp",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("rounded",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,
+"1"),c.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!c.isSelectionEmpty()&&c.isEnabled()){c.getModel().beginUpdate();try{var a=c.getSelectionCells(),b=c.getCurrentCellStyle(a[0]),e="1"==mxUtils.getValue(b,mxConstants.STYLE_ROUNDED,"0")?"0":"1";c.setCellStyles(mxConstants.STYLE_ROUNDED,
+e);c.setCellStyles(mxConstants.STYLE_CURVED,null);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[e,"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("curved",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,"1"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
+"values",["0","1"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=c.view.getState(c.getSelectionCell()),b="1";null!=a&&null!=c.getFoldingImage(a)&&(b="0");c.setCellStyles("collapsible",b);d.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[b],"cells",c.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=c.getEditableCells(c.getSelectionCells());if(null!=a&&0<a.length){var b=
+c.getModel(),b=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(b){null!=b&&c.setCellStyle(mxUtils.trim(b),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){c.isEnabled()&&!c.isSelectionEmpty()&&d.setDefaultStyle(c.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){c.isEnabled()&&d.clearDefaultStyle()},
+null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=c.getSelectionCell();if(null!=a&&c.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var d=c.view.translate,f=c.view.scale,h=d.x,d=d.y,a=c.getModel().getParent(a),k=c.getCellGeometry(a);c.getModel().isVertex(a)&&null!=k;)h+=k.x,d+=k.y,a=c.getModel().getParent(a),k=c.getCellGeometry(a);h=Math.round(c.snap(c.popupMenuHandler.triggerX/f-h));f=Math.round(c.snap(c.popupMenuHandler.triggerY/
+f-d));b.addPointAt(b.state,h,f)}}});this.addAction("removeWaypoint",function(){var a=d.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(a,b){a=null!=b?b:a;var d=c.getSelectionCells();if(null!=d){d=c.getEditableCells(c.addAllEdges(d));c.getModel().beginUpdate();try{for(var e=0;e<d.length;e++){var f=d[e];if(c.getModel().isEdge(f)){var g=c.getCellGeometry(f);mxEvent.isShiftDown(a)?(c.setCellStyles(mxConstants.STYLE_EXIT_X,
+null,[f]),c.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[f]),c.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[f]),c.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[f])):null!=g&&(g=g.clone(),g.points=null,g.x=0,g.y=0,g.offset=null,c.getModel().setGeometry(f,g))}}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+C");k=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");k=this.addAction("superscript",
+mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",b=c.getView().getState(c.getSelectionCell()),e="";null!=b&&(e=b.style[mxConstants.STYLE_IMAGE]||e);var f=c.cellEditor.saveSelection();d.showImageDialog(a,e,function(a,b,d){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(f),
+c.insertImage(a,b,d);else{var e=c.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;c.getModel().beginUpdate();try{if(0==e.length){var e=[c.insertVertex(c.getDefaultParent(),null,"",0,0,b,d,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],h=c.getCenterInsertPoint(c.getBoundingBoxFromGeometry(e,!0));e[0].geometry.x=h.x;e[0].geometry.y=h.y;g=e;c.fireEvent(new mxEventObject("cellsInserted","cells",g))}c.setCellStyles(mxConstants.STYLE_IMAGE,
+0<a.length?a:null,e);var k=c.getCurrentCellStyle(e[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?c.setCellStyles(mxConstants.STYLE_SHAPE,"image",e):0==a.length&&c.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==c.getSelectionCount()&&null!=b&&null!=d){var l=e[0],m=c.getModel().getGeometry(l);null!=m&&(m=m.clone(),m.width=b,m.height=d,c.getModel().setGeometry(l,m))}}finally{c.getModel().endUpdate()}null!=g&&(c.setSelectionCells(g),c.scrollCellToVisible(g[0]))}}},
+c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=f;k=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(d,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("layers")),
+this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));k=this.addAction("formatPanel",mxUtils.bind(this,function(){d.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return 0<d.formatWidth}));
+k=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(d,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
+null,null,Editor.ctrlKey+"+Shift+O");k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,d,e,c){var f;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),f=mxResources.get(a)+"..."):f=mxResources.get(a);return this.put(a,new Action(f,b,d,e,c))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,d,e,c){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=d?d:!0;this.iconCls=e;this.shortcut=c;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()};Menus=function(a){this.editorUi=a;this.menus={};this.init();mxClient.IS_SVG||((new Image).src=this.checkmarkImage)};Menus.prototype.defaultFont="Helvetica";Menus.prototype.defaultFontSize="12";Menus.prototype.defaultMenuItems="file edit view arrange extras help".split(" ");Menus.prototype.defaultFonts="Helvetica;Verdana;Times New Roman;Garamond;Comic Sans MS;Courier New;Georgia;Lucida Console;Tahoma".split(";");
-Menus.prototype.init=function(){var a=this.editorUi.editor.graph,c=mxUtils.bind(a,a.isEnabled);this.customFonts=[];this.customFontSizes=[];this.put("fontFamily",new Menu(mxUtils.bind(this,function(b,c){for(var d=mxUtils.bind(this,function(d){this.styleChange(b,d,[mxConstants.STYLE_FONTFAMILY],[d],null,c,function(){document.execCommand("fontname",!1,d)},function(){a.updateLabelElements(a.getSelectionCells(),function(b){b.removeAttribute("face");b.style.fontFamily=null;"PRE"==b.nodeName&&a.replaceElement(b,
-"div")})}).firstChild.nextSibling.style.fontFamily=d}),e=0;e<this.defaultFonts.length;e++)d(this.defaultFonts[e]);b.addSeparator(c);if(0<this.customFonts.length){for(e=0;e<this.customFonts.length;e++)d(this.customFonts[e]);b.addSeparator(c);b.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),c);b.addSeparator(c)}this.promptChange(b,mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,
-mxConstants.STYLE_FONTFAMILY,c,!0,mxUtils.bind(this,function(a){0>mxUtils.indexOf(this.customFonts,a)&&(this.customFonts.push(a),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(b,c){function d(d,e){return b.addItem(d,null,mxUtils.bind(this,function(){null!=a.cellEditor.textarea&&(a.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+e+">"))}),c)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML=
-'<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";d("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";d("","h3").firstChild.nextSibling.innerHTML='<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";d("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";d("","h5").firstChild.nextSibling.innerHTML='<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";d("",
-"h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";d("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";d("","blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(b,c){for(var d=[6,8,9,10,11,12,14,18,24,36,48,72],e=mxUtils.bind(this,function(d){this.styleChange(b,
-d,[mxConstants.STYLE_FONTSIZE],[d],null,c,function(){if(null!=a.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var b=a.cellEditor.textarea.getElementsByTagName("font"),c=0;c<b.length;c++)if("3"==b[c].getAttribute("size")){b[c].removeAttribute("size");b[c].style.fontSize=d+"px";break}}})}),k=0;k<d.length;k++)e(d[k]);b.addSeparator(c);if(0<this.customFontSizes.length){for(k=0;k<this.customFontSizes.length;k++)e(this.customFontSizes[k]);b.addSeparator(c);b.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){this.customFontSizes=[]}),c);b.addSeparator(c)}this.promptChange(b,mxResources.get("custom")+"...","(pt)","12",mxConstants.STYLE_FONTSIZE,c,!0,mxUtils.bind(this,function(a){this.customFontSizes.push(a)}))})));this.put("direction",new Menu(mxUtils.bind(this,function(b,c){b.addItem(mxResources.get("flipH"),null,function(){a.toggleCellStyles(mxConstants.STYLE_FLIPH,!1)},c);b.addItem(mxResources.get("flipV"),null,function(){a.toggleCellStyles(mxConstants.STYLE_FLIPV,
-!1)},c);this.addMenuItems(b,["-","rotation"],c)})));this.put("align",new Menu(mxUtils.bind(this,function(b,c){b.addItem(mxResources.get("leftAlign"),null,function(){a.alignCells(mxConstants.ALIGN_LEFT)},c);b.addItem(mxResources.get("center"),null,function(){a.alignCells(mxConstants.ALIGN_CENTER)},c);b.addItem(mxResources.get("rightAlign"),null,function(){a.alignCells(mxConstants.ALIGN_RIGHT)},c);b.addSeparator(c);b.addItem(mxResources.get("topAlign"),null,function(){a.alignCells(mxConstants.ALIGN_TOP)},
-c);b.addItem(mxResources.get("middle"),null,function(){a.alignCells(mxConstants.ALIGN_MIDDLE)},c);b.addItem(mxResources.get("bottomAlign"),null,function(){a.alignCells(mxConstants.ALIGN_BOTTOM)},c)})));this.put("distribute",new Menu(mxUtils.bind(this,function(b,c){b.addItem(mxResources.get("horizontal"),null,function(){a.distributeCells(!0)},c);b.addItem(mxResources.get("vertical"),null,function(){a.distributeCells(!1)},c)})));this.put("line",new Menu(mxUtils.bind(this,function(b,c){var d=a.view.getState(a.getSelectionCell());
-null!=d&&(d=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE),"arrow"!=d&&(this.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",c,!0).setAttribute("title",mxResources.get("straight")),this.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",c,!0).setAttribute("title",mxResources.get("orthogonal")),
-this.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",c,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",c,!0).setAttribute("title",mxResources.get("simple")),
-this.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",c,!0).setAttribute("title",mxResources.get("isometric")),this.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",c,!0).setAttribute("title",
-mxResources.get("isometric")),"connector"==d&&this.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",c,!0).setAttribute("title",mxResources.get("curved")),this.edgeStyleChange(b,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",c,!0).setAttribute("title",mxResources.get("entityRelation"))),
-b.addSeparator(c),this.styleChange(b,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",c,!0,null,!0).setAttribute("title",mxResources.get("line")),this.styleChange(b,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",c,!0,null,!0).setAttribute("title",mxResources.get("link")),this.styleChange(b,"",[mxConstants.STYLE_SHAPE,
-mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",c,!0,null,!0).setAttribute("title",mxResources.get("arrow")),this.styleChange(b,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",c,!0,null,!0).setAttribute("title",mxResources.get("simpleArrow")))})));this.put("layout",new Menu(mxUtils.bind(this,function(b,c){var d=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()});b.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var b=new mxHierarchicalLayout(a,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(function(){var c=a.getSelectionCells();b.execute(a.getDefaultParent(),0==c.length?null:c)},!0)}),c);b.addItem(mxResources.get("verticalFlow"),
-null,mxUtils.bind(this,function(){var b=new mxHierarchicalLayout(a,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(function(){var c=a.getSelectionCells();b.execute(a.getDefaultParent(),0==c.length?null:c)},!0)}),c);b.addSeparator(c);b.addItem(mxResources.get("horizontalTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);null!=c&&
-0<c.length&&(b=c[0]);if(null!=b){var e=new mxCompactTreeLayout(a,!0);e.edgeRouting=!1;e.levelDistance=30;d(e.levelDistance,mxUtils.bind(this,function(c){e.levelDistance=c;this.editorUi.executeLayout(function(){e.execute(a.getDefaultParent(),b)},!0)}))}}),c);b.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);
-null!=c&&0<c.length&&(b=c[0]);if(null!=b){var e=new mxCompactTreeLayout(a,!1);e.edgeRouting=!1;e.levelDistance=30;d(e.levelDistance,mxUtils.bind(this,function(c){e.levelDistance=c;this.editorUi.executeLayout(function(){e.execute(a.getDefaultParent(),b)},!0)}))}}),c);b.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var b=a.getSelectionCell(),c=null;null==b||0==a.getModel().getChildCount(b)?0==a.getModel().getEdgeCount(b)&&(c=a.findTreeRoots(a.getDefaultParent())):c=a.findTreeRoots(b);
-null!=c&&0<c.length&&(b=c[0]);if(null!=b){var e=new mxRadialTreeLayout(a,!1);e.levelDistance=80;e.autoRadius=!0;d(e.levelDistance,mxUtils.bind(this,function(c){e.levelDistance=c;this.editorUi.executeLayout(function(){e.execute(a.getDefaultParent(),b);a.isSelectionEmpty()||(b=a.getModel().getParent(b),a.getModel().isVertex(b)&&a.updateGroupBounds([b],2*a.gridSize,!0))},!0)}))}}),c);b.addSeparator(c);b.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var b=new mxFastOrganicLayout(a);
-d(b.forceConstant,mxUtils.bind(this,function(c){b.forceConstant=c;this.editorUi.executeLayout(function(){var c=a.getSelectionCell();if(null==c||0==a.getModel().getChildCount(c))c=a.getDefaultParent();b.execute(c);a.getModel().isVertex(c)&&a.updateGroupBounds([c],2*a.gridSize,!0)},!0)}))}),c);b.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var b=new mxCircleLayout(a);this.editorUi.executeLayout(function(){var c=a.getSelectionCell();if(null==c||0==a.getModel().getChildCount(c))c=
-a.getDefaultParent();b.execute(c);a.getModel().isVertex(c)&&a.updateGroupBounds([c],2*a.gridSize,!0)},!0)}),c)})));this.put("navigation",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),c)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,["toFront","toBack","bringForward","sendBackward","-"],c);this.addSubmenu("direction",a,c);this.addMenuItems(a,["turn","-"],c);this.addSubmenu("align",
-a,c);this.addSubmenu("distribute",a,c);a.addSeparator(c);this.addSubmenu("navigation",a,c);this.addSubmenu("insert",a,c);this.addSubmenu("layout",a,c);this.addMenuItems(a,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),c)}))).isEnabled=c;this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,["insertLink","insertImage"],c)})));this.put("view",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
-c))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(a,c){null!=this.editorUi.format&&this.addMenuItems(a,["formatPanel"],c);this.addMenuItems(a,["outline","layers"],c)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,["resetView","-"],c);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],e=0;e<d.length;e++)(function(d){b.addItem(100*d+"%",null,function(){a.zoomTo(d)},c)})(d[e]);this.addMenuItems(b,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),
-c)})));this.put("file",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"new open - save saveAs - import export - pageSetup print".split(" "),c)})));this.put("edit",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,
-["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,["help","-","about"])})))};Menus.prototype.put=function(a,c){return this.menus[a]=c};Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,c,b,e){var d=this.get(a);null!=d&&(d=d.isEnabled(),c.showDisabled||d)&&(b=c.addItem(e||mxResources.get(a),null,null,b,null,d),this.addMenu(a,c,b))};
-Menus.prototype.addMenu=function(a,c,b){var e=this.get(a);null!=e&&(c.showDisabled||e.isEnabled())&&this.get(a).execute(c,b)};
-Menus.prototype.addInsertTableCellItem=function(a,c){var b=this.editorUi.editor.graph,e=b.getSelectionCell(),d=b.getCurrentCellStyle(e),f="stackLayout"==d.childLayout,k=!0,h=!0;f&&(h="0"==d.horizontalStack,k=!h);null==c&&(f||b.isTableCell(e)||b.isTableRow(e)||b.isTable(e))?(k&&(d=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{f?b.insertLane(e,!0):b.insertTableColumn(e,!0)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),
-d.setAttribute("title",mxResources.get("insertColumnBefore")),d=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{f?b.insertLane(e,!1):b.insertTableColumn(e,!1)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertcolumnafter"),d.setAttribute("title",mxResources.get("insertColumnAfter")),d=a.addItem(mxResources.get("deleteColumn"),null,mxUtils.bind(this,function(){if(null!=e)try{f?b.deleteLane(e):b.deleteTableColumn(e)}catch(g){this.editorUi.handleError(g)}}),
-null,"geIcon geSprite geSprite-deletecolumn"),d.setAttribute("title",mxResources.get("deleteColumn"))),h&&(d=a.addItem(mxResources.get("insertRowBefore"),null,mxUtils.bind(this,function(){try{f?b.insertLane(e,!0):b.insertTableRow(e,!0)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertrowbefore"),d.setAttribute("title",mxResources.get("insertRowBefore")),d=a.addItem(mxResources.get("insertRowAfter"),null,mxUtils.bind(this,function(){try{f?b.insertLane(e,!1):b.insertTableRow(e,
-!1)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertrowafter"),d.setAttribute("title",mxResources.get("insertRowAfter")),d=a.addItem(mxResources.get("deleteRow"),null,mxUtils.bind(this,function(){try{f?b.deleteLane(e):b.deleteTableRow(e)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-deleterow"),d.setAttribute("title",mxResources.get("deleteRow")))):this.addInsertTableItem(a,mxUtils.bind(this,function(a,c,d,e,f){c=f||mxEvent.isControlDown(a)||
-mxEvent.isMetaDown(a)?b.createCrossFunctionalSwimlane(c,d,null,null,e||mxEvent.isShiftDown(a)?"Cross-Functional Flowchart":null):b.createTable(c,d,null,null,e||mxEvent.isShiftDown(a)?"Table":null);a=mxEvent.isAltDown(a)?b.getFreeInsertPoint():b.getCenterInsertPoint(b.getBoundingBoxFromGeometry([c],!0));a=b.importCells([c],a.x,a.y);b.fireEvent(new mxEventObject("cellsInserted","cells",b.model.getDescendants(a[0])));null!=a&&0<a.length&&(b.scrollCellToVisible(a[0]),b.setSelectionCells(a))}),c)};
-Menus.prototype.addInsertTableItem=function(a,c,b,e){function d(a,b){for(var c=["<table>"],d=0;d<a;d++){c.push("<tr>");for(var e=0;e<b;e++)c.push("<td><br></td>");c.push("</tr>")}c.push("</table>");return c.join("")}function f(a){g=k.getParentByName(mxEvent.getSource(a),"TD");var b=!1;if(null!=g){h=k.getParentByName(g,"TR");for(var c=mxEvent.isMouseEvent(a)?2:4,d=p,e=Math.min(20,h.sectionRowIndex+c),c=Math.min(20,g.cellIndex+c),f=d.rows.length;f<e;f++)for(var l=d.insertRow(f),m=0;m<d.rows[0].cells.length;m++)l.insertCell(-1);
-for(f=0;f<d.rows.length;f++)for(l=d.rows[f],m=l.cells.length;m<c;m++)l.insertCell(-1);q.innerHTML=g.cellIndex+1+"x"+(h.sectionRowIndex+1);for(d=0;d<p.rows.length;d++)for(e=p.rows[d],c=0;c<e.cells.length;c++)f=e.cells[c],d==h.sectionRowIndex&&c==g.cellIndex&&(b="blue"==f.style.backgroundColor),f.style.backgroundColor=d<=h.sectionRowIndex&&c<=g.cellIndex?"blue":"transparent"}mxEvent.consume(a);return b}e=null!=e?e:!0;c=null!=c?c:mxUtils.bind(this,function(a,b,c){var e=this.editorUi.editor.graph;a=e.getParentByName(mxEvent.getSource(a),
-"TD");if(null!=a&&null!=e.cellEditor.textarea){e.getParentByName(a,"TR");var f=e.cellEditor.textarea.getElementsByTagName("table");a=[];for(var g=0;g<f.length;g++)a.push(f[g]);e.container.focus();e.pasteHtmlAtCaret(d(b,c));b=e.cellEditor.textarea.getElementsByTagName("table");if(b.length==a.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=a[g-1]){e.selectNode(b[g].rows[0].cells[0]);break}}});var k=this.editorUi.editor.graph,h=null,g=null;null==b&&(a.div.className+=" geToolbarMenu",a.labels=!1);a=
-a.addItem("",null,null,b,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";a.firstChild.innerHTML="";var l=document.createElement("input");l.setAttribute("id","geTitleOption");l.setAttribute("type","checkbox");b=document.createElement("label");mxUtils.write(b,mxResources.get("title"));b.setAttribute("for","geTitleOption");mxEvent.addGestureListeners(b,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));mxEvent.addGestureListeners(l,null,null,mxUtils.bind(this,
-function(a){mxEvent.consume(a)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");var n=document.createElement("label");mxUtils.write(n,mxResources.get("container"));n.setAttribute("for","geContainerOption");mxEvent.addGestureListeners(n,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));e&&(a.firstChild.appendChild(l),a.firstChild.appendChild(b),
+Menus.prototype.init=function(){var a=this.editorUi,b=a.editor.graph,d=mxUtils.bind(b,b.isEnabled);this.customFonts=[];this.customFontSizes=[];this.put("fontFamily",new Menu(mxUtils.bind(this,function(d,c){for(var e=mxUtils.bind(this,function(e){this.styleChange(d,e,[mxConstants.STYLE_FONTFAMILY],[e],null,c,function(){document.execCommand("fontname",!1,e);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY],"values",[e],"cells",[b.cellEditor.getEditingCell()]))},function(){b.updateLabelElements(b.getSelectionCells(),
+function(a){a.removeAttribute("face");a.style.fontFamily=null;"PRE"==a.nodeName&&b.replaceElement(a,"div")})}).firstChild.nextSibling.style.fontFamily=e}),k=0;k<this.defaultFonts.length;k++)e(this.defaultFonts[k]);d.addSeparator(c);if(0<this.customFonts.length){for(k=0;k<this.customFonts.length;k++)e(this.customFonts[k]);d.addSeparator(c);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),c);d.addSeparator(c)}this.promptChange(d,
+mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,c,!0,mxUtils.bind(this,function(a){0>mxUtils.indexOf(this.customFonts,a)&&(this.customFonts.push(a),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(a,c){function d(d,e){return a.addItem(d,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+
+e+">"))}),c)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML='<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";d("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";d("","h3").firstChild.nextSibling.innerHTML='<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";d("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";d("","h5").firstChild.nextSibling.innerHTML=
+'<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";d("","h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";d("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";d("","blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(d,c){var e=
+[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(e,this.defaultFontSize)&&(e.push(this.defaultFontSize),e.sort(function(a,b){return a-b}));for(var k=mxUtils.bind(this,function(c){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var d=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<d.length;e++)if("3"==d[e].getAttribute("size")){d[e].removeAttribute("size");d[e].style.fontSize=c+"px";break}a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],
+"values",[c],"cells",[b.cellEditor.getEditingCell()]))}}),h=mxUtils.bind(this,function(a){this.styleChange(d,a,[mxConstants.STYLE_FONTSIZE],[a],null,c,function(){k(a)})}),g=0;g<e.length;g++)h(e[g]);d.addSeparator(c);if(0<this.customFontSizes.length){for(var l=0,g=0;g<this.customFontSizes.length;g++)0>mxUtils.indexOf(e,this.customFontSizes[g])&&(h(this.customFontSizes[g]),l++);0<l&&d.addSeparator(c);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),c);d.addSeparator(c)}var m=
+null;this.promptChange(d,mxResources.get("custom")+"...","("+mxResources.get("points")+")",this.defaultFontSize,mxConstants.STYLE_FONTSIZE,c,!0,mxUtils.bind(this,function(a){null!=m&&null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),b.cellEditor.restoreSelection(m));null!=a&&0<a.length&&(this.customFontSizes.push(a),k(a))}),null,function(){m=b.cellEditor.saveSelection();return!1})})));this.put("direction",new Menu(mxUtils.bind(this,function(a,c){a.addItem(mxResources.get("flipH"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPH,
+!1)},c);a.addItem(mxResources.get("flipV"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},c);this.addMenuItems(a,["-","rotation"],c)})));this.put("align",new Menu(mxUtils.bind(this,function(a,c){a.addItem(mxResources.get("leftAlign"),null,function(){b.alignCells(mxConstants.ALIGN_LEFT)},c);a.addItem(mxResources.get("center"),null,function(){b.alignCells(mxConstants.ALIGN_CENTER)},c);a.addItem(mxResources.get("rightAlign"),null,function(){b.alignCells(mxConstants.ALIGN_RIGHT)},c);
+a.addSeparator(c);a.addItem(mxResources.get("topAlign"),null,function(){b.alignCells(mxConstants.ALIGN_TOP)},c);a.addItem(mxResources.get("middle"),null,function(){b.alignCells(mxConstants.ALIGN_MIDDLE)},c);a.addItem(mxResources.get("bottomAlign"),null,function(){b.alignCells(mxConstants.ALIGN_BOTTOM)},c)})));this.put("distribute",new Menu(mxUtils.bind(this,function(a,c){a.addItem(mxResources.get("horizontal"),null,function(){b.distributeCells(!0)},c);a.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1)},
+c)})));this.put("line",new Menu(mxUtils.bind(this,function(a,c){var d=b.view.getState(b.getSelectionCell());null!=d&&(d=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE),"arrow"!=d&&(this.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",c,!0).setAttribute("title",mxResources.get("straight")),this.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],
+["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",c,!0).setAttribute("title",mxResources.get("orthogonal")),this.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",c,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],
+["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",c,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",c,!0).setAttribute("title",mxResources.get("isometric")),this.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,
+mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",c,!0).setAttribute("title",mxResources.get("isometric")),"connector"==d&&this.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",c,!0).setAttribute("title",mxResources.get("curved")),this.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],
+["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",c,!0).setAttribute("title",mxResources.get("entityRelation"))),a.addSeparator(c),this.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",c,!0,null,!0).setAttribute("title",mxResources.get("line")),this.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",
+null,null,null],"geIcon geSprite geSprite-linkedge",c,!0,null,!0).setAttribute("title",mxResources.get("link")),this.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",c,!0,null,!0).setAttribute("title",mxResources.get("arrow")),this.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",
+c,!0,null,!0).setAttribute("title",mxResources.get("simpleArrow")))})));this.put("layout",new Menu(mxUtils.bind(this,function(a,c){var d=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()});a.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var a=new mxHierarchicalLayout(b,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(function(){var c=
+b.getSelectionCells();a.execute(b.getDefaultParent(),0==c.length?null:c)},!0)}),c);a.addItem(mxResources.get("verticalFlow"),null,mxUtils.bind(this,function(){var a=new mxHierarchicalLayout(b,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(function(){var c=b.getSelectionCells();a.execute(b.getDefaultParent(),0==c.length?null:c)},!0)}),c);a.addSeparator(c);a.addItem(mxResources.get("horizontalTree"),null,mxUtils.bind(this,function(){var a=b.getSelectionCell(),c=null;null==a||0==b.getModel().getChildCount(a)?
+0==b.getModel().getEdgeCount(a)&&(c=b.findTreeRoots(b.getDefaultParent())):c=b.findTreeRoots(a);null!=c&&0<c.length&&(a=c[0]);if(null!=a){var e=new mxCompactTreeLayout(b,!0);e.edgeRouting=!1;e.levelDistance=30;d(e.levelDistance,mxUtils.bind(this,function(c){e.levelDistance=c;this.editorUi.executeLayout(function(){e.execute(b.getDefaultParent(),a)},!0)}))}}),c);a.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var a=b.getSelectionCell(),c=null;null==a||0==b.getModel().getChildCount(a)?
+0==b.getModel().getEdgeCount(a)&&(c=b.findTreeRoots(b.getDefaultParent())):c=b.findTreeRoots(a);null!=c&&0<c.length&&(a=c[0]);if(null!=a){var e=new mxCompactTreeLayout(b,!1);e.edgeRouting=!1;e.levelDistance=30;d(e.levelDistance,mxUtils.bind(this,function(c){e.levelDistance=c;this.editorUi.executeLayout(function(){e.execute(b.getDefaultParent(),a)},!0)}))}}),c);a.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var a=b.getSelectionCell(),c=null;null==a||0==b.getModel().getChildCount(a)?
+0==b.getModel().getEdgeCount(a)&&(c=b.findTreeRoots(b.getDefaultParent())):c=b.findTreeRoots(a);null!=c&&0<c.length&&(a=c[0]);if(null!=a){var e=new mxRadialTreeLayout(b,!1);e.levelDistance=80;e.autoRadius=!0;d(e.levelDistance,mxUtils.bind(this,function(c){e.levelDistance=c;this.editorUi.executeLayout(function(){e.execute(b.getDefaultParent(),a);b.isSelectionEmpty()||(a=b.getModel().getParent(a),b.getModel().isVertex(a)&&b.updateGroupBounds([a],2*b.gridSize,!0))},!0)}))}}),c);a.addSeparator(c);a.addItem(mxResources.get("organic"),
+null,mxUtils.bind(this,function(){var a=new mxFastOrganicLayout(b);d(a.forceConstant,mxUtils.bind(this,function(c){a.forceConstant=c;this.editorUi.executeLayout(function(){var c=b.getSelectionCell();if(null==c||0==b.getModel().getChildCount(c))c=b.getDefaultParent();a.execute(c);b.getModel().isVertex(c)&&b.updateGroupBounds([c],2*b.gridSize,!0)},!0)}))}),c);a.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var a=new mxCircleLayout(b);this.editorUi.executeLayout(function(){var c=
+b.getSelectionCell();if(null==c||0==b.getModel().getChildCount(c))c=b.getDefaultParent();a.execute(c);b.getModel().isVertex(c)&&b.updateGroupBounds([c],2*b.gridSize,!0)},!0)}),c)})));this.put("navigation",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),b)})));this.put("arrange",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["toFront","toBack","bringForward","sendBackward","-"],b);this.addSubmenu("direction",
+a,b);this.addMenuItems(a,["turn","-"],b);this.addSubmenu("align",a,b);this.addSubmenu("distribute",a,b);a.addSeparator(b);this.addSubmenu("navigation",a,b);this.addSubmenu("insert",a,b);this.addSubmenu("layout",a,b);this.addMenuItems(a,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),b)}))).isEnabled=d;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["insertLink","insertImage"],b)})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,
+(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),b))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(a,b){null!=this.editorUi.format&&this.addMenuItems(a,["formatPanel"],b);this.addMenuItems(a,["outline","layers"],b)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,["resetView","-"],c);for(var d=
+[.25,.5,.75,1,1.25,1.5,2,3,4],e=0;e<d.length;e++)(function(d){a.addItem(100*d+"%",null,function(){b.zoomTo(d)},c)})(d[e]);this.addMenuItems(a,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),c)})));this.put("file",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"new open - save saveAs - import export - pageSetup print".split(" "),b)})));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+this.put("extras",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};Menus.prototype.get=function(a){return this.menus[a]};
+Menus.prototype.addSubmenu=function(a,b,d,e){var c=this.get(a);null!=c&&(c=c.isEnabled(),b.showDisabled||c)&&(d=b.addItem(e||mxResources.get(a),null,null,d,null,c),this.addMenu(a,b,d))};Menus.prototype.addMenu=function(a,b,d){var e=this.get(a);null!=e&&(b.showDisabled||e.isEnabled())&&this.get(a).execute(b,d)};
+Menus.prototype.addInsertTableCellItem=function(a,b){var d=this.editorUi.editor.graph,e=d.getSelectionCell(),c=d.getCurrentCellStyle(e),f="stackLayout"==c.childLayout,k=!0,h=!0;f&&(h="0"==c.horizontalStack,k=!h);null==b&&(f||d.isTableCell(e)||d.isTableRow(e)||d.isTable(e))?(k&&(c=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{f?d.insertLane(e,!0):d.insertTableColumn(e,!0)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),
+c.setAttribute("title",mxResources.get("insertColumnBefore")),c=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{f?d.insertLane(e,!1):d.insertTableColumn(e,!1)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertcolumnafter"),c.setAttribute("title",mxResources.get("insertColumnAfter")),c=a.addItem(mxResources.get("deleteColumn"),null,mxUtils.bind(this,function(){if(null!=e)try{f?d.deleteLane(e):d.deleteTableColumn(e)}catch(g){this.editorUi.handleError(g)}}),
+null,"geIcon geSprite geSprite-deletecolumn"),c.setAttribute("title",mxResources.get("deleteColumn"))),h&&(c=a.addItem(mxResources.get("insertRowBefore"),null,mxUtils.bind(this,function(){try{f?d.insertLane(e,!0):d.insertTableRow(e,!0)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertrowbefore"),c.setAttribute("title",mxResources.get("insertRowBefore")),c=a.addItem(mxResources.get("insertRowAfter"),null,mxUtils.bind(this,function(){try{f?d.insertLane(e,!1):d.insertTableRow(e,
+!1)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-insertrowafter"),c.setAttribute("title",mxResources.get("insertRowAfter")),c=a.addItem(mxResources.get("deleteRow"),null,mxUtils.bind(this,function(){try{f?d.deleteLane(e):d.deleteTableRow(e)}catch(g){this.editorUi.handleError(g)}}),null,"geIcon geSprite geSprite-deleterow"),c.setAttribute("title",mxResources.get("deleteRow")))):this.addInsertTableItem(a,mxUtils.bind(this,function(a,b,c,e,f){b=f||mxEvent.isControlDown(a)||
+mxEvent.isMetaDown(a)?d.createCrossFunctionalSwimlane(b,c,null,null,e||mxEvent.isShiftDown(a)?"Cross-Functional Flowchart":null):d.createTable(b,c,null,null,e||mxEvent.isShiftDown(a)?"Table":null);a=mxEvent.isAltDown(a)?d.getFreeInsertPoint():d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([b],!0));a=d.importCells([b],a.x,a.y);d.fireEvent(new mxEventObject("cellsInserted","cells",d.model.getDescendants(a[0])));null!=a&&0<a.length&&(d.scrollCellToVisible(a[0]),d.setSelectionCells(a))}),b)};
+Menus.prototype.addInsertTableItem=function(a,b,d,e){function c(a,b){for(var c=["<table>"],d=0;d<a;d++){c.push("<tr>");for(var e=0;e<b;e++)c.push("<td><br></td>");c.push("</tr>")}c.push("</table>");return c.join("")}function f(a){g=k.getParentByName(mxEvent.getSource(a),"TD");var b=!1;if(null!=g){h=k.getParentByName(g,"TR");for(var c=mxEvent.isMouseEvent(a)?2:4,d=p,e=Math.min(20,h.sectionRowIndex+c),c=Math.min(20,g.cellIndex+c),f=d.rows.length;f<e;f++)for(var l=d.insertRow(f),m=0;m<d.rows[0].cells.length;m++)l.insertCell(-1);
+for(f=0;f<d.rows.length;f++)for(l=d.rows[f],m=l.cells.length;m<c;m++)l.insertCell(-1);q.innerHTML=g.cellIndex+1+"x"+(h.sectionRowIndex+1);for(d=0;d<p.rows.length;d++)for(e=p.rows[d],c=0;c<e.cells.length;c++)f=e.cells[c],d==h.sectionRowIndex&&c==g.cellIndex&&(b="blue"==f.style.backgroundColor),f.style.backgroundColor=d<=h.sectionRowIndex&&c<=g.cellIndex?"blue":"transparent"}mxEvent.consume(a);return b}e=null!=e?e:!0;b=null!=b?b:mxUtils.bind(this,function(a,b,d){var e=this.editorUi.editor.graph;a=e.getParentByName(mxEvent.getSource(a),
+"TD");if(null!=a&&null!=e.cellEditor.textarea){e.getParentByName(a,"TR");var f=e.cellEditor.textarea.getElementsByTagName("table");a=[];for(var g=0;g<f.length;g++)a.push(f[g]);e.container.focus();e.pasteHtmlAtCaret(c(b,d));b=e.cellEditor.textarea.getElementsByTagName("table");if(b.length==a.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=a[g-1]){e.selectNode(b[g].rows[0].cells[0]);break}}});var k=this.editorUi.editor.graph,h=null,g=null;null==d&&(a.div.className+=" geToolbarMenu",a.labels=!1);a=
+a.addItem("",null,null,d,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";a.firstChild.innerHTML="";var l=document.createElement("input");l.setAttribute("id","geTitleOption");l.setAttribute("type","checkbox");d=document.createElement("label");mxUtils.write(d,mxResources.get("title"));d.setAttribute("for","geTitleOption");mxEvent.addGestureListeners(d,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));mxEvent.addGestureListeners(l,null,null,mxUtils.bind(this,
+function(a){mxEvent.consume(a)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");var n=document.createElement("label");mxUtils.write(n,mxResources.get("container"));n.setAttribute("for","geContainerOption");mxEvent.addGestureListeners(n,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(a){mxEvent.consume(a)}));e&&(a.firstChild.appendChild(l),a.firstChild.appendChild(d),
mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(n),mxUtils.br(a.firstChild),mxUtils.br(a.firstChild));var p=function(a,b){var c=document.createElement("table");c.setAttribute("border","1");c.style.borderCollapse="collapse";c.style.borderStyle="solid";c.setAttribute("cellPadding","8");for(var d=0;d<a;d++)for(var e=c.insertRow(d),f=0;f<b;f++)e.insertCell(-1);return c}(5,5);a.firstChild.appendChild(p);var q=document.createElement("div");q.style.padding="4px";q.innerHTML=
-"1x1";a.firstChild.appendChild(q);mxEvent.addGestureListeners(p,null,null,mxUtils.bind(this,function(a){var b=f(a);null!=g&&null!=h&&b&&(c(a,h.sectionRowIndex+1,g.cellIndex+1,l.checked,m.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(p,"mouseover",f)};
-Menus.prototype.edgeStyleChange=function(a,c,b,e,d,f,k,h){return this.showIconOnly(a.addItem(c,h,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var c=a.getSelectionCells(),d=[],f=0;f<c.length;f++){var h=c[f];if(a.getModel().isEdge(h)){if(k){var q=a.getCellGeometry(h);null!=q&&(q=q.clone(),q.points=null,a.getModel().setGeometry(h,q))}for(var t=0;t<b.length;t++)a.setCellStyles(b[t],e[t],[h]);d.push(h)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
-"keys",b,"values",e,"cells",d))}finally{a.getModel().endUpdate()}}),f,d))};Menus.prototype.showIconOnly=function(a){var c=a.getElementsByTagName("td");for(i=0;i<c.length;i++)"mxPopupMenuItem"==c[i].getAttribute("class")&&(c[i].style.display="none");return a};
-Menus.prototype.styleChange=function(a,c,b,e,d,f,k,h,g){var l=this.createStyleChangeFunction(b,e);a=a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;null!=k&&a.cellEditor.isContentEditing()?k():l(h)}),f,d);g&&this.showIconOnly(a);return a};
-Menus.prototype.createStyleChangeFunction=function(a,c){return mxUtils.bind(this,function(b){var e=this.editorUi.editor.graph;e.stopEditing(!1);e.getModel().beginUpdate();try{for(var d=e.getEditableCells(e.getSelectionCells()),f=!1,k=0;k<a.length;k++)if(e.setCellStyles(a[k],c[k],d),a[k]==mxConstants.STYLE_ALIGN&&e.updateLabelElements(d,function(a){a.removeAttribute("align");a.style.textAlign=null}),a[k]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[k])f=!0;if(f)for(f=0;f<d.length;f++)0==e.model.getChildCount(d[f])&&
-e.autoSizeCell(d[f],!1);null!=b&&b();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",c,"cells",d))}finally{e.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,c,b,e,d,f,k,h,g){return a.addItem(c,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,c=e,f=a.getView().getState(a.getSelectionCell());null!=f&&(c=f.style[d]||c);c=new FilenameDialog(this.editorUi,c,mxResources.get("apply"),mxUtils.bind(this,function(b){if(null!=b&&0<b.length){a.getModel().beginUpdate();try{a.stopEditing(!1),a.setCellStyles(d,b)}finally{a.getModel().endUpdate()}null!=h&&h(b)}}),mxResources.get("enterValue")+(0<b.length?" "+
-b:""));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()}),f,g,k)};
-Menus.prototype.pickColor=function(a,c,b){var e=this.editorUi.editor.graph,d=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));if(null!=c&&e.cellEditor.isContentEditing()){var f=e.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,b||"000000",mxUtils.bind(this,function(a){e.cellEditor.restoreSelection(f);document.execCommand(c,!1,a!=mxConstants.NONE?a:"transparent")}),function(){e.cellEditor.restoreSelection(f)});this.editorUi.showDialog(a.container,
-230,d,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));this.colorDialog.currentColorKey=a;b=e.getView().getState(e.getSelectionCell());var k="none";null!=b&&(k=b.style[a]||k);"none"==k?(k="ffffff",this.colorDialog.picker.fromString("ffffff"),this.colorDialog.colorInput.value="none"):this.colorDialog.picker.fromString(k);this.editorUi.showDialog(this.colorDialog.container,230,d,!0,!0);this.colorDialog.init()}};
-Menus.prototype.toggleStyle=function(a,c){var b=this.editorUi.editor.graph,e=b.toggleCellStyles(a,c);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[e],"cells",b.getSelectionCells()))};
-Menus.prototype.addMenuItem=function(a,c,b,e,d,f){var k=this.editorUi.actions.get(c);return null!=k&&(a.showDisabled||k.isEnabled())&&k.visible?(c=a.addItem(f||k.label,null,function(a){k.funct(e,a)},b,d,k.isEnabled()),k.toggleAction&&k.isSelected()&&a.addCheckmark(c,Editor.checkmarkImage),this.addShortcut(c,k),c):null};
-Menus.prototype.addShortcut=function(a,c){if(null!=c.shortcut){var b=a.firstChild.nextSibling.nextSibling,e=document.createElement("span");e.style.color="gray";mxUtils.write(e,c.shortcut);b.appendChild(e)}};Menus.prototype.addMenuItems=function(a,c,b,e,d){for(var f=0;f<c.length;f++)"-"==c[f]?a.addSeparator(b):this.addMenuItem(a,c[f],b,e,null!=d?d[f]:null)};
-Menus.prototype.createPopupMenu=function(a,c,b){a.smartSeparators=!0;this.addPopupMenuHistoryItems(a,c,b);this.addPopupMenuEditItems(a,c,b);this.addPopupMenuStyleItems(a,c,b);this.addPopupMenuArrangeItems(a,c,b);this.addPopupMenuCellItems(a,c,b);this.addPopupMenuSelectionItems(a,c,b)};Menus.prototype.addPopupMenuHistoryItems=function(a,c,b){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["undo","redo"],null,b)};
-Menus.prototype.addPopupMenuEditItems=function(a,c,b){this.editorUi.editor.graph.isSelectionEmpty()?this.addMenuItems(a,["pasteHere"],null,b):this.addMenuItems(a,"delete - cut copy - duplicate".split(" "),null,b)};Menus.prototype.addPopupMenuStyleItems=function(a,c,b){1==this.editorUi.editor.graph.getSelectionCount()?this.addMenuItems(a,["-","setAsDefaultStyle"],null,b):this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","clearDefaultStyle"],null,b)};
-Menus.prototype.addPopupMenuArrangeItems=function(a,c,b){var e=this.editorUi.editor.graph;0<e.getEditableCells(e.getSelectionCells()).length&&(this.addMenuItems(a,["-","toFront","toBack"],null,b),1==e.getSelectionCount()&&this.addMenuItems(a,["bringForward","sendBackward"],null,b));1<e.getSelectionCount()?this.addMenuItems(a,["-","group"],null,b):1==e.getSelectionCount()&&!e.getModel().isEdge(c)&&!e.isSwimlane(c)&&0<e.getModel().getChildCount(c)&&e.isCellEditable(c)&&this.addMenuItems(a,["-","ungroup"],
-null,b)};
-Menus.prototype.addPopupMenuCellItems=function(a,c,b){var e=this.editorUi.editor.graph,d=e.view.getState(c);a.addSeparator();if(null!=d){var f=!1;1==e.getSelectionCount()&&e.getModel().isEdge(c)&&(a.addSeparator(),this.addSubmenu("line",a));if(e.getModel().isEdge(c)&&"entityRelationEdgeStyle"!=mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE,null)){var d=e.selectionCellsHandler.getHandler(c),k=!1;d instanceof mxEdgeHandler&&null!=d.bends&&
-2<d.bends.length&&(f=d.getHandleForEvent(e.updateMouseEvent(new mxMouseEvent(b))),0<f&&f<d.bends.length-1&&(null==d.bends[f]||null==d.bends[f].node||""==d.bends[f].node.style.opacity)&&(k=this.editorUi.actions.get("removeWaypoint"),k.handler=d,k.index=f,k=!0));a.addSeparator();this.addMenuItem(a,"turn",null,b,null,mxResources.get("reverse"));this.addMenuItems(a,[k?"removeWaypoint":"addWaypoint"],null,b);d=e.getModel().getGeometry(c);f=null!=d&&null!=d.points&&0<d.points.length}1==e.getSelectionCount()&&
-(f||e.getModel().isVertex(c)&&0<e.getModel().getEdgeCount(c))&&this.addMenuItems(a,["-","clearWaypoints"],null,b);1==e.getSelectionCount()&&e.isCellEditable(c)&&this.addPopupMenuCellEditItems(a,c,b)}};
-Menus.prototype.addPopupMenuCellEditItems=function(a,c,b,e){var d=this.editorUi.editor.graph.view.getState(c);this.addMenuItems(a,["-","editStyle","editData","editLink"],e,b);this.editorUi.editor.graph.getModel().isVertex(c)&&null!=mxUtils.getValue(d.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",e,b).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"...")};
-Menus.prototype.addPopupMenuSelectionItems=function(a,c,b){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,b)};Menus.prototype.createMenubar=function(a){for(var c=new Menubar(this.editorUi,a),b=this.defaultMenuItems,e=0;e<b.length;e++)mxUtils.bind(this,function(a){var d=c.addMenu(mxResources.get(b[e]),mxUtils.bind(this,function(){a.funct.apply(this,arguments)}));this.menuCreated(a,d)})(this.get(b[e]));return c};
-Menus.prototype.menuCreated=function(a,c,b){null!=c&&(b=null!=b?b:"geItem",a.addListener("stateChanged",function(){(c.enabled=a.enabled)?(c.className=b,8==document.documentMode&&(c.style.color="")):(c.className=b+" mxDisabled",8==document.documentMode&&(c.style.color="#c3c3c3"))}))};function Menubar(a,c){this.editorUi=a;this.container=c}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
-Menubar.prototype.addMenu=function(a,c,b){var e=document.createElement("a");e.className="geItem";mxUtils.write(e,a);this.addMenuHandler(e,c);null!=b?this.container.insertBefore(e,b):this.container.appendChild(e);return e};
-Menubar.prototype.addMenuHandler=function(a,c){if(null!=c){var b=!0,e=mxUtils.bind(this,function(d){if(b&&null==a.enabled||a.enabled){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(c);e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});var k=mxUtils.getOffset(a);e.popup(k.x,k.y+a.offsetHeight,null,
-d);this.editorUi.setCurrentMenu(e,a)}mxEvent.consume(d)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(b){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),e(b))}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(c){b=this.currentElt!=a;c.preventDefault()}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){e(a);b=!0}))}};Menubar.prototype.destroy=function(){};
-function Menu(a,c){mxEventSource.call(this);this.funct=a;this.enabled=null!=c?c:!0}mxUtils.extend(Menu,mxEventSource);Menu.prototype.isEnabled=function(){return this.enabled};Menu.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Menu.prototype.execute=function(a,c){this.funct(a,c)};EditorUi.prototype.createMenus=function(){return new Menus(this)};function Toolbar(a,c){this.editorUi=a;this.container=c;this.staticElements=[];this.init();this.gestureHandler=mxUtils.bind(this,function(a){null!=this.editorUi.currentMenu&&mxEvent.getSource(a)!=this.editorUi.currentMenu.div&&this.hideMenu()});mxEvent.addGestureListeners(document,this.gestureHandler)}
+"1x1";a.firstChild.appendChild(q);mxEvent.addGestureListeners(p,null,null,mxUtils.bind(this,function(a){var c=f(a);null!=g&&null!=h&&c&&(b(a,h.sectionRowIndex+1,g.cellIndex+1,l.checked,m.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(p,"mouseover",f)};
+Menus.prototype.edgeStyleChange=function(a,b,d,e,c,f,k,h){return this.showIconOnly(a.addItem(b,h,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;a.stopEditing(!1);a.getModel().beginUpdate();try{for(var b=a.getSelectionCells(),c=[],f=0;f<b.length;f++){var h=b[f];if(a.getModel().isEdge(h)){if(k){var q=a.getCellGeometry(h);null!=q&&(q=q.clone(),q.points=null,a.getModel().setGeometry(h,q))}for(var u=0;u<d.length;u++)a.setCellStyles(d[u],e[u],[h]);c.push(h)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
+"keys",d,"values",e,"cells",c))}finally{a.getModel().endUpdate()}}),f,c))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
+Menus.prototype.styleChange=function(a,b,d,e,c,f,k,h,g){var l=this.createStyleChangeFunction(d,e);a=a.addItem(b,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph;null!=k&&a.cellEditor.isContentEditing()?k():l(h)}),f,c);g&&this.showIconOnly(a);return a};
+Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(d){var e=this.editorUi.editor.graph;e.stopEditing(!1);e.getModel().beginUpdate();try{for(var c=e.getEditableCells(e.getSelectionCells()),f=!1,k=0;k<a.length;k++)if(e.setCellStyles(a[k],b[k],c),a[k]==mxConstants.STYLE_ALIGN&&e.updateLabelElements(c,function(a){a.removeAttribute("align");a.style.textAlign=null}),a[k]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[k])f=!0;if(f)for(f=0;f<c.length;f++)0==e.model.getChildCount(c[f])&&
+e.autoSizeCell(c[f],!1);null!=d&&d();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",c))}finally{e.getModel().endUpdate()}})};
+Menus.prototype.promptChange=function(a,b,d,e,c,f,k,h,g,l){return a.addItem(b,null,mxUtils.bind(this,function(){var a=this.editorUi.editor.graph,b=e,f=a.getView().getState(a.getSelectionCell());null!=f&&(b=f.style[c]||b);var g=null!=l?l():!0,b=new FilenameDialog(this.editorUi,b,mxResources.get("apply"),mxUtils.bind(this,function(b){if(null!=b&&0<b.length){if(g){a.getModel().beginUpdate();try{a.stopEditing(!1),a.setCellStyles(c,b)}finally{a.getModel().endUpdate()}}null!=h&&h(b)}}),mxResources.get("enterValue")+
+(0<d.length?" "+d:""),null,null,null,null,function(){null!=h&&null!=l&&h(null)});this.editorUi.showDialog(b.container,300,80,!0,!0);b.init()}),f,g,k)};
+Menus.prototype.pickColor=function(a,b,d){var e=this.editorUi,c=e.editor.graph,f=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));if(null!=b&&c.cellEditor.isContentEditing()){var k=c.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,d||"000000",mxUtils.bind(this,function(a){c.cellEditor.restoreSelection(k);document.execCommand(b,!1,a!=mxConstants.NONE?a:"transparent");var d={forecolor:mxConstants.STYLE_FONTCOLOR,backcolor:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR}[b];
+null!=d&&e.fireEvent(new mxEventObject("styleChanged","keys",[d],"values",[a],"cells",[c.cellEditor.getEditingCell()]))}),function(){c.cellEditor.restoreSelection(k)});this.editorUi.showDialog(a.container,230,f,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));this.colorDialog.currentColorKey=a;d=c.getView().getState(c.getSelectionCell());var h="none";null!=d&&(h=d.style[a]||h);"none"==h?(h="ffffff",this.colorDialog.picker.fromString("ffffff"),this.colorDialog.colorInput.value=
+"none"):this.colorDialog.picker.fromString(h);this.editorUi.showDialog(this.colorDialog.container,230,f,!0,!0);this.colorDialog.init()}};Menus.prototype.toggleStyle=function(a,b){var d=this.editorUi.editor.graph,e=d.toggleCellStyles(a,b);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[e],"cells",d.getSelectionCells()))};
+Menus.prototype.addMenuItem=function(a,b,d,e,c,f){var k=this.editorUi.actions.get(b);return null!=k&&(a.showDisabled||k.isEnabled())&&k.visible?(b=a.addItem(f||k.label,null,function(a){k.funct(e,a)},d,c,k.isEnabled()),k.toggleAction&&k.isSelected()&&a.addCheckmark(b,Editor.checkmarkImage),this.addShortcut(b,k),b):null};
+Menus.prototype.addShortcut=function(a,b){if(null!=b.shortcut){var d=a.firstChild.nextSibling.nextSibling,e=document.createElement("span");e.style.color="gray";mxUtils.write(e,b.shortcut);d.appendChild(e)}};Menus.prototype.addMenuItems=function(a,b,d,e,c){for(var f=0;f<b.length;f++)"-"==b[f]?a.addSeparator(d):this.addMenuItem(a,b[f],d,e,null!=c?c[f]:null)};
+Menus.prototype.createPopupMenu=function(a,b,d){a.smartSeparators=!0;this.addPopupMenuHistoryItems(a,b,d);this.addPopupMenuEditItems(a,b,d);this.addPopupMenuStyleItems(a,b,d);this.addPopupMenuArrangeItems(a,b,d);this.addPopupMenuCellItems(a,b,d);this.addPopupMenuSelectionItems(a,b,d)};Menus.prototype.addPopupMenuHistoryItems=function(a,b,d){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["undo","redo"],null,d)};
+Menus.prototype.addPopupMenuEditItems=function(a,b,d){this.editorUi.editor.graph.isSelectionEmpty()?this.addMenuItems(a,["pasteHere"],null,d):this.addMenuItems(a,"delete - cut copy - duplicate".split(" "),null,d)};Menus.prototype.addPopupMenuStyleItems=function(a,b,d){1==this.editorUi.editor.graph.getSelectionCount()?this.addMenuItems(a,["-","setAsDefaultStyle"],null,d):this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","clearDefaultStyle"],null,d)};
+Menus.prototype.addPopupMenuArrangeItems=function(a,b,d){var e=this.editorUi.editor.graph;0<e.getEditableCells(e.getSelectionCells()).length&&(this.addMenuItems(a,["-","toFront","toBack"],null,d),1==e.getSelectionCount()&&this.addMenuItems(a,["bringForward","sendBackward"],null,d));1<e.getSelectionCount()?this.addMenuItems(a,["-","group"],null,d):1==e.getSelectionCount()&&!e.getModel().isEdge(b)&&!e.isSwimlane(b)&&0<e.getModel().getChildCount(b)&&e.isCellEditable(b)&&this.addMenuItems(a,["-","ungroup"],
+null,d)};
+Menus.prototype.addPopupMenuCellItems=function(a,b,d){var e=this.editorUi.editor.graph,c=e.view.getState(b);a.addSeparator();if(null!=c){var f=!1;1==e.getSelectionCount()&&e.getModel().isEdge(b)&&(a.addSeparator(),this.addSubmenu("line",a));if(e.getModel().isEdge(b)&&"entityRelationEdgeStyle"!=mxUtils.getValue(c.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null)){var c=e.selectionCellsHandler.getHandler(b),k=!1;c instanceof mxEdgeHandler&&null!=c.bends&&
+2<c.bends.length&&(f=c.getHandleForEvent(e.updateMouseEvent(new mxMouseEvent(d))),0<f&&f<c.bends.length-1&&(null==c.bends[f]||null==c.bends[f].node||""==c.bends[f].node.style.opacity)&&(k=this.editorUi.actions.get("removeWaypoint"),k.handler=c,k.index=f,k=!0));a.addSeparator();this.addMenuItem(a,"turn",null,d,null,mxResources.get("reverse"));this.addMenuItems(a,[k?"removeWaypoint":"addWaypoint"],null,d);c=e.getModel().getGeometry(b);f=null!=c&&null!=c.points&&0<c.points.length}1==e.getSelectionCount()&&
+(f||e.getModel().isVertex(b)&&0<e.getModel().getEdgeCount(b))&&this.addMenuItems(a,["-","clearWaypoints"],null,d);1==e.getSelectionCount()&&e.isCellEditable(b)&&this.addPopupMenuCellEditItems(a,b,d)}};
+Menus.prototype.addPopupMenuCellEditItems=function(a,b,d,e){var c=this.editorUi.editor.graph.view.getState(b);this.addMenuItems(a,["-","editStyle","editData","editLink"],e,d);this.editorUi.editor.graph.getModel().isVertex(b)&&null!=mxUtils.getValue(c.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",e,d).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"...")};
+Menus.prototype.addPopupMenuSelectionItems=function(a,b,d){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,d)};Menus.prototype.createMenubar=function(a){for(var b=new Menubar(this.editorUi,a),d=this.defaultMenuItems,e=0;e<d.length;e++)mxUtils.bind(this,function(a){var c=b.addMenu(mxResources.get(d[e]),mxUtils.bind(this,function(){a.funct.apply(this,arguments)}));this.menuCreated(a,c)})(this.get(d[e]));return b};
+Menus.prototype.menuCreated=function(a,b,d){null!=b&&(d=null!=d?d:"geItem",a.addListener("stateChanged",function(){(b.enabled=a.enabled)?(b.className=d,8==document.documentMode&&(b.style.color="")):(b.className=d+" mxDisabled",8==document.documentMode&&(b.style.color="#c3c3c3"))}))};function Menubar(a,b){this.editorUi=a;this.container=b}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
+Menubar.prototype.addMenu=function(a,b,d){var e=document.createElement("a");e.className="geItem";mxUtils.write(e,a);this.addMenuHandler(e,b);null!=d?this.container.insertBefore(e,d):this.container.appendChild(e);return e};
+Menubar.prototype.addMenuHandler=function(a,b){if(null!=b){var d=!0,e=mxUtils.bind(this,function(c){if(d&&null==a.enabled||a.enabled){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(b);e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});var k=mxUtils.getOffset(a);e.popup(k.x,k.y+a.offsetHeight,null,
+c);this.editorUi.setCurrentMenu(e,a)}mxEvent.consume(c)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(b){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),e(b))}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){d=this.currentElt!=a;b.preventDefault()}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){e(a);d=!0}))}};Menubar.prototype.destroy=function(){};
+function Menu(a,b){mxEventSource.call(this);this.funct=a;this.enabled=null!=b?b:!0}mxUtils.extend(Menu,mxEventSource);Menu.prototype.isEnabled=function(){return this.enabled};Menu.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Menu.prototype.execute=function(a,b){this.funct(a,b)};EditorUi.prototype.createMenus=function(){return new Menus(this)};function Toolbar(a,b){this.editorUi=a;this.container=b;this.staticElements=[];this.init();this.gestureHandler=mxUtils.bind(this,function(a){null!=this.editorUi.currentMenu&&mxEvent.getSource(a)!=this.editorUi.currentMenu.div&&this.hideMenu()});mxEvent.addGestureListeners(document,this.gestureHandler)}
Toolbar.prototype.dropDownImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQANAIABAHt7e////yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCREM1NkJFMjE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCREM1NkJFMzE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQzOUMzMjZCMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkQzOUMzMjZDMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ADQAAAhGMj6nL3QAjVHIu6azbvPtWAAA7":IMAGE_PATH+
"/dropdown.gif";Toolbar.prototype.selectedBackground="#d0d0d0";Toolbar.prototype.unselectedBackground="none";Toolbar.prototype.staticElements=null;
-Toolbar.prototype.init=function(){var a=screen.width,a=a-(740<screen.height?56:0);if(700<=a){var c=this.addMenu("",mxResources.get("view")+" ("+mxResources.get("panTooltip")+")",!0,"viewPanels",null,!0);this.addDropDownArrow(c,"geSprite-formatpanel",38,50,-4,-3,36,-8);this.addSeparator()}var b=this.addMenu("",mxResources.get("zoom")+" (Alt+Mousewheel)",!0,"viewZoom",null,!0);b.showDisabled=!0;b.style.whiteSpace="nowrap";b.style.position="relative";b.style.overflow="hidden";b.style.width=EditorUi.compactUi?
-"50px":"36px";420<=a&&(this.addSeparator(),c=this.addItems(["zoomIn","zoomOut"]),c[0].setAttribute("title",mxResources.get("zoomIn")+" ("+this.editorUi.actions.get("zoomIn").shortcut+")"),c[1].setAttribute("title",mxResources.get("zoomOut")+" ("+this.editorUi.actions.get("zoomOut").shortcut+")"));this.updateZoom=mxUtils.bind(this,function(){b.innerHTML=Math.round(100*this.editorUi.editor.graph.view.scale)+"%";this.appendDropDownImageHtml(b);EditorUi.compactUi&&(b.getElementsByTagName("img")[0].style.right=
-"1px",b.getElementsByTagName("img")[0].style.top="5px")});this.editorUi.editor.graph.view.addListener(mxEvent.EVENT_SCALE,this.updateZoom);this.editorUi.editor.addListener("resetGraphView",this.updateZoom);c=this.addItems(["-","undo","redo"]);c[1].setAttribute("title",mxResources.get("undo")+" ("+this.editorUi.actions.get("undo").shortcut+")");c[2].setAttribute("title",mxResources.get("redo")+" ("+this.editorUi.actions.get("redo").shortcut+")");320<=a&&(c=this.addItems(["-","delete"]),c[1].setAttribute("title",
+Toolbar.prototype.init=function(){var a=screen.width,a=a-(740<screen.height?56:0);if(700<=a){var b=this.addMenu("",mxResources.get("view")+" ("+mxResources.get("panTooltip")+")",!0,"viewPanels",null,!0);this.addDropDownArrow(b,"geSprite-formatpanel",38,50,-4,-3,36,-8);this.addSeparator()}var d=this.addMenu("",mxResources.get("zoom")+" (Alt+Mousewheel)",!0,"viewZoom",null,!0);d.showDisabled=!0;d.style.whiteSpace="nowrap";d.style.position="relative";d.style.overflow="hidden";d.style.width=EditorUi.compactUi?
+"50px":"36px";420<=a&&(this.addSeparator(),b=this.addItems(["zoomIn","zoomOut"]),b[0].setAttribute("title",mxResources.get("zoomIn")+" ("+this.editorUi.actions.get("zoomIn").shortcut+")"),b[1].setAttribute("title",mxResources.get("zoomOut")+" ("+this.editorUi.actions.get("zoomOut").shortcut+")"));this.updateZoom=mxUtils.bind(this,function(){d.innerHTML=Math.round(100*this.editorUi.editor.graph.view.scale)+"%";this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.right=
+"1px",d.getElementsByTagName("img")[0].style.top="5px")});this.editorUi.editor.graph.view.addListener(mxEvent.EVENT_SCALE,this.updateZoom);this.editorUi.editor.addListener("resetGraphView",this.updateZoom);b=this.addItems(["-","undo","redo"]);b[1].setAttribute("title",mxResources.get("undo")+" ("+this.editorUi.actions.get("undo").shortcut+")");b[2].setAttribute("title",mxResources.get("redo")+" ("+this.editorUi.actions.get("redo").shortcut+")");320<=a&&(b=this.addItems(["-","delete"]),b[1].setAttribute("title",
mxResources.get("delete")+" ("+this.editorUi.actions.get("delete").shortcut+")"));550<=a&&this.addItems(["-","toFront","toBack"]);740<=a&&(this.addItems(["-","fillColor"]),780<=a&&(this.addItems(["strokeColor"]),820<=a&&this.addItems(["shadow"])));400<=a&&(this.addSeparator(),440<=a&&(this.edgeShapeMenu=this.addMenuFunction("",mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_SHAPE,"width"],[null,null],"geIcon geSprite geSprite-connection",
null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_SHAPE,"width"],["link",null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_SHAPE,"width"],["flexArrow",null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_SHAPE,"width"],["arrow",
null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),this.addDropDownArrow(this.edgeShapeMenu,"geSprite-connection",44,50,0,0,22,-4)),this.edgeStyleMenu=this.addMenuFunction("geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",
@@ -3620,102 +3624,102 @@ null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edg
null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved"));this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation"))})),this.addDropDownArrow(this.edgeStyleMenu,"geSprite-orthogonal",44,50,0,0,22,-4));this.addSeparator();
a=this.addMenu("",mxResources.get("insert")+" ("+mxResources.get("doubleClickTooltip")+")",!0,"insert",null,!0);this.addDropDownArrow(a,"geSprite-plus",38,48,-4,-3,36,-8);this.addSeparator();this.addTableDropDown()};
-Toolbar.prototype.appendDropDownImageHtml=function(a){var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","middle");c.setAttribute("src",Toolbar.prototype.dropDownImage);a.appendChild(c);c.style.position="absolute";c.style.right="4px";c.style.top=(EditorUi.compactUi?6:8)+"px"};
+Toolbar.prototype.appendDropDownImageHtml=function(a){var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","middle");b.setAttribute("src",Toolbar.prototype.dropDownImage);a.appendChild(b);b.style.position="absolute";b.style.right="4px";b.style.top=(EditorUi.compactUi?6:8)+"px"};
Toolbar.prototype.addTableDropDown=function(){var a=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableCellItem(a)}));a.style.position="relative";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.width="30px";a.innerHTML='<div class="geSprite geSprite-table"></div>';this.appendDropDownImageHtml(a);a.getElementsByTagName("div")[0].style.marginLeft="-2px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left=
-"22px",a.getElementsByTagName("img")[0].style.top="5px");var c=this.editorUi.menus.get("insert");null!=c&&"function"===typeof a.setEnabled&&c.addListener("stateChanged",function(){a.setEnabled(c.enabled)});return a};
-Toolbar.prototype.addDropDownArrow=function(a,c,b,e,d,f,k,h){d=EditorUi.compactUi?d:h;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=e-(null!=k?k:32)+"px";a.innerHTML='<div class="geSprite '+c+'"></div>';this.appendDropDownImageHtml(a);c=a.getElementsByTagName("div")[0];c.style.marginLeft=d+"px";c.style.marginTop=f+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width=
-b-10+"px")};Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerHTML="";var c=document.createElement("div");c.style.display="inline-block";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.maxWidth="66px";mxUtils.write(c,a);this.fontMenu.appendChild(c);this.appendDropDownImageHtml(this.fontMenu)}};
-Toolbar.prototype.setFontSize=function(a){if(null!=this.sizeMenu){this.sizeMenu.innerHTML="";var c=document.createElement("div");c.style.display="inline-block";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.maxWidth="24px";mxUtils.write(c,a);this.sizeMenu.appendChild(c);this.appendDropDownImageHtml(this.sizeMenu)}};
-Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi.editor.graph,c=this.addMenu("",mxResources.get("style"),!0,"formatBlock");c.style.position="relative";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.innerHTML=mxResources.get("style");this.appendDropDownImageHtml(c);EditorUi.compactUi&&(c.style.paddingRight="18px",c.getElementsByTagName("img")[0].style.right="1px",c.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.fontMenu=this.addMenu("",mxResources.get("fontFamily"),
+"22px",a.getElementsByTagName("img")[0].style.top="5px");var b=this.editorUi.menus.get("insert");null!=b&&"function"===typeof a.setEnabled&&b.addListener("stateChanged",function(){a.setEnabled(b.enabled)});return a};
+Toolbar.prototype.addDropDownArrow=function(a,b,d,e,c,f,k,h){c=EditorUi.compactUi?c:h;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=e-(null!=k?k:32)+"px";a.innerHTML='<div class="geSprite '+b+'"></div>';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=c+"px";b.style.marginTop=f+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width=
+d-10+"px")};Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="66px";mxUtils.write(b,a);this.fontMenu.appendChild(b);this.appendDropDownImageHtml(this.fontMenu)}};
+Toolbar.prototype.setFontSize=function(a){if(null!=this.sizeMenu){this.sizeMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="24px";mxUtils.write(b,a);this.sizeMenu.appendChild(b);this.appendDropDownImageHtml(this.sizeMenu)}};
+Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi,b=a.editor.graph,d=this.addMenu("",mxResources.get("style"),!0,"formatBlock");d.style.position="relative";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.innerHTML=mxResources.get("style");this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.style.paddingRight="18px",d.getElementsByTagName("img")[0].style.right="1px",d.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.fontMenu=this.addMenu("",mxResources.get("fontFamily"),
!0,"fontFamily");this.fontMenu.style.position="relative";this.fontMenu.style.whiteSpace="nowrap";this.fontMenu.style.overflow="hidden";this.fontMenu.style.width="68px";this.setFontName(Menus.prototype.defaultFont);EditorUi.compactUi&&(this.fontMenu.style.paddingRight="18px",this.fontMenu.getElementsByTagName("img")[0].style.right="1px",this.fontMenu.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.sizeMenu=this.addMenu(Menus.prototype.defaultFontSize,mxResources.get("fontSize"),
-!0,"fontSize");this.sizeMenu.style.position="relative";this.sizeMenu.style.whiteSpace="nowrap";this.sizeMenu.style.overflow="hidden";this.sizeMenu.style.width="24px";this.setFontSize(Menus.prototype.defaultFontSize);EditorUi.compactUi&&(this.sizeMenu.style.paddingRight="18px",this.sizeMenu.getElementsByTagName("img")[0].style.right="1px",this.sizeMenu.getElementsByTagName("img")[0].style.top="5px");c=this.addItems("- undo redo - bold italic underline".split(" "));c[1].setAttribute("title",mxResources.get("undo")+
-" ("+this.editorUi.actions.get("undo").shortcut+")");c[2].setAttribute("title",mxResources.get("redo")+" ("+this.editorUi.actions.get("redo").shortcut+")");c[4].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");c[5].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");c[6].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var b=this.addMenuFunction("",
-mxResources.get("align"),!1,mxUtils.bind(this,function(b){e=b.addItem("",null,mxUtils.bind(this,function(b){a.cellEditor.alignText(mxConstants.ALIGN_LEFT,b)}),null,"geIcon geSprite geSprite-left");e.setAttribute("title",mxResources.get("left"));e=b.addItem("",null,mxUtils.bind(this,function(b){a.cellEditor.alignText(mxConstants.ALIGN_CENTER,b)}),null,"geIcon geSprite geSprite-center");e.setAttribute("title",mxResources.get("center"));e=b.addItem("",null,mxUtils.bind(this,function(b){a.cellEditor.alignText(mxConstants.ALIGN_RIGHT,
-b)}),null,"geIcon geSprite geSprite-right");e.setAttribute("title",mxResources.get("right"));e=b.addItem("",null,mxUtils.bind(this,function(){document.execCommand("justifyfull",!1,null)}),null,"geIcon geSprite geSprite-justifyfull");e.setAttribute("title",mxResources.get("justifyfull"));e=b.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertorderedlist",!1,null)}),null,"geIcon geSprite geSprite-orderedlist");e.setAttribute("title",mxResources.get("numberedList"));e=b.addItem("",
-null,mxUtils.bind(this,function(){document.execCommand("insertunorderedlist",!1,null)}),null,"geIcon geSprite geSprite-unorderedlist");e.setAttribute("title",mxResources.get("bulletedList"));e=b.addItem("",null,mxUtils.bind(this,function(){document.execCommand("outdent",!1,null)}),null,"geIcon geSprite geSprite-outdent");e.setAttribute("title",mxResources.get("decreaseIndent"));e=b.addItem("",null,mxUtils.bind(this,function(){document.execCommand("indent",!1,null)}),null,"geIcon geSprite geSprite-indent");
-e.setAttribute("title",mxResources.get("increaseIndent"))}));b.style.position="relative";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.width="30px";b.innerHTML="";c=document.createElement("div");c.className="geSprite geSprite-left";c.style.marginLeft="-2px";b.appendChild(c);this.appendDropDownImageHtml(b);EditorUi.compactUi&&(b.getElementsByTagName("img")[0].style.left="22px",b.getElementsByTagName("img")[0].style.top="5px");b=this.addMenuFunction("",mxResources.get("format"),!1,mxUtils.bind(this,
-function(a){e=a.addItem("",null,this.editorUi.actions.get("subscript").funct,null,"geIcon geSprite geSprite-subscript");e.setAttribute("title",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)");e=a.addItem("",null,this.editorUi.actions.get("superscript").funct,null,"geIcon geSprite geSprite-superscript");e.setAttribute("title",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)");e=a.addItem("",null,this.editorUi.actions.get("fontColor").funct,null,"geIcon geSprite geSprite-fontcolor");e.setAttribute("title",
-mxResources.get("fontColor"));e=a.addItem("",null,this.editorUi.actions.get("backgroundColor").funct,null,"geIcon geSprite geSprite-fontbackground");e.setAttribute("title",mxResources.get("backgroundColor"));e=a.addItem("",null,mxUtils.bind(this,function(){document.execCommand("removeformat",!1,null)}),null,"geIcon geSprite geSprite-removeformat");e.setAttribute("title",mxResources.get("removeFormat"))}));b.style.position="relative";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.width=
-"30px";b.innerHTML="";c=document.createElement("div");c.className="geSprite geSprite-dots";c.style.marginLeft="-2px";b.appendChild(c);this.appendDropDownImageHtml(b);EditorUi.compactUi&&(b.getElementsByTagName("img")[0].style.left="22px",b.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){a.cellEditor.toggleViewMode();0<a.cellEditor.textarea.innerHTML.length&&("&nbsp;"!=a.cellEditor.textarea.innerHTML||
-!a.cellEditor.clearOnChange)&&window.setTimeout(function(){document.execCommand("selectAll",!1,null)})});this.addSeparator();b=this.addMenuFunction("",mxResources.get("insert"),!0,mxUtils.bind(this,function(a){a.addItem(mxResources.get("insertLink"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("link").funct()}));a.addItem(mxResources.get("insertImage"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("image").funct()}));a.addItem(mxResources.get("insertHorizontalRule"),null,
-mxUtils.bind(this,function(){document.execCommand("inserthorizontalrule",!1,null)}))}));b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.position="relative";b.style.width="16px";b.innerHTML="";c=document.createElement("div");c.className="geSprite geSprite-plus";c.style.marginLeft="-4px";c.style.marginTop="-3px";b.appendChild(c);this.appendDropDownImageHtml(b);EditorUi.compactUi&&(b.getElementsByTagName("img")[0].style.left="24px",b.getElementsByTagName("img")[0].style.top="5px",b.style.width=
-"30px");this.addSeparator();var e=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(b){var c=a.getSelectedElement(),d=a.getParentByNames(c,["TD","TH"],a.cellEditor.text2),e=a.getParentByName(c,"TR",a.cellEditor.text2);if(null==e)this.editorUi.menus.addInsertTableItem(b);else{var g=a.getParentByName(e,"TABLE",a.cellEditor.text2),c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(g,null!=d?d.cellIndex:0))}catch(l){this.editorUi.handleError(l)}}),
-null,"geIcon geSprite geSprite-insertcolumnbefore");c.setAttribute("title",mxResources.get("insertColumnBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertColumn(g,null!=d?d.cellIndex+1:-1))}catch(l){this.editorUi.handleError(l)}}),null,"geIcon geSprite geSprite-insertcolumnafter");c.setAttribute("title",mxResources.get("insertColumnAfter"));c=b.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=d)try{a.deleteColumn(g,d.cellIndex)}catch(l){this.editorUi.handleError(l)}}),
-null,"geIcon geSprite geSprite-deletecolumn");c.setAttribute("title",mxResources.get("deleteColumn"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(g,e.sectionRowIndex))}catch(l){this.editorUi.handleError(l)}}),null,"geIcon geSprite geSprite-insertrowbefore");c.setAttribute("title",mxResources.get("insertRowBefore"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.selectNode(a.insertRow(g,e.sectionRowIndex+1))}catch(l){this.editorUi.handleError(l)}}),null,"geIcon geSprite geSprite-insertrowafter");
-c.setAttribute("title",mxResources.get("insertRowAfter"));c=b.addItem("",null,mxUtils.bind(this,function(){try{a.deleteRow(g,e.sectionRowIndex)}catch(l){this.editorUi.handleError(l)}}),null,"geIcon geSprite geSprite-deleterow");c.setAttribute("title",mxResources.get("deleteRow"));c=b.addItem("",null,mxUtils.bind(this,function(){var a=g.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
-("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){null==a||a==mxConstants.NONE?(g.removeAttribute("border"),g.style.border="",g.style.borderCollapse=""):(g.setAttribute("border","1"),g.style.border="1px solid "+a,g.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");c.setAttribute("title",mxResources.get("borderColor"));c=b.addItem("",null,mxUtils.bind(this,function(){var a=g.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
-function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){g.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}),null,"geIcon geSprite geSprite-fillcolor");c.setAttribute("title",mxResources.get("backgroundColor"));c=b.addItem("",null,mxUtils.bind(this,function(){var a=g.getAttribute("cellPadding")||0,a=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),
-mxUtils.bind(this,function(a){null!=a&&0<a.length?g.setAttribute("cellPadding",a):g.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,"geIcon geSprite geSprite-fit");c.setAttribute("title",mxResources.get("spacing"));c=b.addItem("",null,mxUtils.bind(this,function(){g.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");c.setAttribute("title",mxResources.get("left"));c=b.addItem("",null,mxUtils.bind(this,
-function(){g.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");c.setAttribute("title",mxResources.get("center"));c=b.addItem("",null,mxUtils.bind(this,function(){g.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");c.setAttribute("title",mxResources.get("right"))}}));e.style.position="relative";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.width="30px";e.innerHTML="";c=document.createElement("div");c.className="geSprite geSprite-table";c.style.marginLeft=
-"-2px";e.appendChild(c);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="22px",e.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
-Toolbar.prototype.addMenu=function(a,c,b,e,d,f,k){var h=this.editorUi.menus.get(e),g=this.addMenuFunction(a,c,b,function(){h.funct.apply(h,arguments)},d,f);k||"function"!==typeof g.setEnabled||h.addListener("stateChanged",function(){g.setEnabled(h.enabled)});return g};Toolbar.prototype.addMenuFunction=function(a,c,b,e,d,f){return this.addMenuFunctionInContainer(null!=d?d:this.container,a,c,b,e,f)};
-Toolbar.prototype.addMenuFunctionInContainer=function(a,c,b,e,d,f){c=e?this.createLabel(c):this.createButton(c);this.initElement(c,b);this.addMenuHandler(c,e,d,f);a.appendChild(c);return c};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var c=document.createElement("div");c.className="geSeparator";a.appendChild(c);return c};
-Toolbar.prototype.addItems=function(a,c,b){for(var e=[],d=0;d<a.length;d++){var f=a[d];"-"==f?e.push(this.addSeparator(c)):e.push(this.addItem("geSprite-"+f.toLowerCase(),f,c,b))}return e};Toolbar.prototype.addItem=function(a,c,b,e){var d=this.editorUi.actions.get(c),f=null;null!=d&&(c=d.label,null!=d.shortcut&&(c+=" ("+d.shortcut+")"),f=this.addButton(a,c,d.funct,b),e||"function"!==typeof f.setEnabled||(f.setEnabled(d.enabled),d.addListener("stateChanged",function(){f.setEnabled(d.enabled)})));return f};
-Toolbar.prototype.addButton=function(a,c,b,e){a=this.createButton(a);e=null!=e?e:this.container;this.initElement(a,c);this.addClickHandler(a,b);e.appendChild(a);return a};Toolbar.prototype.initElement=function(a,c){null!=c&&a.setAttribute("title",c);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var c=a.className;a.setEnabled=function(b){a.enabled=b;a.className=b?c:c+" mxDisabled"};a.setEnabled(!0)};
-Toolbar.prototype.addClickHandler=function(a,c){null!=c&&(mxEvent.addListener(a,"click",function(b){a.enabled&&c(b);mxEvent.consume(b)}),mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})))};Toolbar.prototype.createButton=function(a){var c=document.createElement("a");c.className="geButton";var b=document.createElement("div");null!=a&&(b.className="geSprite "+a);c.appendChild(b);return c};
-Toolbar.prototype.createLabel=function(a,c){var b=document.createElement("a");b.className="geLabel";mxUtils.write(b,a);return b};
-Toolbar.prototype.addMenuHandler=function(a,c,b,e){if(null!=b){var d=this.editorUi.editor.graph,f=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(h){if(k&&(null==a.enabled||a.enabled)){d.popupMenuHandler.hideMenu();f=new mxPopupMenu(b);f.div.className+=" geToolbarMenu";f.showDisabled=e;f.labels=c;f.autoExpand=!0;var g=mxUtils.getOffset(a);f.popup(g.x,g.y+a.offsetHeight,null,h);this.editorUi.setCurrentMenu(f,a);!c&&f.div.scrollHeight>f.div.clientHeight&&(f.div.style.width="40px");
+!0,"fontSize");this.sizeMenu.style.position="relative";this.sizeMenu.style.whiteSpace="nowrap";this.sizeMenu.style.overflow="hidden";this.sizeMenu.style.width="24px";this.setFontSize(Menus.prototype.defaultFontSize);EditorUi.compactUi&&(this.sizeMenu.style.paddingRight="18px",this.sizeMenu.getElementsByTagName("img")[0].style.right="1px",this.sizeMenu.getElementsByTagName("img")[0].style.top="5px");d=this.addItems("- undo redo - bold italic underline".split(" "));d[1].setAttribute("title",mxResources.get("undo")+
+" ("+a.actions.get("undo").shortcut+")");d[2].setAttribute("title",mxResources.get("redo")+" ("+a.actions.get("redo").shortcut+")");d[4].setAttribute("title",mxResources.get("bold")+" ("+a.actions.get("bold").shortcut+")");d[5].setAttribute("title",mxResources.get("italic")+" ("+a.actions.get("italic").shortcut+")");d[6].setAttribute("title",mxResources.get("underline")+" ("+a.actions.get("underline").shortcut+")");var e=this.addMenuFunction("",mxResources.get("align"),!1,mxUtils.bind(this,function(d){c=
+d.addItem("",null,mxUtils.bind(this,function(c){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,c);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-left");c.setAttribute("title",mxResources.get("left"));c=d.addItem("",null,mxUtils.bind(this,function(c){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,c);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],
+"values",[mxConstants.ALIGN_CENTER],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-center");c.setAttribute("title",mxResources.get("center"));c=d.addItem("",null,mxUtils.bind(this,function(c){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,c);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-right");c.setAttribute("title",mxResources.get("right"));
+c=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("justifyfull",!1,null)}),null,"geIcon geSprite geSprite-justifyfull");c.setAttribute("title",mxResources.get("justifyfull"));c=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertorderedlist",!1,null)}),null,"geIcon geSprite geSprite-orderedlist");c.setAttribute("title",mxResources.get("numberedList"));c=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertunorderedlist",!1,null)}),null,
+"geIcon geSprite geSprite-unorderedlist");c.setAttribute("title",mxResources.get("bulletedList"));c=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("outdent",!1,null)}),null,"geIcon geSprite geSprite-outdent");c.setAttribute("title",mxResources.get("decreaseIndent"));c=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("indent",!1,null)}),null,"geIcon geSprite geSprite-indent");c.setAttribute("title",mxResources.get("increaseIndent"))}));e.style.position="relative";
+e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.width="30px";e.innerHTML="";d=document.createElement("div");d.className="geSprite geSprite-left";d.style.marginLeft="-2px";e.appendChild(d);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="22px",e.getElementsByTagName("img")[0].style.top="5px");e=this.addMenuFunction("",mxResources.get("format"),!1,mxUtils.bind(this,function(a){c=a.addItem("",null,this.editorUi.actions.get("subscript").funct,
+null,"geIcon geSprite geSprite-subscript");c.setAttribute("title",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)");c=a.addItem("",null,this.editorUi.actions.get("superscript").funct,null,"geIcon geSprite geSprite-superscript");c.setAttribute("title",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)");c=a.addItem("",null,this.editorUi.actions.get("fontColor").funct,null,"geIcon geSprite geSprite-fontcolor");c.setAttribute("title",mxResources.get("fontColor"));c=a.addItem("",null,this.editorUi.actions.get("backgroundColor").funct,
+null,"geIcon geSprite geSprite-fontbackground");c.setAttribute("title",mxResources.get("backgroundColor"));c=a.addItem("",null,mxUtils.bind(this,function(){document.execCommand("removeformat",!1,null)}),null,"geIcon geSprite geSprite-removeformat");c.setAttribute("title",mxResources.get("removeFormat"))}));e.style.position="relative";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.width="30px";e.innerHTML="";d=document.createElement("div");d.className="geSprite geSprite-dots";d.style.marginLeft=
+"-2px";e.appendChild(d);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="22px",e.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode();0<b.cellEditor.textarea.innerHTML.length&&("&nbsp;"!=b.cellEditor.textarea.innerHTML||!b.cellEditor.clearOnChange)&&window.setTimeout(function(){document.execCommand("selectAll",!1,null)})});
+this.addSeparator();e=this.addMenuFunction("",mxResources.get("insert"),!0,mxUtils.bind(this,function(a){a.addItem(mxResources.get("insertLink"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("link").funct()}));a.addItem(mxResources.get("insertImage"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("image").funct()}));a.addItem(mxResources.get("insertHorizontalRule"),null,mxUtils.bind(this,function(){document.execCommand("inserthorizontalrule",!1,null)}))}));e.style.whiteSpace=
+"nowrap";e.style.overflow="hidden";e.style.position="relative";e.style.width="16px";e.innerHTML="";d=document.createElement("div");d.className="geSprite geSprite-plus";d.style.marginLeft="-4px";d.style.marginTop="-3px";e.appendChild(d);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="24px",e.getElementsByTagName("img")[0].style.top="5px",e.style.width="30px");this.addSeparator();var c=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),
+!1,mxUtils.bind(this,function(a){var c=b.getSelectedElement(),d=b.getParentByNames(c,["TD","TH"],b.cellEditor.text2),e=b.getParentByName(c,"TR",b.cellEditor.text2);if(null==e)this.editorUi.menus.addInsertTableItem(a);else{var f=b.getParentByName(e,"TABLE",b.cellEditor.text2),c=a.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(f,null!=d?d.cellIndex:0))}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnbefore");c.setAttribute("title",mxResources.get("insertColumnBefore"));
+c=a.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(f,null!=d?d.cellIndex+1:-1))}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnafter");c.setAttribute("title",mxResources.get("insertColumnAfter"));c=a.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=d)try{b.deleteColumn(f,d.cellIndex)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deletecolumn");c.setAttribute("title",mxResources.get("deleteColumn"));
+c=a.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(f,e.sectionRowIndex))}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowbefore");c.setAttribute("title",mxResources.get("insertRowBefore"));c=a.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(f,e.sectionRowIndex+1))}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowafter");c.setAttribute("title",mxResources.get("insertRowAfter"));c=a.addItem("",
+null,mxUtils.bind(this,function(){try{b.deleteRow(f,e.sectionRowIndex)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deleterow");c.setAttribute("title",mxResources.get("deleteRow"));c=a.addItem("",null,mxUtils.bind(this,function(){var a=f.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,
+function(a){null==a||a==mxConstants.NONE?(f.removeAttribute("border"),f.style.border="",f.style.borderCollapse=""):(f.setAttribute("border","1"),f.style.border="1px solid "+a,f.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");c.setAttribute("title",mxResources.get("borderColor"));c=a.addItem("",null,mxUtils.bind(this,function(){var a=f.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+
+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){f.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}),null,"geIcon geSprite geSprite-fillcolor");c.setAttribute("title",mxResources.get("backgroundColor"));c=a.addItem("",null,mxUtils.bind(this,function(){var a=f.getAttribute("cellPadding")||0,a=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?f.setAttribute("cellPadding",
+a):f.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,"geIcon geSprite geSprite-fit");c.setAttribute("title",mxResources.get("spacing"));c=a.addItem("",null,mxUtils.bind(this,function(){f.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");c.setAttribute("title",mxResources.get("left"));c=a.addItem("",null,mxUtils.bind(this,function(){f.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");
+c.setAttribute("title",mxResources.get("center"));c=a.addItem("",null,mxUtils.bind(this,function(){f.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");c.setAttribute("title",mxResources.get("right"))}}));c.style.position="relative";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.width="30px";c.innerHTML="";d=document.createElement("div");d.className="geSprite geSprite-table";d.style.marginLeft="-2px";c.appendChild(d);this.appendDropDownImageHtml(c);EditorUi.compactUi&&
+(c.getElementsByTagName("img")[0].style.left="22px",c.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,b,d,e,c,f,k){var h=this.editorUi.menus.get(e),g=this.addMenuFunction(a,b,d,function(){h.funct.apply(h,arguments)},c,f);k||"function"!==typeof g.setEnabled||h.addListener("stateChanged",function(){g.setEnabled(h.enabled)});return g};
+Toolbar.prototype.addMenuFunction=function(a,b,d,e,c,f){return this.addMenuFunctionInContainer(null!=c?c:this.container,a,b,d,e,f)};Toolbar.prototype.addMenuFunctionInContainer=function(a,b,d,e,c,f){b=e?this.createLabel(b):this.createButton(b);this.initElement(b,d);this.addMenuHandler(b,e,c,f);a.appendChild(b);return b};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var b=document.createElement("div");b.className="geSeparator";a.appendChild(b);return b};
+Toolbar.prototype.addItems=function(a,b,d){for(var e=[],c=0;c<a.length;c++){var f=a[c];"-"==f?e.push(this.addSeparator(b)):e.push(this.addItem("geSprite-"+f.toLowerCase(),f,b,d))}return e};Toolbar.prototype.addItem=function(a,b,d,e){var c=this.editorUi.actions.get(b),f=null;null!=c&&(b=c.label,null!=c.shortcut&&(b+=" ("+c.shortcut+")"),f=this.addButton(a,b,c.funct,d),e||"function"!==typeof f.setEnabled||(f.setEnabled(c.enabled),c.addListener("stateChanged",function(){f.setEnabled(c.enabled)})));return f};
+Toolbar.prototype.addButton=function(a,b,d,e){a=this.createButton(a);e=null!=e?e:this.container;this.initElement(a,b);this.addClickHandler(a,d);e.appendChild(a);return a};Toolbar.prototype.initElement=function(a,b){null!=b&&a.setAttribute("title",b);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var b=a.className;a.setEnabled=function(d){a.enabled=d;a.className=d?b:b+" mxDisabled"};a.setEnabled(!0)};
+Toolbar.prototype.addClickHandler=function(a,b){null!=b&&(mxEvent.addListener(a,"click",function(d){a.enabled&&b(d);mxEvent.consume(d)}),mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()})))};Toolbar.prototype.createButton=function(a){var b=document.createElement("a");b.className="geButton";var d=document.createElement("div");null!=a&&(d.className="geSprite "+a);b.appendChild(d);return b};
+Toolbar.prototype.createLabel=function(a,b){var d=document.createElement("a");d.className="geLabel";mxUtils.write(d,a);return d};
+Toolbar.prototype.addMenuHandler=function(a,b,d,e){if(null!=d){var c=this.editorUi.editor.graph,f=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(h){if(k&&(null==a.enabled||a.enabled)){c.popupMenuHandler.hideMenu();f=new mxPopupMenu(d);f.div.className+=" geToolbarMenu";f.showDisabled=e;f.labels=b;f.autoExpand=!0;var g=mxUtils.getOffset(a);f.popup(g.x,g.y+a.offsetHeight,null,h);this.editorUi.setCurrentMenu(f,a);!b&&f.div.scrollHeight>f.div.clientHeight&&(f.div.style.width="40px");
f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);this.editorUi.resetCurrentMenu();f.destroy()});f.addListener(mxEvent.EVENT_HIDE,mxUtils.bind(this,function(){this.currentElt=null}))}k=!0;mxEvent.consume(h)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){k=this.currentElt!=a;b.preventDefault()}))}};
-Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+0+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+0+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,c,b,e){function d(){var b=k.value;/(^#?[a-zA-Z0-9]*$)/.test(b)?("none"!=
-b&&"#"!=b.charAt(0)&&(b="#"+b),ColorDialog.addRecentColor("none"!=b?b.substring(1):b,12),h(b),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function f(){var a=m(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var h=null!=b?b:this.createApplyFunction();
-this.init=function(){mxClient.IS_TOUCH||k.focus()};var g=new mxJSColor.color(k);g.pickerOnfocus=!1;g.showPicker();b=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";b.appendChild(mxJSColor.picker.box);var l=document.createElement("center"),m=mxUtils.bind(this,function(a,b,c,e){b=null!=b?b:12;var h=document.createElement("table");h.style.borderCollapse=
-"collapse";h.setAttribute("cellspacing","0");h.style.marginBottom="20px";h.style.cellSpacing="0px";var m=document.createElement("tbody");h.appendChild(m);for(var n=a.length/b,p=0;p<n;p++){for(var q=document.createElement("tr"),t=0;t<b;t++)mxUtils.bind(this,function(a){var b=document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=c);if("none"==a)b.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null!=
-a){b.style.backgroundColor="#"+a;var e=this.colorNames[a.toUpperCase()];null!=e&&b.setAttribute("title",e)}q.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),k.value="none"):g.fromString(a)}),mxEvent.addListener(b,"dblclick",d))})(a[p*b+t]);m.appendChild(q)}e&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height=
-"16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",q.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();h.parentNode.replaceChild(f(),h)}));l.appendChild(h);return h});b.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width="182px";var n=document.createElement("input");n.setAttribute("type","color");
-n.style.visibility="hidden";n.style.width="0px";n.style.height="0px";n.style.border="none";n.style.marginLeft="2px";b.style.whiteSpace="nowrap";b.appendChild(n);b.appendChild(mxUtils.button("...",function(){document.activeElement==n?k.focus():(n.value="#"+k.value,n.click())}));mxEvent.addListener(n,"input",function(){g.fromString(n.value.substring(1))})}mxUtils.br(b);f();var p=m(this.presetColors);p.style.marginBottom="8px";p=m(this.defaultColors);p.style.marginBottom="16px";b.appendChild(l);p=document.createElement("div");
-p.style.textAlign="right";p.style.whiteSpace="nowrap";var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});q.className="geBtn";a.editor.cancelFirst&&p.appendChild(q);var t=mxUtils.button(mxResources.get("apply"),d);t.className="geBtn gePrimaryBtn";p.appendChild(t);a.editor.cancelFirst||p.appendChild(q);null!=c&&("none"==c?(g.fromString("ffffff"),k.value="none"):g.fromString(c));b.appendChild(p);this.picker=g;this.colorInput=k;mxEvent.addListener(b,"keydown",function(b){27==
-b.keyCode&&(a.hideDialog(),null!=e&&e(),mxEvent.consume(b))});this.container=b};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
-ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var c=this.editorUi.editor.graph;c.getModel().beginUpdate();try{c.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}})};ColorDialog.recentColors=[];
-ColorDialog.addRecentColor=function(a,c){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=c&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};
-var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("align","center");var b=document.createElement("h3");mxUtils.write(b,mxResources.get("about")+" GraphEditor");c.appendChild(b);b=document.createElement("img");b.style.border="0px";b.setAttribute("width","176");b.setAttribute("width","151");b.setAttribute("src",IMAGE_PATH+"/logo.png");c.appendChild(b);mxUtils.br(c);mxUtils.write(c,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(c);b=document.createElement("a");b.setAttribute("href",
-"http://www.jgraph.com/");b.setAttribute("target","_blank");mxUtils.write(b,"www.jgraph.com");c.appendChild(b);mxUtils.br(c);mxUtils.br(c);b=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});b.className="geBtn gePrimaryBtn";c.appendChild(b);this.container=c},TextareaDialog=function(a,c,b,e,d,f,k,h,g,l,m,n,p,q){k=null!=k?k:300;h=null!=h?h:120;l=null!=l?l:!1;var t,v,u=document.createElement("table"),x=document.createElement("tbody");t=document.createElement("tr");v=document.createElement("td");
-v.style.fontSize="10pt";v.style.width="100px";mxUtils.write(v,c);t.appendChild(v);x.appendChild(t);t=document.createElement("tr");v=document.createElement("td");var w=document.createElement("textarea");m&&w.setAttribute("wrap","off");w.setAttribute("spellcheck","false");w.setAttribute("autocorrect","off");w.setAttribute("autocomplete","off");w.setAttribute("autocapitalize","off");mxUtils.write(w,b||"");w.style.resize="none";w.style.width=k+"px";w.style.height=h+"px";this.textarea=w;this.init=function(){w.focus();
-w.scrollTop=0};v.appendChild(w);t.appendChild(v);x.appendChild(t);t=document.createElement("tr");v=document.createElement("td");v.style.paddingTop="14px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");null!=p&&(c=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(p)}),c.className="geBtn",v.appendChild(c));if(null!=q)for(c=0;c<q.length;c++)(function(a,b){var c=mxUtils.button(a,function(a){b(a,w)});c.className="geBtn";v.appendChild(c)})(q[c][0],q[c][1]);f=mxUtils.button(f||
-mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});f.className="geBtn";a.editor.cancelFirst&&v.appendChild(f);null!=g&&g(v,w);null!=e&&(g=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();e(w.value)}),g.className="geBtn gePrimaryBtn",v.appendChild(g));a.editor.cancelFirst||v.appendChild(f);t.appendChild(v);x.appendChild(t);u.appendChild(x);this.container=u},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var b=document.createElement("textarea");
-b.setAttribute("wrap","off");b.setAttribute("spellcheck","false");b.setAttribute("autocorrect","off");b.setAttribute("autocomplete","off");b.setAttribute("autocapitalize","off");b.style.overflow="auto";b.style.resize="none";b.style.width="600px";b.style.height="360px";b.style.marginBottom="16px";b.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(b);this.init=function(){b.focus()};Graph.fileSupport&&(b.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},
-!1),b.addEventListener("drop",function(c){c.stopPropagation();c.preventDefault();if(0<c.dataTransfer.files.length){c=c.dataTransfer.files[0];var d=new FileReader;d.onload=function(a){b.value=a.target.result};d.readAsText(c)}else b.value=a.extractGraphModelFromEvent(c)},!1));var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&c.appendChild(e);var d=document.createElement("select");d.style.width="180px";d.className="geBtn";if(a.editor.graph.isEnabled()){var f=
-document.createElement("option");f.setAttribute("value","replace");mxUtils.write(f,mxResources.get("replaceExistingDrawing"));d.appendChild(f)}f=document.createElement("option");f.setAttribute("value","new");mxUtils.write(f,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&d.appendChild(f);a.editor.graph.isEnabled()&&(f=document.createElement("option"),f.setAttribute("value","import"),mxUtils.write(f,mxResources.get("addToExistingDrawing")),d.appendChild(f));c.appendChild(d);
-f=mxUtils.button(mxResources.get("ok"),function(){var c=Graph.zapGremlins(mxUtils.trim(b.value)),e=null;if("new"==d.value)a.hideDialog(),a.editor.editAsNew(c);else if("replace"==d.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(c).documentElement),a.hideDialog()}catch(n){e=n}finally{a.editor.graph.model.endUpdate()}}else if("import"==d.value){a.editor.graph.model.beginUpdate();try{var f=mxUtils.parseXml(c),l=new mxGraphModel;(new mxCodec(f)).decode(f.documentElement,
-l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(n){e=n}finally{a.editor.graph.model.endUpdate()}}null!=e&&mxUtils.alert(e.message)});f.className="geBtn gePrimaryBtn";c.appendChild(f);a.editor.cancelFirst||c.appendChild(e);this.container=c};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),q.setAttribute("disabled","true"),t.setAttribute("disabled","true"),E.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),t.removeAttribute("disabled"),E.removeAttribute("disabled"));"png"===n.value||"svg"===n.value||"pdf"===n.value?w.removeAttribute("disabled"):w.setAttribute("disabled",
-"disabled");"png"===n.value||"jpg"===n.value||"pdf"===n.value?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled");"png"===n.value?(v.removeAttribute("disabled"),u.removeAttribute("disabled")):(v.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"))}function b(){q.style.backgroundColor=q.value*t.value>MAX_AREA||0>=q.value?"red":"";t.style.backgroundColor=q.value*t.value>MAX_AREA||0>=t.value?"red":""}var e=a.editor.graph,d=e.getGraphBounds(),f=e.view.scale,k=Math.ceil(d.width/
-f),h=Math.ceil(d.height/f),g,f=document.createElement("table"),l=document.createElement("tbody");f.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";g.style.width="100px";mxUtils.write(g,mxResources.get("filename")+":");d.appendChild(g);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";g=document.createElement("td");g.appendChild(m);d.appendChild(g);
-l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("format")+":");d.appendChild(g);var n=document.createElement("select");n.style.width="180px";g=document.createElement("option");g.setAttribute("value","png");mxUtils.write(g,mxResources.get("formatPng"));n.appendChild(g);g=document.createElement("option");ExportDialog.showGifOption&&(g.setAttribute("value","gif"),mxUtils.write(g,mxResources.get("formatGif")),n.appendChild(g));
+Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+0+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+0+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,d,e){function c(){var b=k.value;/(^#?[a-zA-Z0-9]*$)/.test(b)?("none"!=
+b&&"#"!=b.charAt(0)&&(b="#"+b),ColorDialog.addRecentColor("none"!=b?b.substring(1):b,12),h(b),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function f(){var a=m(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);a.style.marginBottom="8px";return a}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var h=null!=d?d:this.createApplyFunction();
+this.init=function(){mxClient.IS_TOUCH||k.focus()};var g=new mxJSColor.color(k);g.pickerOnfocus=!1;g.showPicker();d=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";d.appendChild(mxJSColor.picker.box);var l=document.createElement("center"),m=mxUtils.bind(this,function(a,b,d,e){b=null!=b?b:12;var h=document.createElement("table");h.style.borderCollapse=
+"collapse";h.setAttribute("cellspacing","0");h.style.marginBottom="20px";h.style.cellSpacing="0px";var m=document.createElement("tbody");h.appendChild(m);for(var n=a.length/b,p=0;p<n;p++){for(var q=document.createElement("tr"),t=0;t<b;t++)mxUtils.bind(this,function(a){var b=document.createElement("td");b.style.border="1px solid black";b.style.padding="0px";b.style.width="16px";b.style.height="16px";null==a&&(a=d);if("none"==a)b.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null!=
+a){b.style.backgroundColor="#"+a;var e=this.colorNames[a.toUpperCase()];null!=e&&b.setAttribute("title",e)}q.appendChild(b);null!=a&&(b.style.cursor="pointer",mxEvent.addListener(b,"click",function(){"none"==a?(g.fromString("ffffff"),k.value="none"):g.fromString(a)}),mxEvent.addListener(b,"dblclick",c))})(a[p*b+t]);m.appendChild(q)}e&&(a=document.createElement("td"),a.setAttribute("title",mxResources.get("reset")),a.style.border="1px solid black",a.style.padding="0px",a.style.width="16px",a.style.height=
+"16px",a.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",a.style.backgroundPosition="center center",a.style.backgroundRepeat="no-repeat",a.style.cursor="pointer",q.appendChild(a),mxEvent.addListener(a,"click",function(){ColorDialog.resetRecentColors();h.parentNode.replaceChild(f(),h)}));l.appendChild(h);return h});d.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width="182px";var n=document.createElement("input");n.setAttribute("type","color");
+n.style.visibility="hidden";n.style.width="0px";n.style.height="0px";n.style.border="none";n.style.marginLeft="2px";d.style.whiteSpace="nowrap";d.appendChild(n);d.appendChild(mxUtils.button("...",function(){document.activeElement==n?k.focus():(n.value="#"+k.value,n.click())}));mxEvent.addListener(n,"input",function(){g.fromString(n.value.substring(1))})}mxUtils.br(d);f();var p=m(this.presetColors);p.style.marginBottom="8px";p=m(this.defaultColors);p.style.marginBottom="16px";d.appendChild(l);p=document.createElement("div");
+p.style.textAlign="right";p.style.whiteSpace="nowrap";var q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});q.className="geBtn";a.editor.cancelFirst&&p.appendChild(q);var u=mxUtils.button(mxResources.get("apply"),c);u.className="geBtn gePrimaryBtn";p.appendChild(u);a.editor.cancelFirst||p.appendChild(q);null!=b&&("none"==b?(g.fromString("ffffff"),k.value="none"):g.fromString(b));d.appendChild(p);this.picker=g;this.colorInput=k;mxEvent.addListener(d,"keydown",function(b){27==
+b.keyCode&&(a.hideDialog(),null!=e&&e(),mxEvent.consume(b))});this.container=d};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
+ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var b=this.editorUi.editor.graph;b.getModel().beginUpdate();try{b.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}})};ColorDialog.recentColors=[];
+ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};
+var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var d=document.createElement("h3");mxUtils.write(d,mxResources.get("about")+" GraphEditor");b.appendChild(d);d=document.createElement("img");d.style.border="0px";d.setAttribute("width","176");d.setAttribute("width","151");d.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(d);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);d=document.createElement("a");d.setAttribute("href",
+"http://www.jgraph.com/");d.setAttribute("target","_blank");mxUtils.write(d,"www.jgraph.com");b.appendChild(d);mxUtils.br(b);mxUtils.br(b);d=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});d.className="geBtn gePrimaryBtn";b.appendChild(d);this.container=b},TextareaDialog=function(a,b,d,e,c,f,k,h,g,l,m,n,p,q){k=null!=k?k:300;h=null!=h?h:120;l=null!=l?l:!1;var u,v,t=document.createElement("table"),x=document.createElement("tbody");u=document.createElement("tr");v=document.createElement("td");
+v.style.fontSize="10pt";v.style.width="100px";mxUtils.write(v,b);u.appendChild(v);x.appendChild(u);u=document.createElement("tr");v=document.createElement("td");var w=document.createElement("textarea");m&&w.setAttribute("wrap","off");w.setAttribute("spellcheck","false");w.setAttribute("autocorrect","off");w.setAttribute("autocomplete","off");w.setAttribute("autocapitalize","off");mxUtils.write(w,d||"");w.style.resize="none";w.style.width=k+"px";w.style.height=h+"px";this.textarea=w;this.init=function(){w.focus();
+w.scrollTop=0};v.appendChild(w);u.appendChild(v);x.appendChild(u);u=document.createElement("tr");v=document.createElement("td");v.style.paddingTop="14px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");null!=p&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(p)}),b.className="geBtn",v.appendChild(b));if(null!=q)for(b=0;b<q.length;b++)(function(a,b){var c=mxUtils.button(a,function(a){b(a,w)});c.className="geBtn";v.appendChild(c)})(q[b][0],q[b][1]);f=mxUtils.button(f||
+mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c()});f.className="geBtn";a.editor.cancelFirst&&v.appendChild(f);null!=g&&g(v,w);null!=e&&(g=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();e(w.value)}),g.className="geBtn gePrimaryBtn",v.appendChild(g));a.editor.cancelFirst||v.appendChild(f);u.appendChild(v);x.appendChild(u);t.appendChild(x);this.container=t},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var d=document.createElement("textarea");
+d.setAttribute("wrap","off");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.overflow="auto";d.style.resize="none";d.style.width="600px";d.style.height="360px";d.style.marginBottom="16px";d.value=mxUtils.getPrettyXml(a.editor.getGraphXml());b.appendChild(d);this.init=function(){d.focus()};Graph.fileSupport&&(d.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},
+!1),d.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){d.value=a.target.result};c.readAsText(b)}else d.value=a.extractGraphModelFromEvent(b)},!1));var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&b.appendChild(e);var c=document.createElement("select");c.style.width="180px";c.className="geBtn";if(a.editor.graph.isEnabled()){var f=
+document.createElement("option");f.setAttribute("value","replace");mxUtils.write(f,mxResources.get("replaceExistingDrawing"));c.appendChild(f)}f=document.createElement("option");f.setAttribute("value","new");mxUtils.write(f,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&c.appendChild(f);a.editor.graph.isEnabled()&&(f=document.createElement("option"),f.setAttribute("value","import"),mxUtils.write(f,mxResources.get("addToExistingDrawing")),c.appendChild(f));b.appendChild(c);
+f=mxUtils.button(mxResources.get("ok"),function(){var b=Graph.zapGremlins(mxUtils.trim(d.value)),e=null;if("new"==c.value)a.hideDialog(),a.editor.editAsNew(b);else if("replace"==c.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(n){e=n}finally{a.editor.graph.model.endUpdate()}}else if("import"==c.value){a.editor.graph.model.beginUpdate();try{var f=mxUtils.parseXml(b),l=new mxGraphModel;(new mxCodec(f)).decode(f.documentElement,
+l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(n){e=n}finally{a.editor.graph.model.endUpdate()}}null!=e&&mxUtils.alert(e.message)});f.className="geBtn gePrimaryBtn";b.appendChild(f);a.editor.cancelFirst||b.appendChild(e);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
+var ExportDialog=function(a){function b(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),q.setAttribute("disabled","true"),u.setAttribute("disabled","true"),E.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),u.removeAttribute("disabled"),E.removeAttribute("disabled"));"png"===n.value||"svg"===n.value||"pdf"===n.value?w.removeAttribute("disabled"):w.setAttribute("disabled",
+"disabled");"png"===n.value||"jpg"===n.value||"pdf"===n.value?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");"png"===n.value?(v.removeAttribute("disabled"),t.removeAttribute("disabled")):(v.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"))}function d(){q.style.backgroundColor=q.value*u.value>MAX_AREA||0>=q.value?"red":"";u.style.backgroundColor=q.value*u.value>MAX_AREA||0>=u.value?"red":""}var e=a.editor.graph,c=e.getGraphBounds(),f=e.view.scale,k=Math.ceil(c.width/
+f),h=Math.ceil(c.height/f),g,f=document.createElement("table"),l=document.createElement("tbody");f.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");c=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";g.style.width="100px";mxUtils.write(g,mxResources.get("filename")+":");c.appendChild(g);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";g=document.createElement("td");g.appendChild(m);c.appendChild(g);
+l.appendChild(c);c=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("format")+":");c.appendChild(g);var n=document.createElement("select");n.style.width="180px";g=document.createElement("option");g.setAttribute("value","png");mxUtils.write(g,mxResources.get("formatPng"));n.appendChild(g);g=document.createElement("option");ExportDialog.showGifOption&&(g.setAttribute("value","gif"),mxUtils.write(g,mxResources.get("formatGif")),n.appendChild(g));
g=document.createElement("option");g.setAttribute("value","jpg");mxUtils.write(g,mxResources.get("formatJpg"));n.appendChild(g);g=document.createElement("option");g.setAttribute("value","pdf");mxUtils.write(g,mxResources.get("formatPdf"));n.appendChild(g);g=document.createElement("option");g.setAttribute("value","svg");mxUtils.write(g,mxResources.get("formatSvg"));n.appendChild(g);ExportDialog.showXmlOption&&(g=document.createElement("option"),g.setAttribute("value","xml"),mxUtils.write(g,mxResources.get("formatXml")),
-n.appendChild(g));g=document.createElement("td");g.appendChild(n);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("zoom")+" (%):");d.appendChild(g);var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";g=document.createElement("td");g.appendChild(p);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");
-g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("width")+":");d.appendChild(g);var q=document.createElement("input");q.setAttribute("value",k);q.style.width="180px";g=document.createElement("td");g.appendChild(q);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("height")+":");d.appendChild(g);var t=document.createElement("input");t.setAttribute("value",h);t.style.width="180px";g=document.createElement("td");
-g.appendChild(t);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("dpi")+":");d.appendChild(g);var v=document.createElement("select");v.style.width="180px";g=document.createElement("option");g.setAttribute("value","100");mxUtils.write(g,"100dpi");v.appendChild(g);g=document.createElement("option");g.setAttribute("value","200");mxUtils.write(g,"200dpi");v.appendChild(g);g=document.createElement("option");
-g.setAttribute("value","300");mxUtils.write(g,"300dpi");v.appendChild(g);g=document.createElement("option");g.setAttribute("value","400");mxUtils.write(g,"400dpi");v.appendChild(g);g=document.createElement("option");g.setAttribute("value","custom");mxUtils.write(g,mxResources.get("custom"));v.appendChild(g);var u=document.createElement("input");u.style.width="180px";u.style.display="none";u.setAttribute("value","100");u.setAttribute("type","number");u.setAttribute("min","50");u.setAttribute("step",
-"50");var x=!1;mxEvent.addListener(v,"change",function(){"custom"==this.value?(this.style.display="none",u.style.display="",u.focus()):(u.value=this.value,x||(p.value=this.value))});mxEvent.addListener(u,"change",function(){var a=parseInt(u.value);isNaN(a)||0>=a?u.style.backgroundColor="red":(u.style.backgroundColor="",x||(p.value=a))});g=document.createElement("td");g.appendChild(v);g.appendChild(u);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize=
-"10pt";mxUtils.write(g,mxResources.get("background")+":");d.appendChild(g);var w=document.createElement("input");w.setAttribute("type","checkbox");w.checked=null==e.background||e.background==mxConstants.NONE;g=document.createElement("td");g.appendChild(w);mxUtils.write(g,mxResources.get("transparent"));d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("grid")+":");d.appendChild(g);var A=document.createElement("input");
-A.setAttribute("type","checkbox");A.checked=!1;g=document.createElement("td");g.appendChild(A);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("borderWidth")+":");d.appendChild(g);var E=document.createElement("input");E.setAttribute("type","number");E.setAttribute("value",ExportDialog.lastBorderValue);E.style.width="180px";g=document.createElement("td");g.appendChild(E);d.appendChild(g);l.appendChild(d);
-f.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){x=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<k?(q.value=Math.floor(k*a),t.value=Math.floor(h*a)):(p.value="100",q.value=k,t.value=h);b()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/k;0<a?(p.value=parseFloat((100*a).toFixed(2)),t.value=Math.floor(h*a)):(p.value="100",q.value=k,t.value=h);b()});mxEvent.addListener(t,"change",function(){var a=
-parseInt(t.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(k*a)):(p.value="100",q.value=k,t.value=h);b()});d=document.createElement("tr");g=document.createElement("td");g.setAttribute("align","right");g.style.paddingTop="22px";g.colSpan=2;var H=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=m.value,c=n.value,d=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(E.value)),
-g=e.background,h=Math.max(1,parseInt(u.value));if(("svg"==c||"png"==c||"pdf"==c)&&w.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,c,g,d,f,h,A.checked)}}));H.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});D.className="geBtn";a.editor.cancelFirst?(g.appendChild(D),g.appendChild(H)):(g.appendChild(H),g.appendChild(D));d.appendChild(g);l.appendChild(d);f.appendChild(l);
+n.appendChild(g));g=document.createElement("td");g.appendChild(n);c.appendChild(g);l.appendChild(c);c=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("zoom")+" (%):");c.appendChild(g);var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";g=document.createElement("td");g.appendChild(p);c.appendChild(g);l.appendChild(c);c=document.createElement("tr");g=document.createElement("td");
+g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("width")+":");c.appendChild(g);var q=document.createElement("input");q.setAttribute("value",k);q.style.width="180px";g=document.createElement("td");g.appendChild(q);c.appendChild(g);l.appendChild(c);c=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("height")+":");c.appendChild(g);var u=document.createElement("input");u.setAttribute("value",h);u.style.width="180px";g=document.createElement("td");
+g.appendChild(u);c.appendChild(g);l.appendChild(c);c=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("dpi")+":");c.appendChild(g);var v=document.createElement("select");v.style.width="180px";g=document.createElement("option");g.setAttribute("value","100");mxUtils.write(g,"100dpi");v.appendChild(g);g=document.createElement("option");g.setAttribute("value","200");mxUtils.write(g,"200dpi");v.appendChild(g);g=document.createElement("option");
+g.setAttribute("value","300");mxUtils.write(g,"300dpi");v.appendChild(g);g=document.createElement("option");g.setAttribute("value","400");mxUtils.write(g,"400dpi");v.appendChild(g);g=document.createElement("option");g.setAttribute("value","custom");mxUtils.write(g,mxResources.get("custom"));v.appendChild(g);var t=document.createElement("input");t.style.width="180px";t.style.display="none";t.setAttribute("value","100");t.setAttribute("type","number");t.setAttribute("min","50");t.setAttribute("step",
+"50");var x=!1;mxEvent.addListener(v,"change",function(){"custom"==this.value?(this.style.display="none",t.style.display="",t.focus()):(t.value=this.value,x||(p.value=this.value))});mxEvent.addListener(t,"change",function(){var a=parseInt(t.value);isNaN(a)||0>=a?t.style.backgroundColor="red":(t.style.backgroundColor="",x||(p.value=a))});g=document.createElement("td");g.appendChild(v);g.appendChild(t);c.appendChild(g);l.appendChild(c);c=document.createElement("tr");g=document.createElement("td");g.style.fontSize=
+"10pt";mxUtils.write(g,mxResources.get("background")+":");c.appendChild(g);var w=document.createElement("input");w.setAttribute("type","checkbox");w.checked=null==e.background||e.background==mxConstants.NONE;g=document.createElement("td");g.appendChild(w);mxUtils.write(g,mxResources.get("transparent"));c.appendChild(g);l.appendChild(c);c=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("grid")+":");c.appendChild(g);var z=document.createElement("input");
+z.setAttribute("type","checkbox");z.checked=!1;g=document.createElement("td");g.appendChild(z);c.appendChild(g);l.appendChild(c);c=document.createElement("tr");g=document.createElement("td");g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("borderWidth")+":");c.appendChild(g);var E=document.createElement("input");E.setAttribute("type","number");E.setAttribute("value",ExportDialog.lastBorderValue);E.style.width="180px";g=document.createElement("td");g.appendChild(E);c.appendChild(g);l.appendChild(c);
+f.appendChild(l);mxEvent.addListener(n,"change",b);b();mxEvent.addListener(p,"change",function(){x=!0;var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<k?(q.value=Math.floor(k*a),u.value=Math.floor(h*a)):(p.value="100",q.value=k,u.value=h);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/k;0<a?(p.value=parseFloat((100*a).toFixed(2)),u.value=Math.floor(h*a)):(p.value="100",q.value=k,u.value=h);d()});mxEvent.addListener(u,"change",function(){var a=
+parseInt(u.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(k*a)):(p.value="100",q.value=k,u.value=h);d()});c=document.createElement("tr");g=document.createElement("td");g.setAttribute("align","right");g.style.paddingTop="22px";g.colSpan=2;var G=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var b=m.value,c=n.value,d=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(E.value)),
+g=e.background,h=Math.max(1,parseInt(t.value));if(("svg"==c||"png"==c||"pdf"==c)&&w.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,b,c,g,d,f,h,z.checked)}}));G.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});D.className="geBtn";a.editor.cancelFirst?(g.appendChild(D),g.appendChild(G)):(g.appendChild(G),g.appendChild(D));c.appendChild(g);l.appendChild(c);f.appendChild(l);
this.container=f};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
-ExportDialog.exportFile=function(a,c,b,e,d,f,k,h){h=a.editor.graph;if("xml"==b)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,b);else if("svg"==b)ExportDialog.saveLocalFile(a,mxUtils.getXml(h.getSvg(e,d,f)),c,b);else{var g=h.getGraphBounds(),l=mxUtils.createXmlDocument(),m=l.createElement("output");l.appendChild(m);l=new mxXmlCanvas2D(m);l.translate(Math.floor((f/d-g.x)/h.view.scale),Math.floor((f/d-g.y)/h.view.scale));l.scale(d/h.view.scale);(new mxImageExport).drawState(h.getView().getState(h.model.root),
-l);m="xml="+encodeURIComponent(mxUtils.getXml(m));l=Math.ceil(g.width*d/h.view.scale+2*f);d=Math.ceil(g.height*d/h.view.scale+2*f);m.length<=MAX_REQUEST_SIZE&&l*d<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+b+"&filename="+encodeURIComponent(c)+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+d+"&"+m+"&dpi="+k)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
-ExportDialog.saveLocalFile=function(a,c,b,e){c.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+"&format="+e)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,c){function b(){0<A.value.length?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}var e=document.createElement("div"),d=a.editor.graph,f=d.getModel().getValue(c);if(!mxUtils.isNode(f)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",f||"");f=k}var h={};try{var g=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(c),"metaData",null);null!=g&&(h=JSON.parse(g))}catch(D){}var l=new mxForm("properties");l.table.style.width=
-"100%";for(var m=f.attributes,n=[],p=[],q=0,t=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,c):null,v=function(a,b){var c=document.createElement("div");c.style.position="relative";c.style.paddingRight="20px";c.style.boxSizing="border-box";c.style.width="100%";var d=document.createElement("a"),e=mxUtils.createImage(Dialog.prototype.closeImage);e.style.height="9px";e.style.fontSize="9px";e.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";d.className="geButton";d.setAttribute("title",
-mxResources.get("delete"));d.style.position="absolute";d.style.top="4px";d.style.right="0px";d.style.margin="0px";d.style.width="9px";d.style.height="9px";d.style.cursor="pointer";d.appendChild(e);e=function(a){return function(){for(var b=0,c=0;c<n.length;c++){if(n[c]==a){p[c]=null;l.table.deleteRow(b+(null!=t?1:0));break}null!=p[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},k=function(a,b,c){n[a]=b;p[a]=l.addTextarea(n[q]+":",c,
-2);p[a].style.width="100%";0<c.indexOf("\n")&&p[a].setAttribute("rows","2");v(p[a],b);null!=h[b]&&0==h[b].editable&&p[a].setAttribute("disabled","disabled")},g=[],u=d.getModel().getParent(c)==d.getModel().getRoot(),x=0;x<m.length;x++)!u&&"label"==m[x].nodeName||"placeholders"==m[x].nodeName||g.push({name:m[x].nodeName,value:m[x].nodeValue});g.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});if(null!=t){m=document.createElement("div");m.style.width="100%";m.style.fontSize="11px";m.style.textAlign=
-"center";mxUtils.write(m,t);var w=l.addField(mxResources.get("id")+":",m);mxEvent.addListener(m,"dblclick",function(b){mxEvent.isShiftDown(b)&&(b=new FilenameDialog(a,t,mxResources.get("apply"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&b!=t&&(null==d.getModel().getCell(b)?(d.getModel().cellRemoved(c),c.setId(b),t=b,w.innerHTML=mxUtils.htmlEntities(b),d.getModel().cellAdded(c)):a.handleError({message:mxResources.get("alreadyExst",[b])}))}),mxResources.get("id")),a.showDialog(b.container,300,
-80,!0,!0),b.init())});m.setAttribute("title","Shift+Double Click to Edit ID")}for(x=0;x<g.length;x++)k(q,g[x].name,g[x].value),q++;g=document.createElement("div");g.style.position="absolute";g.style.top="30px";g.style.left="30px";g.style.right="30px";g.style.bottom="80px";g.style.overflowY="auto";g.appendChild(l.table);k=document.createElement("div");k.style.boxSizing="border-box";k.style.paddingRight="160px";k.style.whiteSpace="nowrap";k.style.marginTop="6px";k.style.width="100%";var A=document.createElement("input");
-A.setAttribute("placeholder",mxResources.get("enterPropertyName"));A.setAttribute("type","text");A.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");A.style.boxSizing="border-box";A.style.marginLeft="2px";A.style.width="100%";k.appendChild(A);g.appendChild(k);e.appendChild(g);var E=mxUtils.button(mxResources.get("addProperty"),function(){var a=A.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(n,a);if(0<=b&&null!=p[b])p[b].focus();else{f.cloneNode(!1).setAttribute(a,
-"");0<=b&&(n.splice(b,1),p.splice(b,1));n.push(a);var c=l.addTextarea(a+":","",2);c.style.width="100%";p.push(c);v(c,a);c.focus()}E.setAttribute("disabled","disabled");A.value=""}catch(I){mxUtils.alert(I)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<p.length?p[0].focus():A.focus()};E.setAttribute("title",mxResources.get("addProperty"));E.setAttribute("disabled","disabled");E.style.textOverflow="ellipsis";E.style.position="absolute";E.style.overflow="hidden";E.style.width=
-"144px";E.style.right="0px";E.className="geBtn";k.appendChild(E);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});g.className="geBtn";k=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);f=f.cloneNode(!0);for(var b=!1,e=0;e<n.length;e++)null==p[e]?f.removeAttribute(n[e]):(f.setAttribute(n[e],p[e].value),b=b||"placeholder"==n[e]&&"1"==f.getAttribute("placeholders"));b&&f.removeAttribute("label");d.getModel().setValue(c,f)}catch(z){mxUtils.alert(z)}});
-k.className="geBtn gePrimaryBtn";mxEvent.addListener(A,"keyup",b);mxEvent.addListener(A,"change",b);m=document.createElement("div");m.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){u=document.createElement("span");u.style.marginRight="10px";x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginRight="6px";"1"==f.getAttribute("placeholders")&&
-(x.setAttribute("checked","checked"),x.defaultChecked=!0);mxEvent.addListener(x,"click",function(){"1"==f.getAttribute("placeholders")?f.removeAttribute("placeholders"):f.setAttribute("placeholders","1")});u.appendChild(x);mxUtils.write(u,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){x=document.createElement("a");x.setAttribute("href",EditDataDialog.placeholderHelpLink);x.setAttribute("title",mxResources.get("help"));x.setAttribute("target","_blank");x.style.marginLeft=
-"8px";x.style.cursor="help";var H=document.createElement("img");mxUtils.setOpacity(H,50);H.style.height="16px";H.style.width="16px";H.setAttribute("border","0");H.setAttribute("valign","middle");H.style.marginTop=mxClient.IS_IE11?"0px":"-4px";H.setAttribute("src",Editor.helpImage);x.appendChild(H);u.appendChild(x)}m.appendChild(u)}a.editor.cancelFirst?(m.appendChild(g),m.appendChild(k)):(m.appendChild(k),m.appendChild(g));e.appendChild(m);this.container=e};
-EditDataDialog.getDisplayIdForCell=function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)&&(b=c.getId());return b};EditDataDialog.placeholderHelpLink=null;
-var LinkDialog=function(a,c,b,e){var d=document.createElement("div");mxUtils.write(d,mxResources.get("editLink")+":");var f=document.createElement("div");f.className="geTitle";f.style.backgroundColor="transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",c);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type","text");
-k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display="inline-block";c.style.top="3px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";
-mxEvent.addListener(c,"click",function(){k.value="";k.focus()});f.appendChild(k);f.appendChild(c);d.appendChild(f);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="right";mxEvent.addListener(k,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),e(k.value))});c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-c.className="geBtn";a.editor.cancelFirst&&f.appendChild(c);b=mxUtils.button(b,function(){a.hideDialog();e(k.value)});b.className="geBtn gePrimaryBtn";f.appendChild(b);a.editor.cancelFirst||f.appendChild(c);d.appendChild(f);this.container=d},OutlineWindow=function(a,c,b,e,d){var f=document.createElement("div");f.style.position="absolute";f.style.width="100%";f.style.height="100%";f.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),f,c,b,e,d,!0,!0);this.window.minimumSize=
+ExportDialog.exportFile=function(a,b,d,e,c,f,k,h){h=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(h.getSvg(e,c,f)),b,d);else{var g=h.getGraphBounds(),l=mxUtils.createXmlDocument(),m=l.createElement("output");l.appendChild(m);l=new mxXmlCanvas2D(m);l.translate(Math.floor((f/c-g.x)/h.view.scale),Math.floor((f/c-g.y)/h.view.scale));l.scale(c/h.view.scale);(new mxImageExport).drawState(h.getView().getState(h.model.root),
+l);m="xml="+encodeURIComponent(mxUtils.getXml(m));l=Math.ceil(g.width*c/h.view.scale+2*f);c=Math.ceil(g.height*c/h.view.scale+2*f);m.length<=MAX_REQUEST_SIZE&&l*c<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(b)+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+c+"&"+m+"&dpi="+k)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
+ExportDialog.saveLocalFile=function(a,b,d,e){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(d)+"&format="+e)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
+var EditDataDialog=function(a,b){function d(){0<z.value.length?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}var e=document.createElement("div"),c=a.editor.graph,f=c.getModel().getValue(b);if(!mxUtils.isNode(f)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",f||"");f=k}var h={};try{var g=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=g&&(h=JSON.parse(g))}catch(D){}var l=new mxForm("properties");l.table.style.width=
+"100%";for(var m=f.attributes,n=[],p=[],q=0,u=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,v=function(a,b){var c=document.createElement("div");c.style.position="relative";c.style.paddingRight="20px";c.style.boxSizing="border-box";c.style.width="100%";var d=document.createElement("a"),e=mxUtils.createImage(Dialog.prototype.closeImage);e.style.height="9px";e.style.fontSize="9px";e.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";d.className="geButton";d.setAttribute("title",
+mxResources.get("delete"));d.style.position="absolute";d.style.top="4px";d.style.right="0px";d.style.margin="0px";d.style.width="9px";d.style.height="9px";d.style.cursor="pointer";d.appendChild(e);e=function(a){return function(){for(var b=0,c=0;c<n.length;c++){if(n[c]==a){p[c]=null;l.table.deleteRow(b+(null!=u?1:0));break}null!=p[c]&&b++}}}(b);mxEvent.addListener(d,"click",e);e=a.parentNode;c.appendChild(a);c.appendChild(d);e.appendChild(c)},k=function(a,b,c){n[a]=b;p[a]=l.addTextarea(n[q]+":",c,
+2);p[a].style.width="100%";0<c.indexOf("\n")&&p[a].setAttribute("rows","2");v(p[a],b);null!=h[b]&&0==h[b].editable&&p[a].setAttribute("disabled","disabled")},g=[],t=c.getModel().getParent(b)==c.getModel().getRoot(),x=0;x<m.length;x++)!t&&"label"==m[x].nodeName||"placeholders"==m[x].nodeName||g.push({name:m[x].nodeName,value:m[x].nodeValue});g.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});if(null!=u){m=document.createElement("div");m.style.width="100%";m.style.fontSize="11px";m.style.textAlign=
+"center";mxUtils.write(m,u);var w=l.addField(mxResources.get("id")+":",m);mxEvent.addListener(m,"dblclick",function(d){mxEvent.isShiftDown(d)&&(d=new FilenameDialog(a,u,mxResources.get("apply"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&d!=u&&(null==c.getModel().getCell(d)?(c.getModel().cellRemoved(b),b.setId(d),u=d,w.innerHTML=mxUtils.htmlEntities(d),c.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[d])}))}),mxResources.get("id")),a.showDialog(d.container,300,
+80,!0,!0),d.init())});m.setAttribute("title","Shift+Double Click to Edit ID")}for(x=0;x<g.length;x++)k(q,g[x].name,g[x].value),q++;g=document.createElement("div");g.style.position="absolute";g.style.top="30px";g.style.left="30px";g.style.right="30px";g.style.bottom="80px";g.style.overflowY="auto";g.appendChild(l.table);k=document.createElement("div");k.style.boxSizing="border-box";k.style.paddingRight="160px";k.style.whiteSpace="nowrap";k.style.marginTop="6px";k.style.width="100%";var z=document.createElement("input");
+z.setAttribute("placeholder",mxResources.get("enterPropertyName"));z.setAttribute("type","text");z.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");z.style.boxSizing="border-box";z.style.marginLeft="2px";z.style.width="100%";k.appendChild(z);g.appendChild(k);e.appendChild(g);var E=mxUtils.button(mxResources.get("addProperty"),function(){var a=z.value;if(0<a.length&&"label"!=a&&"placeholders"!=a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(n,a);if(0<=b&&null!=p[b])p[b].focus();else{f.cloneNode(!1).setAttribute(a,
+"");0<=b&&(n.splice(b,1),p.splice(b,1));n.push(a);var c=l.addTextarea(a+":","",2);c.style.width="100%";p.push(c);v(c,a);c.focus()}E.setAttribute("disabled","disabled");z.value=""}catch(I){mxUtils.alert(I)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<p.length?p[0].focus():z.focus()};E.setAttribute("title",mxResources.get("addProperty"));E.setAttribute("disabled","disabled");E.style.textOverflow="ellipsis";E.style.position="absolute";E.style.overflow="hidden";E.style.width=
+"144px";E.style.right="0px";E.className="geBtn";k.appendChild(E);g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});g.className="geBtn";k=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);f=f.cloneNode(!0);for(var d=!1,e=0;e<n.length;e++)null==p[e]?f.removeAttribute(n[e]):(f.setAttribute(n[e],p[e].value),d=d||"placeholder"==n[e]&&"1"==f.getAttribute("placeholders"));d&&f.removeAttribute("label");c.getModel().setValue(b,f)}catch(y){mxUtils.alert(y)}});
+k.className="geBtn gePrimaryBtn";mxEvent.addListener(z,"keyup",d);mxEvent.addListener(z,"change",d);m=document.createElement("div");m.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b)){t=document.createElement("span");t.style.marginRight="10px";x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginRight="6px";"1"==f.getAttribute("placeholders")&&
+(x.setAttribute("checked","checked"),x.defaultChecked=!0);mxEvent.addListener(x,"click",function(){"1"==f.getAttribute("placeholders")?f.removeAttribute("placeholders"):f.setAttribute("placeholders","1")});t.appendChild(x);mxUtils.write(t,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){x=document.createElement("a");x.setAttribute("href",EditDataDialog.placeholderHelpLink);x.setAttribute("title",mxResources.get("help"));x.setAttribute("target","_blank");x.style.marginLeft=
+"8px";x.style.cursor="help";var G=document.createElement("img");mxUtils.setOpacity(G,50);G.style.height="16px";G.style.width="16px";G.setAttribute("border","0");G.setAttribute("valign","middle");G.style.marginTop=mxClient.IS_IE11?"0px":"-4px";G.setAttribute("src",Editor.helpImage);x.appendChild(G);t.appendChild(x)}m.appendChild(t)}a.editor.cancelFirst?(m.appendChild(g),m.appendChild(k)):(m.appendChild(k),m.appendChild(g));e.appendChild(m);this.container=e};
+EditDataDialog.getDisplayIdForCell=function(a,b){var d=null;null!=a.editor.graph.getModel().getParent(b)&&(d=b.getId());return d};EditDataDialog.placeholderHelpLink=null;
+var LinkDialog=function(a,b,d,e){var c=document.createElement("div");mxUtils.write(c,mxResources.get("editLink")+":");var f=document.createElement("div");f.className="geTitle";f.style.backgroundColor="transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",b);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type","text");
+k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display="inline-block";b.style.top="3px";b.style.background="url("+IMAGE_PATH+"/transparent.gif)";
+mxEvent.addListener(b,"click",function(){k.value="";k.focus()});f.appendChild(k);f.appendChild(b);c.appendChild(f);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="right";mxEvent.addListener(k,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),e(k.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+b.className="geBtn";a.editor.cancelFirst&&f.appendChild(b);d=mxUtils.button(d,function(){a.hideDialog();e(k.value)});d.className="geBtn gePrimaryBtn";f.appendChild(d);a.editor.cancelFirst||f.appendChild(b);c.appendChild(f);this.container=c},OutlineWindow=function(a,b,d,e,c){var f=document.createElement("div");f.style.position="absolute";f.style.width="100%";f.style.height="100%";f.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),f,b,d,e,c,!0,!0);this.window.minimumSize=
new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.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-("1"==urlParams.sketch?
3:48)));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var k=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",k);var h=a.createOutline(this.window);this.destroy=function(){mxEvent.removeListener(window,"resize",k);this.window.destroy();h.destroy()};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();h.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,
-mxUtils.bind(this,function(){h.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){h.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){h.setSuspended(!0)}));h.init(f);var g=a.actions.get("zoomIn"),l=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var c=!1,d=mxEvent.getSource(a);null!=d;){if(d==h.svg){c=!0;break}d=d.parentNode}c&&(b?g.funct():l.funct())})},LayersWindow=function(a,c,b,e,d){function f(b){if(g.isEnabled()&&
+mxUtils.bind(this,function(){h.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){h.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){h.setSuspended(!0)}));h.init(f);var g=a.actions.get("zoomIn"),l=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var c=!1,d=mxEvent.getSource(a);null!=d;){if(d==h.svg){c=!0;break}d=d.parentNode}c&&(b?g.funct():l.funct())})},LayersWindow=function(a,b,d,e,c){function f(b){if(g.isEnabled()&&
null!=b){var c=g.convertValueToString(b),c=new FilenameDialog(a,c||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&g.cellLabelChanged(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function k(){var a=D.get(g.getLayerForCells(g.getSelectionCells()));null!=a?a.appendChild(F):null!=F.parentNode&&F.parentNode.removeChild(F)}function h(){function a(a,b,c,d){var e=document.createElement("div");e.className="geToolbarContainer";
D.put(c,e);e.style.overflow="hidden";e.style.position="relative";e.style.padding="4px";e.style.height="22px";e.style.display="block";e.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";e.style.borderWidth="0px 0px 1px 0px";e.style.borderColor="#c3c3c3";e.style.borderStyle="solid";e.style.whiteSpace="nowrap";e.setAttribute("title",b);var h=document.createElement("div");h.style.display="inline-block";h.style.width="100%";h.style.textOverflow="ellipsis";h.style.overflow="hidden";
mxEvent.addListener(e,"dragover",function(b){b.dataTransfer.dropEffect="move";q=a;b.stopPropagation();b.preventDefault()});mxEvent.addListener(e,"dragstart",function(a){p=e;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(e,"dragend",function(a){null!=p&&null!=q&&g.addCell(c,g.model.root,q);q=p=null;a.stopPropagation();a.preventDefault()});var k=document.createElement("img");k.setAttribute("draggable","false");k.setAttribute("align","top");k.setAttribute("border","0");
@@ -3723,21 +3727,21 @@ k.style.width="16px";k.style.padding="0px 6px 0 4px";k.style.marginTop="2px";k.s
k=document.createElement("img");k.setAttribute("draggable","false");k.setAttribute("align","top");k.setAttribute("border","0");k.style.width="16px";k.style.padding="0px 6px 0 0";k.style.marginTop="2px";k.setAttribute("title",mxResources.get("lockUnlock"));var l=g.getCurrentCellStyle(c);"1"==mxUtils.getValue(l,"locked","0")?(k.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(k,75)):(k.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(k,25));Editor.isDarkMode()&&(k.style.filter="invert(100%)");
g.isEnabled()&&(k.style.cursor="pointer");mxEvent.addListener(k,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(l,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});h.appendChild(k);k=document.createElement("span");mxUtils.write(k,b);k.style.display="block";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.textOverflow=
"ellipsis";k.style.position="absolute";k.style.left="52px";k.style.right="8px";k.style.top="8px";h.appendChild(k);e.appendChild(h);if(g.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="16px",b.style.top="6px",0<a&&(h=document.createElement("a"),h.setAttribute("title",mxResources.get("toBack")),h.className=
-"geButton",h.style.cssFloat="none",h.innerHTML="&#9660;",h.style.width="14px",h.style.height="14px",h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<t-1&&(h=document.createElement("a"),h.setAttribute("title",mxResources.get("toFront")),h.className="geButton",h.style.cssFloat="none",h.innerHTML="&#9650;",h.style.width="14px",h.style.height="14px",
+"geButton",h.style.cssFloat="none",h.innerHTML="&#9660;",h.style.width="14px",h.style.height="14px",h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<u-1&&(h=document.createElement("a"),h.setAttribute("title",mxResources.get("toFront")),h.className="geButton",h.style.cssFloat="none",h.innerHTML="&#9650;",h.style.width="14px",h.style.height="14px",
h.style.fontSize="14px",h.style.margin="0px",h.style.marginTop="-1px",b.appendChild(h),mxEvent.addListener(h,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a+1);mxEvent.consume(b)})),e.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(e.setAttribute("draggable","true"),e.style.cursor="move")}mxEvent.addListener(e,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(f(c),mxEvent.consume(a))});g.getDefaultParent()==c&&(e.style.background=
-Editor.isDarkMode()?"#505759":"#e6eff8",e.style.fontWeight=g.isEnabled()?"bold":"",v=c);mxEvent.addListener(e,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),mxEvent.isShiftDown(a)&&g.setSelectionCells(c.children),mxEvent.consume(a))});n.appendChild(e)}t=g.model.getChildCount(g.model.root);n.innerHTML="";D.clear();for(var b=t-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,
-b));var c=g.convertValueToString(v)||mxResources.get("background");w.setAttribute("title",mxResources.get("removeIt",[c]));H.setAttribute("title",mxResources.get("duplicateIt",[c]));g.isSelectionEmpty()&&(A.className="geButton mxDisabled");k()}var g=a.editor.graph,l=document.createElement("div");l.style.userSelect="none";l.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";l.style.border="1px solid whiteSmoke";l.style.height="100%";l.style.marginBottom="10px";l.style.overflow="auto";
+Editor.isDarkMode()?"#505759":"#e6eff8",e.style.fontWeight=g.isEnabled()?"bold":"",v=c);mxEvent.addListener(e,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),mxEvent.isShiftDown(a)&&g.setSelectionCells(c.children),mxEvent.consume(a))});n.appendChild(e)}u=g.model.getChildCount(g.model.root);n.innerHTML="";D.clear();for(var b=u-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,g.convertValueToString(c)||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,
+b));var c=g.convertValueToString(v)||mxResources.get("background");w.setAttribute("title",mxResources.get("removeIt",[c]));G.setAttribute("title",mxResources.get("duplicateIt",[c]));g.isSelectionEmpty()&&(z.className="geButton mxDisabled");k()}var g=a.editor.graph,l=document.createElement("div");l.style.userSelect="none";l.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";l.style.border="1px solid whiteSmoke";l.style.height="100%";l.style.marginBottom="10px";l.style.overflow="auto";
var m=EditorUi.compactUi?"26px":"30px",n=document.createElement("div");n.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";n.style.position="absolute";n.style.overflow="auto";n.style.left="0px";n.style.right="0px";n.style.top="0px";n.style.bottom=parseInt(m)+7+"px";l.appendChild(n);var p=null,q=null;mxEvent.addListener(l,"dragover",function(a){a.dataTransfer.dropEffect="move";q=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(l,"drop",function(a){a.stopPropagation();
-a.preventDefault()});var t=null,v=null,u=document.createElement("div");u.className="geToolbarContainer";u.style.position="absolute";u.style.bottom="0px";u.style.left="0px";u.style.right="0px";u.style.height=m;u.style.overflow="hidden";u.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";u.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";u.style.borderWidth="1px 0px 0px 0px";u.style.borderColor="#c3c3c3";u.style.borderStyle="solid";u.style.display="block";u.style.whiteSpace=
+a.preventDefault()});var u=null,v=null,t=document.createElement("div");t.className="geToolbarContainer";t.style.position="absolute";t.style.bottom="0px";t.style.left="0px";t.style.right="0px";t.style.height=m;t.style.overflow="hidden";t.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";t.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";t.style.borderWidth="1px 0px 0px 0px";t.style.borderColor="#c3c3c3";t.style.borderStyle="solid";t.style.display="block";t.style.whiteSpace=
"nowrap";var x=document.createElement("a");x.className="geButton";var w=x.cloneNode(!1),m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("width","22");m.setAttribute("src",Editor.trashImage);m.style.opacity="0.9";Editor.isDarkMode()&&(m.style.filter="invert(100%)");w.appendChild(m);mxEvent.addListener(w,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(v);g.removeCells([v],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,
-new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(w.className="geButton mxDisabled");u.appendChild(w);var A=x.cloneNode();A.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));m=m.cloneNode(!1);m.setAttribute("src",Editor.verticalDotsImage);A.appendChild(m);mxEvent.addListener(A,"click",function(b){if(g.isEnabled()&&
-!g.isSelectionEmpty()){var c=mxUtils.getOffset(A);a.showPopupMenu(mxUtils.bind(this,function(a,b){for(var c=t-1;0<=c;c--)mxUtils.bind(this,function(c){var d=a.addItem(g.convertValueToString(c)||mxResources.get("background"),null,mxUtils.bind(this,function(){g.moveCells(g.getSelectionCells(),0,0,!1,c)}),b);1==g.getSelectionCount()&&g.model.isAncestor(c,g.getSelectionCell())&&a.addCheckmark(d,Editor.checkmarkImage)})(g.model.getChildAt(g.model.root,c))}),c.x,c.y+A.offsetHeight,b)}});u.appendChild(A);
-var E=x.cloneNode(!1);E.setAttribute("title",mxResources.get("editData"));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);E.appendChild(m);mxEvent.addListener(E,"click",function(b){g.isEnabled()&&a.showDataDialog(v);mxEvent.consume(b)});g.isEnabled()||(E.className="geButton mxDisabled");u.appendChild(E);var H=x.cloneNode(!1);H.setAttribute("title",mxResources.get("duplicate"));m=m.cloneNode(!1);m.setAttribute("src",Editor.duplicateImage);H.appendChild(m);mxEvent.addListener(H,"click",function(a){if(g.isEnabled()){a=
-null;g.model.beginUpdate();try{a=g.cloneCell(v),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(H.className="geButton mxDisabled");u.appendChild(H);x=x.cloneNode(!1);x.setAttribute("title",mxResources.get("addLayer"));m=m.cloneNode(!1);m.setAttribute("src",Editor.addImage);x.appendChild(m);mxEvent.addListener(x,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();
-try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(x.className="geButton mxDisabled");u.appendChild(x);l.appendChild(u);var D=new mxDictionary,F=document.createElement("span");F.setAttribute("title",mxResources.get("selectionOnly"));F.innerHTML="&#8226;";F.style.position="absolute";F.style.fontWeight="bold";F.style.fontSize="16pt";F.style.right="2px";F.style.top="2px";h();g.model.addListener(mxEvent.CHANGE,
-h);g.addListener("defaultParentChanged",h);g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?A.className="geButton mxDisabled":A.className="geButton";k()});this.window=new mxWindow(mxResources.get("layers"),l,c,b,e,d,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){n.scrollTop=n.scrollHeight-n.clientHeight};
+new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(w.className="geButton mxDisabled");t.appendChild(w);var z=x.cloneNode();z.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));m=m.cloneNode(!1);m.setAttribute("src",Editor.verticalDotsImage);z.appendChild(m);mxEvent.addListener(z,"click",function(b){if(g.isEnabled()&&
+!g.isSelectionEmpty()){var c=mxUtils.getOffset(z);a.showPopupMenu(mxUtils.bind(this,function(a,b){for(var c=u-1;0<=c;c--)mxUtils.bind(this,function(c){var d=a.addItem(g.convertValueToString(c)||mxResources.get("background"),null,mxUtils.bind(this,function(){g.moveCells(g.getSelectionCells(),0,0,!1,c)}),b);1==g.getSelectionCount()&&g.model.isAncestor(c,g.getSelectionCell())&&a.addCheckmark(d,Editor.checkmarkImage)})(g.model.getChildAt(g.model.root,c))}),c.x,c.y+z.offsetHeight,b)}});t.appendChild(z);
+var E=x.cloneNode(!1);E.setAttribute("title",mxResources.get("editData"));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);E.appendChild(m);mxEvent.addListener(E,"click",function(b){g.isEnabled()&&a.showDataDialog(v);mxEvent.consume(b)});g.isEnabled()||(E.className="geButton mxDisabled");t.appendChild(E);var G=x.cloneNode(!1);G.setAttribute("title",mxResources.get("duplicate"));m=m.cloneNode(!1);m.setAttribute("src",Editor.duplicateImage);G.appendChild(m);mxEvent.addListener(G,"click",function(a){if(g.isEnabled()){a=
+null;g.model.beginUpdate();try{a=g.cloneCell(v),g.cellLabelChanged(a,mxResources.get("untitledLayer")),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(G.className="geButton mxDisabled");t.appendChild(G);x=x.cloneNode(!1);x.setAttribute("title",mxResources.get("addLayer"));m=m.cloneNode(!1);m.setAttribute("src",Editor.addImage);x.appendChild(m);mxEvent.addListener(x,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();
+try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(x.className="geButton mxDisabled");t.appendChild(x);l.appendChild(t);var D=new mxDictionary,F=document.createElement("span");F.setAttribute("title",mxResources.get("selectionOnly"));F.innerHTML="&#8226;";F.style.position="absolute";F.style.fontWeight="bold";F.style.fontSize="16pt";F.style.right="2px";F.style.top="2px";h();g.model.addListener(mxEvent.CHANGE,
+h);g.addListener("defaultParentChanged",h);g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?z.className="geButton mxDisabled":z.className="geButton";k()});this.window=new mxWindow(mxResources.get("layers"),l,b,d,e,c,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){n.scrollTop=n.scrollHeight-n.clientHeight};
this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,
-arguments)};var z=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",z);this.destroy=function(){mxEvent.removeListener(window,"resize",z);this.window.destroy()}};
+arguments)};var y=mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",y);this.destroy=function(){mxEvent.removeListener(window,"resize",y);this.window.destroy()}};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
Sidebar.prototype.searchIndexData="7Z1rU+M40Kh/zVbN+wEq98vHkHDbJUxeHGDrfFEpjkh0cKwc2R6G/fVHchKGKMwuRo7Usr21xQyBzUaPW62+qfuP9tkf3bM/Go0ofg2I+POP5kB+t8Rr8kdztPq54Hi9PMWcs5fodCD/QCP2Ev7RPFvGq0D8Sl389QfhMfVxcINnJJiwiMaUiV8ZzVgcs9W7XxgEdCF/ELO1eDWKOXsmj3QeL8VrjbdXhixgXLzyR6NZS/8RP5EfrTEUX182H7Jb23y73Hzb726+pfO3NWw+89t/F9DZBz/qjuRPsxK4IU+xdQK7JS/3gZghcEcXy5IjuF9bX7+lTXBGwjjdAyglYR2DIgZGMaQboeIgdgNMCL2mGQhDHAQsicXhmMwCAoRF245+2LH43wTPgZCwtDV2JMDsjo4iET1DHJbkB2chEAj9zh6EjiGzYUi5nwSYQ6GwvyU6fTMU/kxW6xO6FQVUt49hXxj6VjA0yoohtSJxOIejIVUQHYMgvCXma3Q+X5A5uiJQD09T+vKWxf5SkPDEOnDwtlns49iXkKYhHJU1tfG1dmIBBMW+MJgKQbzXFEBA2FES4JRD14py8AISzgkHHJUxJhBbEtMXhh7xawVDwhAfmqAppgEcdWHHB/NiTtdwINiJX3vil2gkKIA+Sk2JxJRTqIZVx1B4Zk9XoivG6T8sjHFgn4clkdjj8bBdlnUaavDOkGt6j6YJB2pfmQpgbhnI1DdMEJ2GURCA7Mzdyg07o1sQkPJ/dknAieAZ3hk+jXx2OktoMKfhIjo94zj0l+j70xP1yT6NNaNhTPj5DxLG0fa1OY6EDSa+kWt5okHwfo3NTk8s54PVP6X/fEjqi8jx9jufyI8oXmBJHNBQ/E/DkPjx9gOqsNv1fRO2fQA7xfMh6/QnZztuWszPw3lZgLf2gLcPjQAjwC9JSDj10e7dio69v2971Zu2uDOxqnAlSy7Kgr5eU9zkQ5vPCPrx6L7oqDv7/lbv0N8yQtpb4SAQ8h2JDxxFRYe+82F2Gr1lB/qUBMRnq1UiPjq6YklU+KO0Xts/S3uWFMsheTQZVvDNwL8PqViWWOtr4Yk3m/uK5rA08ojEhYCvpYBHabnHWhiP6yXhOIhOr8/GaIxp+MTxqvA6RynJ/CDk/x/PYLjj+EejJkiKr5NfLPN/LjSkaOC1Uke70A+mtb85PogagHowU/aSrq3Yz2Q/oNU9DGiBeSY3eL1ZaaEfiOIFd+pwH8gY+4I+i5aFfyb9/WeS2X0w+Eyoz9l6ycLCH/O9/0zVgXkoxXc1uj1nbK7JEA3m4igRjuAQ83nRn0xH8QFBbxN0x+SP/BI8F5d2DKfblRX6ifT382xNwKe852OxksI/EeWIz575NPhE1gQ/F/+JtPdd+D7kPZKE6JHx5yjGGyLFfjK99r6PAtiR9xLx3e7HhX8uyo45vPUH5rlM8SwgcdEfiHLMtwEbXlPCVzRUy2KL90g6yiMBfKrcF9+XVzYIZI/xgc4JE278Snxb9MfS2S/R+aAsG8xjeSQzdCaLPIt/vCsFwZBDw2UyhuFlGkNBJAh2z2XF5klAotN67fIcXQzZedGfiBqG/IL2eiP49kzGG4o5Po9mvdtC30YkehaL/R80DJIoDRS//XrRn1N3/5RpfmHnGHlOf8vndBEwxqun9FZTCu0pyf+LLKP2XmjsL9Hmf1D0Z9PraFsEJp7NBeXkRdYAe4T/oD7ZPh2xqV688f8U/SEpcczeFyLLJh7S/rMp/EOpO6HVvFdx2qxKdNqo4RmgttsD5XGCg91p8+t/ir49eEN5mbHwaq2ldFbLXH6c75OaizPGjxn/ZQmchwuxCPRtiP0lQaPtzwv/XNSivsw2wY6U3lPYvcvJMMBRhC7ojBM0XMpccvD2MIr+LNRTJnNCJq9nITjQWRKTeWnQK5FlW9vghon1zEvCXKkzameuJ86HuQw+LjhL1qURdjUGmTkhrwN+mcw2xtECx8LNe5WRxtoZjsgUXSWzoqNXjttWZu9OMPpl/1xuEebyGIby9TI8A+Wec3an4XjPYNdYYfumJXsS3cyn7vGeRLUPbNIfD7yy7IG2YgVlNvqP9xQ2nRhKsBMAn8rbG+o4KM1+0G1xdLxn8TC5LctTUPzhlrWzYSW+ntbbjeLfQe/rHsdj8eWrhDvdWk3m2ygpfMcdpd4je6hHh3O3XathHqFv3Xa9WfjgsnqTzKhID3yfRBGaSKqFB71/xSL7BTEt0MPC14hpZ0n0+HpF56vIb/bmRFp8R+PC89UNtWvx9Qao3S6+AddWenFkDqtrQY6ojyacyTOv+BkMJWjywZzXo8rzHarXSmMv9xTWmR1yLdbTQdH51mu61/70AI9Rs1d85azcUcp+YV8L8kPhLTi7FvLfk6LzVV1po3zPzrzCm8iqGt61HzREmBP8LIeFn7GfRSetNNs0q4rPOJ0vCl+v3tVNomghnnrCPi5BxF5t52tUkIcyNzvGIV6Ursy/aTSOPMTF57sfuWgajVwIvsKN5mmDPRou0OYSS9GRW02NDEeja3QhvhSdsl3felj8wHJ/35bLXr2kxVf+NQ3FFR2zcim0ZdSe22AeFj4Qp10Wrw/5PqTxKzr/ueYlGH2ktgqwwDttPFN0ztr9F7U4y1nSfowG/v9LKC++q6IOrTYap9vBHu4+cqFRd3Qv5euilteGpxyH0RPjq7R71a9bxNPzwld3KaPrDIu6dzIe3BU+raIWxpj1X7zxSeEJq+2/zAbxvHs08go/WbRe2+9FmP2ChRbk+7PCFyiqAxXNVtCNSFyKi9OKx5K9G7AWZBafzFnhS5mb+4yNxkVHk2nR8SpGW/aLPVp8vZtB4UOiSqcjs7W2I9lmaszmxc9wt22q4sfRGF3QoAROttKTKPswKB3OMkWF7mi4KDrlerNjUS1fcJY2QJuXp4BcGS5rVkmnXT6Enh6s1wHFoV94Za342Gavtu56qpRGtq1ejrjC4XxJgsIPSVTqyc2WzFxN0tnsRWes1NeZtfGuULPRLDzhusVj8HpYeF9QCWZkn2Gvx7fwwftuzSZf+UlDEiMv5kQOeio67Xptv07U7CWU6+8e8m7Oig5Z7bxjNFVyXfh7VIor0jV6y+d6Mi38jL6DklujZRmC8APa1WaU5HaE1eYO1xOBe7VKQrGaEmQA1UCd4SNwgkbeTdEZd21eJb6eFv4IVPWF0fjQn2ffR0UH3FAawRi1Mf4ihW9O2doX4LrRSyeCb+ErxpXrw9knw+sAvhncopgh8UfRMasFzEYNtxu6WMYvRH5Fg8KfeXa9khsWLjjBcvTXpPCliOpMNqPKYzwofDFtbz913TAqyeNh4fm2bd7gGZ/X68W/zqrdXVwLMZnTMoQqFCOuZ9QLGRMimzmsA1z86paWzXjFmETLyn47OmSxelQvQQ9b7ZlAWphpSNHD4O+iQ27rjpvRgsxmNCAlylkrCT+jBcxjr/DunnKhxGyR1vi+8MpCyYaYjdaP/y68/Kpd240G4W4Hw/JUgfcUx9qoCXdbDSk5Ll9hIuOwDNUWysUzs/qCxBELS9CQUrkOZdRCFpBfGH/elg+tSPHHRylnoFkb7pb8TKJSdPGzrKAl5oacW3KBZ/JC1PnPmITz4mtsu01AN9zbJRBvCJy7JeCsXNrpGE2wfvdjEhSdsJI6MesTfr/16mUYl6Z2wDaan/q+TteBBivhfD/R4h+Cyn1Vs27LjnbaLHHNeOENaqVRlNl7aZPBCNWLTliZSmc2rC8JNwpPeD/QYbZIYyI8b3Tty9UVm7JSy2zWmJucFT59ojTDMJvQngyRx57iF8wLH9xXSrrMTgkVnB/onLCiQ1ZLa43mAiejwk+A2Pkgu4slNaNW8mRc/MvBjX3Chg1jzmLms60fEpShCFQxL8yOqJv8fVF0vmr3cKNBjDsck1VS+HmhVodZ3pE1wSXo86kIstnpt3L0H0HeC439ZXn69Km6w6xcTzzxb9ERW22N4RH+gwpRLjpk5cKU2eqBLeS05wtnZctMmQ3KeSRGU7Yuw4zyet3meeh5hfcElXiR2aF0nneDpoSvaFgGH1Dtvmw0xOxNC9+xT6lrNtsK2Ct+vyI1hG9WfktyT0oZ5Gy2NtF7KH4eymYQY0oC4ssufeIDlyKrumu5ZSVRImnLAc6kBHd66k1FORutw5iKpRdelq1eUJtOUAlavih5P7ORuE1RHJYrLzblTt+iiTHlif9cdMIH2tjsuZdwTgpf2lnv7NfFmb3GOn0oOt9206II35/d9euFr7y3e1HnfnyJPMJp8RMjljlX6b2j8n3ASVD4085qWOihdONIzHoeD5NbmTeVn5hXiZBjw/YKr46tCvPjoGrwclS+117hx/X19gH3jQkwm5NVhHA4R+slC0l0OsSzgKSD3FdFh66UtDSzlyin9P5o1AQ/8XWSEsznKZAgQOn7Ff0hNLUnNB/tIVzg4lcbNTq6lsnR8F8xFq/LsAXUCujsyv9oz+B6Ug4tpBg4X4iXHO0RbNvmDnxZm45K+kB6oB5IGWyj/T4SjeylZUfjn77VyVMJDudaB+zBUAolBPhgvrsoh4+mzBz6QjX80R6BbLBQDvtUewJGTs9gTdg6IKeDcM7ZgoQsidCE8KgEVYX7BSzZL/tOUnJfRz7GPnpkK1x80vt2T72W2fDRRx2WA7Vq3tTbmQNwuqwnQ9lrufig9+2YeitzlEcX9F0ShjRclIF2bz9x3c9cRqTL2qOxnIBWDiWiXAHuZ44TaNOOhVFTEtFu7Bvj2ceL5wa7FLJtDzeXbTF4dCrMn9K1A85e93m3oaXBeTAdo827VLCNwJ7ixa7rSzm4a7eL0ud+xhme+ziKS4JcbTOeObOtj1z2JhGfGe16lZQSvA0dc0kXeEbjnY7ZqZxS8rch+NeDUTlh2xD26wlKbx4vWfhaTurZm2fnQN0bXpeEtnqdJXszUX3c+2UY5eDeV6azWVDkt8PzksAGoMhvSfwUsJeyAFcG02QOHeoD342n2TVsLAt5ZcpV5usE+uRLAtq+Ttm8A7oO0VlCAxm8LTp0pcHgW2sEC9QfabxEHg2oz8KtL1p0+kpHlex9SvXhV9EW08DXuDS468qFmezzx3LgHTMux2SVg7hSfJX9rr8+8Omoyg8Zg/3AKuVtEPcj/kECEi7isqTiAPidj5QL5qWJY6kJicw1nV8nHhE/4TR+PR3KXhcUXQjyLzgo/LiAltK+JXO+2duC02Iuv0Vv71Rw5KqUZ9YreSAvi3w3lJaSmVVKHrAvcUyeCVkXX4MrI4GzX1PPBXeC+bzwpBWLMHNsNg/S19+98pyUSm+dzLer8gB+w4rfo1bp75m9nXUeoG9J/ML4c2mMkpaiuDOHY/OAPrn+uzTqRPUurUj5Nv1QGuZKNZBZZ4f/SEs9U1/nPqRPlMzRZDsFIs0sF988VGacfMUaTynq8JdTTkKxILnOqJzcs98M1+c+EjrGjxl/LQlyJb/5FU9IF/kFDUhUCtg5RLHygF0S0VZof8VW1KV9xaLCd9ZWr4N/xUTU5Xw9mT6URKpzMMh1aY+pz9kLmZVDaUMA/v2qJNIN4ITcvMOm1q0c+Uxl2FL2+tkcoMtGlJz9LIvZrcSxvpJc00bOnuIXzAk6w5Fw8cvBXenHlD11nwN32XQC8zkqg3EIQZ9vqwvLIeBKCKWXuQJLH/h9SOOy6PG2km2zED7Z1BfKeGE57HEAQcLHx8eSyHdnvx+W0Uj4Rm9vMxFp3Oo8XNDi90fVno6zPfF0mAcsKXxpSr2nNIysZVcl2qRHNHomcVx4oW7rTpDUR30xRLs3KThsJWTVym4E6sOmM+FaDpdYfM4ASSlHXjKLXqO4+E3G9Z2eHPCL43KIZ+KzFt7HVFSLDdx3JEgT9ViIOo7xDEeF1zGKZZj9qo8+9an4IRpwjotf9mZfozySGRoGSVSCeLhdwzC9Vk82fSUvZHvDXfO383gpPKlS3Lrv6Hb08LYUdR9AOZoc6IdUcsA9DHAUoRZqlwS6cg88e6vxXKArHT23DSbr9eL3ae5D0DFv/Msh8rpztfNAvu+ZXuAZp35J+B80PrQi85ckJClz9hSXw5xRskTZ+03mgf1afOIgoJvvkRfj4l/RUrMX2bNzeXD3Rrcl0S9t5bKnFd43+JVw1EB3ZMViUhLyqmb/Qnw9N/TNkjAH4aSOL/9GvVqthsZJENNoz4wv+gPQbgyfywOQ3E92ZuSmdrQc+JVZWXasmhR/kOqdUil81ZWyJ/tbg3JEpOYpOnb1nLWj9Cdnf5dEzFWLMnuWKQ/cnInXVys8C8qiXkBEhMt8mloiTle/ztOScFc0jJWD9FcoDE0uH9H4clh47B0A5+gD5XGCA3RTInkHEYPf1KxXCVYL0MsBHEY87JHx5wVnybqifnzqL9smxKcDmVINcdFhK50V39owfB72rm2zDuxLId7hHE0JX9EQF741lzLCrL77sVnod3hOGZqyl+LX4jW7ipRnbr+QB3APp7nT4l/TUMeBtDIHdXPFLS8OFP7UVHRK9qKMPJA/0pMLKocKF5229rC4fGhv36PgsBXtnf36aJ6w0Rmn8xJc/tpvLZK9L3GuzG/YpoUlGqzXAcVh8VNEfd2O57nyn3IcRmvGC38LTG3TZQf7zeAWyZpezoKg+Mb5gb+fOa71Jegc+8+neO2fDiZD5K0wj9H9xEP1Wq120pS1MA8D1Ljfhx8oPDhdLON3Cw/Ik/w2WmOfhoub9LtRva0+IvFR5uzl4+f19lQOMHX2MTUPwyJySR9Skj8Qy8yDT3uLpg0YzQfGrwk03XZKpg6YTP3QE8ufzEadDeVXVO/X2rKgieIAydph8Wvxtk/Yb2dLuwxsuNNUOsgadSdZZdVIubBq1VPxEngqZJ9C1ujX3BQvC1ux0a+7yeqDiNvxWTmqtqywalesPsmq2W+0K1afZdWqWH2SVbdTa4Ln0jFvHwguLfBcPrgmYIBLBzyXj/L3BsD0wYNp1g8j2McHU4evYRofpFOODabXbNU2ofxNWP/ku3DgQnlgbScRilX/LtQPiZ2FU2vgDVC73Wuf/I0Gc7yO6Q/yNrbRBWQWHN6BdyejunXwW9GCg7tl0wDPxp7cNMRWq+j8jg58U9GCCb1lA99c7B32VjDDxgHDqN4/vCZoAk5fHFVwqVjSNAJKBy6UesvOPurX6jW4VBotS7LSl78OlUqnfVjsfWwqAsD8rStfs9aEJDRK2ap5OEPMhffJ0UT8gMS/Sp1QQ+1eCEmMLOjh34JqA+Zkwaf6LacOZIGyYAoOcYyD1yhGLXG8f3yJExIhK1vujVCjJ8zm/S7OIfm45SckaFb23xu0VgXtS9AqQL8H1GnXmifn8BC1lPmrFrWVQNRyAJGFJOJ7RB0HENU/aIdnklEfPKFGw3yY6B2hutBFgOH0zScX3+AoXm+jhp4YR1cTQLjUe+Dmc9S/o9VspLRGJAjg8vpgJJktXq0afF5Wgisf4qrXHMAFSLzqlfLKQqtZSdeHvK7nJIx3Y7XTutCPZuGW3NG7nnio1RYKyiNhJD8wVDYW4lHb8iw08H15LXh7RxUuIgvic0t+JpHMcNfQrjHg225zoD7LGrGG8B2mu0E65z9jEs5BVwdY49RotKYTdHlesfoEq2ZjMhGbsaL1SVrTcUXrs7Ravcn/VrQ+T6vSWp9j1azVO/DCnnDoVPmpf6PTaVV0fkunXcnO7+m0BZ1Jhef3ePqdKVwuVqIBOy738OXGGp+OvHoEnY61XdWRV0ig07FQS7Gh05XNtuq1Ey9gu6olOXM4imgEl5aNq7bvcfUcw9W1iqvlFi0bF9zf0eq7RatRM1++8/3WQ/V2s9beHyY6TKKYrQjf5Q4mAY6fGF/BhWfhTNyyExp/eIO877fn032IFbR/hTYeIG90BR1Zb39olYXC+w2xVru1kbGTQ2ic/aCRQCMbMcAjeCh05svMNgw7H89MhomtoTTabdTNFwRNlq+RbBz8q2lF6x55MeNY7akOScAsOACHoD5Ua4XqNmsQW5E6OxvE1gKMzcImvR96qC2LGcF7AhasDAmn02j17ie7pJ/sTMj9XTN4qKgsaK0NqjSO6hQqC5pKoho2GmjcRJvJznDpWBIkQadW4fkXPC0X6FjbWi0nhMcank6F51/wtNxQPdbwSOlpgMdjwZJ+HJyftOsNuEwsnFaSSadicsik24LLxIJqkUy6zVbVNe4QSreCsg/l4Rw1+oC3jxWVIqC0KyiHUDoVlEMo3XalaT+iUqnaQyq9SlYUKmT2Qbt65NW7NbicbGia33BqQuYESJ46FafT5fr0aoKEA9m+/NX67n2nBECENHtJXE2+iifl4b1GMVkhPx37ex76AYsSDrgcIWsyLyc8XUfw1FtWxCfqtN3gkzW893U81+ETDekZDufoYnQHXe00zMnNhLMbcVQJfXzTadT8bUR4I05g+RhUy+/5dCo+/8qn14bKp9m1zmd0U+/U0GUPDhRd7yIXKM1GjVRUDqh0KiofUllXVA6o9IDLSlYvMy8qsGXFEpV2ReWAShv4wWwBinfTaNYiUFR61nWtgNKGDcWcpOxaCg43lcHoIiA/T+o18e8IDh0bbhGdrU6vz8aoXq/Vag8DdD/xAAHRnF4uFqZBpF2rnTQa8Klk3UV6VLrtFrph/mYvRSwgaIxDvIBclpdV9+oBuhfKBcdogkPyi9FfNK74pHyaDuiZrPPJtYB0HACSNfKtBWT+U3jOcFkYVbdCKuTBDBhH1pyaLo62TKZdPcAFYlR5CCDddiUeWxo/m8LjQeMCFd9p4mg3KxzvcVTS8R5HR0pHEy4OoyftFgdg6TCNA/hmMY2jD/iUNcyiC3lytXEW7UqJ/sLRE1rj7zZcHEY92Z/NfoXj+ZSJrwE5vSUxx9tC2r+bJ40zePd5NQPw39OFagIaTprysvxgOhzsqo6hYVKs1nrG1qK5YepWmP4T07Rfg01J9YGyTk7OD1OtgvMhnG2RpNTZcNFktXPyIbPG3EfT1kkdvOhY5rM77NGYzZMAUK0tiDP/jVPxepzkwufvljzroaOxssX+7vxCU22ufUKbbXUuWwKuOY0IGrdcOOWz5kxyp9R2gVK9ZQNTddb/G5nqlP8PQvDP96zp67zItMCTyVp9qEsmCbcue8eZ+8OGNbJCaHdXfzdt/fznmsuRKRtlhBqtNarX0OXsHBBCy3ppn+C2Spr+Q+aolZL6DcsK4AHAKqL973hSN+Wth2clR4egRjjGQyLN8O39/5m8/78dmdXsAGKlWbaSA6udWqrXpJLaMuo21hWkDyD97+jufUeJSxyTF/wKr6uEfWK7SHfjBHDhi2kLfY8LoMtkAOxzJzIjFveR4HIDF4zpMIkEs5nYhRrycpmwhgac49eK0DtC/+fCe6PUrTcKVGiWN5wmZDiG00QCzgXlBE3roC/LmFfFKZW/G3VYVBogqLSAUYEhKy3Q94ks6ZW/W52SU1nT+Sle0BiL4yc6HWz/Jv5jcSBRztWg15pRGck4/0HCONq+tiPjp0EO8YKwEWM5PfFGQTljccxW735hsP0vY7ZW+aloejUlkHOIZr35+wEZ8fpuXVEObNC3QegvGf+fiswBmSFnUXRyRvCqonNIZ0QjHyqX5uGxZIyLbKxATjYB5QmezwMClVLLovRcpt0nINOxubeuSCA/PVQ0HziVxtBcr9YkCAjYA8smmwlnsOD0FR+q2bAHZ5rwGQ3BqhtjR9Z6jTmOkwiRgKzkqk/HOFwyNc9pDYz0d/fI1LLtqN36/mjUzrcrzAOSx/xnEktXYtueTawU3bJ//gEDrrnPLePpfixsyXrNeIzOpEdHYiCo6qqIQUJ1QxZAMDXaIHfiltMdDaGAUnVWI5syPzIo75lyODvPvnaXC+T0KVmQ6HT49nep2kfEx2ltyzfP5+QlDRyxgM6RtxR2FRTToX6gvjIx/LXkvNAJh4UulshbEzIHA0kVtGxK/hiQJoQ/MSG9BJo8AUSViM8Lxo0BuOHe9BNYoQLIjKSHh3AGIcUuAe4+YTCsVtX2+zdCAK0Ci3LEVmnhPeMROkE0YqdnAXshaeLtAodQAWUUo1+LFMbntfc9B0y/3lOiesB+kqzQJFmtK2T/jQx9e5NZOKFy4MRGVPwexwswGU3gvM7/L/FjONlx4LQmNIpZWMH6FCwZvqpQfQ4Vk0ktcT7CSd+AJxZj/lrB+hSs1JeuWH2KlcyisorVjhVP41QRWnAazoVCPx1uXgEK6IMSzH/js12dgHO5XV9+hIT1zuCqc1CgrjCoaAxkVNerNfbjCtUnUP2JwZ55oDhtjM8K1X+gSt9qiHZvi8bYF69BqY2BiG1MgyDN4CSBWBH9p7IaMsGqzsWvUauOyM9Qq/T+Zzk90BnHcoUVqh2qOafiHU5H8g+gUDJe/kiXkj0x+B6EvBmT0Hnat+sMcJ2QBTDb+KZwiH+QV8YFngCsgjbM51Xakt/FquUxtv12uMSr2Sa7LDPwT/L1aqNJXlcEx+k432QFF0i2IJ0ekE0cXAhIskIbdSyEZpqsZoEUpEpBbzF5a45fKxw7HGmQ+5e8yGqxX9+N2Q8pOzvNU3ZkT4TMJbOL9M9d5glN8QzO1c56raWjgjZL+zoaeS2PcbkOHKDNm4EBo6WbjwAGfRsTsV5AufGmwqhtH9F2jz1g4dVDwWRZlDYnGKj7eCoRQ4JD41jsnuj0TJg48/TsAsKjpXU8XWzXpQGEE/wcLzlLFksgSJo9rT2jjWQY4NVa+OMXAQ4XRHgOyTqAc6uuradR9OkwASeM0hZCMIgoW6hnHEglH+9wiF2zIrI7JongiAgsKOjbiMTCdpELOxG2DHsqir2SO6jzn+tALK3i9B+cZKu7kzsS0SjGIdwwKSxMaRij2om/RSesn/m7xh5AyDS0HIjcuIyS1epV0PkBJm7Ra9sFkwhBCaCwsOxWXbEIjMetsMjWi0sfxXW4uS4EBIdCw7RgXMul+UupQ2QweBNG//YrLAHl/LEdl/iY03fhem7+eh0ioXB8SCUWtpG9wal4bHhw+kR9giay92jFJGVyR+aJD8Zi6do15e6SdZxwAmnP2A5UeCR4OhGKRBavhQt0RwKCI7JJqgBBdJi3bBlmRAMSwtlEdVWnGJcZ8VWc0BvHCAgUu66QF3NMQzASYjlAvqMB63KbZSgPYm1ASNj2lR8oeZGHzWWAowgIE800db5M0LcbOaEEUPmHrejkUpZykp8bv5DL3Fs4J2EERtP2dJSKrFOVHTzflqeNZ8QS6TtP6JqgtAr27b2B8Orr7LL8eZ0HxI859VNYYCBpGnj5Y7qgP2VjRXmsC7WEpsmMRDDlS9VT2Y62/MldYcrXNATHqf+f8xHNYoK0/YDp9P19Jm1qGmy2IFTjAII0vSd2QcNQ6K+K2ReZ/bFpYAkVnfXj8YBdwDbRNPEDsDf8oAlcGrSvYH0OlremvDDdPg3g2rNcoWKzLWTpDkQ4nKMLLquonDDwMw6oy5/aHZkJgwwMH9Wwb9qlk/YGT2VKbj1FpFAdCLTOvkxla5VgGlqjgpYdWrOC9iG0TSZvImPOINV9H9YRubG7YKJST8Z+pulb+bOaLml4ckGDFTr/gdeMA7pApDfkNn9U9ycf6CwgrIBFCu+RJ39r7lIQ2jSzFf0pUV2HJzc0JGh7T3osX4VCqK/lMaZL0ebixVh8blhc9DxpPS5/hQQDasrQtYhC/NcyfjfBMZQ70o2ODRzrZLWOTof4B41fQU3kaTT3NWwmW0cu5MssyNuwnRQIGB9W2S6drjUiYBzUxh6Rrj0iULxPazIi23iA0h9aZQI6JC5xhLZj4WCg6DYsyYQk8W7yGwwaB2WAxg6WS4I5pC3S7u5HE+qmQFwxTv9hYbxVnkBw1NvKFPi6MSBFuk+pw2FCuLzGH4gPDASFGs3tm0KRzmqCtD1Uy6JjngQYu1N1TsztEC+ZrYSbR9MaYDjCUa/tA+lmur+lB0TIBWAS9Z6xjSK7ucKZRNLfb/mWLQ+mgwHedOF+f19bGDtEHrafFRKMutLspd4ytUHQCZrT8L3vDgWJXkx4i6Q2ur7VAvM2M7nC8h7Lue+nEuOjR8YrNvts0ts1bIUXIYFjtAOBI/39ish7Ilevc46ToBKUfSw39P8ldI7+JFCuDwPhckd8uubMT0vtKzR7aDYZ/80g+grNezRpvKBCskMiB1sLzbIJoHzbqBqo9fFfxPOVidbv8WzQvPMLKj4f8HlzDyo6H9CRxl4F5gMwlcb5LZrNmn6k3crWAfbJihSm0XPOpDhbyCyyhLWpVaowfYBpz2DeGocVqA9ApTZiReY0Imuclu1Hp5d8UwPo7V76Q46dJHEcvB9FCYOYXnX/2wqzx5Hf8dqMl36Hq0KzQ7MvQvQJbOMPu3SEy/HqB4D65wGjowSXK0r/RinaXHWYcGkC0Fj+rAKWEZhUV48EjAUOjNuE8BUOxYLRON2RFaYPMckuoAmnSJiYyUyYTBWmDzGJfVYh+ggRC+icPtG0D1jAIgImdAKNjpyNULF5xyadDLvbU6UHI16TjusK+0sakuj0/GfMk3SqMLC4SF2nYYS3WaZw/8fbheZJClaYBByoCQkC4Zn8I18ENHBCjScBACVjt+A2HlRMd0yIFRijCB6m7Xui7Tuib7/uE1XQPg1tVxtcIdsi+yE2Hwmi0zMMpdZImRyUrd3Pw2Y5OhjQt2vvOxT5sAyDcxLI+NCIJ1BqgJXb7xnTRvkiASUqeo00tMEk4fN2Mk569+IsXQkUNprJRl04AorwKWKCpjh8hoJEkZeuUdUylIZLOllKbKWUivhzKCxlwqEWdnZNi8xvAaFvZ4yBiUSrnLLNFTg2p0oLfRLVDVmA7SBdr9lRTuhbGnpNBwVsKvrSv17iCFC3bcVEzDZ6SBfVdjBTdcAdgJHmIeMI2mAvrbaXulAuGPfJ/GTE8VMsyLC0yGoKqGmQcme5n+nOsjadhIfYh3KTXclhWEHRgMnC8LmdttYSnz6AIhrN/ZZBZoMSksYVC+A09OzaDNFc4eBpMxZx29pz84ZA0BzYcd1MYxt04VyHckY86PNmv12IWRfzT+w/C5tt7ojoZGquo8vmr5D5zycsiSGFPtt1i5oGUjtppZlKr2cYhNwtdwQDal6n5gkydZfRJSJrktBZEjwjTxDBCyh2it7sa10qaV474fQfoWFBq9aGWXN2wtkaDRbb4mMYSKwqFFiapGXTnH27eQUpjmQ1vr2pbxxxCubwtcxjc8Igb70kHMpBYzc+sAvlgz5kzLo2gNSHVX0qOcDOFmbrv50Pj7dsxRmOwFxDVDtEWgJTFW/8O5o7xp6ggulb5pJOqYQmO/sxk7pZH3DHSHxyOFeaDo5mC0fSFok0WyCfTj0LaEZUfkDYisYuFik1jhxVDQukLnAQEWBgFCu4Xm9Y4BKwTYsgyFvLvJ+kgAGvks0CApQsrLf2lXCmiVa5gECPNF6iCfafAbWmtUplM3wCWji72dlnYjTrLltBoG9nBFJTPyXfYR5Hau9WPFIe8k9pzz09CRdAwBlRvCJitWBKatVkqlGV8otPau9uzDh5KHsJf8I+QdfhnMpeh3DuFCvGXc8mr/NwU6N9xtPqFjAy1bHpQf2G0aYnVOpGyeHs4kyHQsvqtcff0NoiOtnVkW3Kp8AQa8AjBulKieqANow6oL8BdAdpywEUIO+ZcjgqHKQITZeyQV0grIIoCUBZBTAEiq3AZPj6+2Xz2UYw5wXkIgmCk2kyIwfn2ZBROG0xGjajYjtWEwrmeAchOx5ZUQdkp25adiLx2aJTHFKhiKPTMznwvP7fMJ5oEAxZIING4n/UrKX/iNejmLNnsvtJyNLZpl8EdQD8QK6UeaWHR1q6uA9ppT8ZbFaty6vhCC81n/zBQOijAxsR4o6A9RQr4LCy1gwvVwRsF2z6fezp+LzYAn0PhfcmtKyj1A5rp45PLfE/UXIIgtZbO4XdCXmYHzg6rgvhxqArHPvCf3l1hJsiZR8Uhxwd218kDD9T4wuRV//wBt/ReY0Ziz5RJQ4Dl2KLWRCvW4aE9o/cBGbDtvDIZ+apg6B1UMRlwdb3AhY7Y1Ps9wLpWbApvBA/O6q9rGzGGM8+0ySj4rXhNSXz+Ss6+9TAdhDMOv/ZnudozJ4Ym8vun46Q0pauC7Her2Ia4jB6uwsQEFfMiW7LJjP29EQc1V2dzEejDqkRp6GsP0SPOHYpEGZTuhRmDUeYdTsWmV3gKEbpG7gBS9mUH1RhHROW+IKm3J0YmELrg2thR6T1V0ifnNH1+0GculFdf0eiGCcch7Ezel5tjmdUZ73j5YqOV8pE6rXMUcIvAlsSHMRLH3NyOgjEZwtxOpV+TObUp6Ez21NxiTIHDa/eMGgyDIXsLUlEsSvklPPSHrkoolEqezeyGXco7TTvVfztE33nQJDs6ZppeZE845iGjkADI35DzOdUrHnhTBpOiW1kNnRzJEeQF+OnJzTgxBm91wWyW4c4XiKxOle47YvdR11ITIGTv+BK2qmrWwCUF7URwU+uMOuDYcZXOHbqcFDQZa7Pyw0dFSuLnQl+q/EQa+bI+aujrpdVZOjRoWK9pmYWLy9uF3hFg1c04dgX63BG7HRTe7nhozyK0YA6GiC3B+6ShEQswNGjwd5+3bwPOp8nm/vvjvKzJnfifbg7gfR6TTknMgeG8+XWcISbKm6Zi7tzw8aiNY1x4IzEwdmoO3KuyFxPN+mVF7nr1SoJ6T/p8eDM+QrF278On4iwhFkSoRGNCHa1ct4mwbUQPfExXQEHJXNzLT5gGMkcmAyqu0IPjtil+evAteR1tw4E4F90HhJXQpxgqN0koTt3hRRo1pzYMV6tmPiZK8l9MEou1W1ppxvxQddyfgN3BaFyk8haoHiH8IbOOHbn2i00CbwjPuNzZzQfHHxhvGk1GDhzCVC7aj83eHfXjiADE3+6JQl3KXUNRtZuk5hTlwLsutcC8wL3PfRdEjgwJ8P3JEYTpwIn7Q4QkZssMV9h3xWRazeBiNxk+RqlxpxsoInXrvBTXQlrcndHFlSs3Kk8LJRgpydeQDc4XCSfmpUNAp7a+K5nLRvrMZ+KfesR/oP67tTXQUnyeAlfuNNy66BpjTVu09HIEWZg/Igpc6fbz8EI58z3XPOidh+IYzViSehMXZ2yRa3ZJI9LQgJ/iSlHA18cDRGdBcSZ6pPdhX2gGBuOYrSm/T7G2HQEo9p6w6w0hjhOZGE75s4cINrBlNt0zV+H9Weypu7kxHq6lwB0cY3xWmzHG3cuhfVsC9gYc2e8LeusCPcTZ7ysXdt/e5uRORNF0j4YdVndknWcOFPipW2O6eKaBEnMHIHV0Y2O68Ly5B+u7ER1pKLxneiF7OUpcKdFr/W96CWhM+64dlI5D1iuON0gYLniWls3TiWsVgXrc7CmURLiFXUFl5IfNo7rnuMwccVN7LQsq60H4hAs3Tt+X4a1JmwdkNMzPHt1xnxQ3MR6rZEV1yRdtSYuVwyIrm7yQ5fWcInDRdp5MXaqpkU316vNjYViwYnvEDM1kGpc1i7ICjszp0S7B7surbE7rNSWFW/fm6Tljovd1I1H5AHLlROyqRt31oaVrFauJDTUJuzGYU3InIgVU+zMoagbTNUl5i3Zi0PjXNR6WPPKawvMFf2lBnKM+0OeWG0QOFMgoVa+Zr81rAvsPqQR+ekILjUCbdzwesRiKcJ/vGNs5YwWU9zuL/S0zhWbK7qsp1vMr08tkOO8HMHVtm2NPbKVQ25RS7vRfD68XNmNLWviFeEnEr+enlG2xP9g7krBfr2m+JKZJ2h46cK/TmyIE4cChtrZbW1cS7JKL6s+Erx2FlvmU1IX2wUOgo1t4T+7kmXTbracBzSWxMhbksCdcnLrW/SC4wV1JlDd1a2+18V1hcN5QNAjjZdOdXzU7SKnzY0uluiBBTFeuHOzrWX7INij5oxZqxuRzZWaM8V1ugVQutT+ImSNRs5c/dC+h6XL69aV4nzrJsYtC0+uWUj/SW1aPKdOFaoo4y4zx2f16aHzMHZmXwKQNuStmENRRuvu5q+cLxpyFkUOodMtstZF55o2eyvn/PJsGl1iXkDX6MqlqGNXO6ytzSxmnKA7YdbG6H7tjPvUte0IKNxccaAsajWfktAnp2JFjGNBzxmrQxvZZuUazMZ4ERJX2oB2dS+Q5MCL+sLY8NnalRia9qUbfWa3iR8Q7E6xmX5QIzdkrip/C1L2SMP5SrBwhJg6qN0ksTXjcXQ6WK2XNCbYobSTbumBl65cAxn3l+5081RFLLse08R1hiMyw85syba2EtPlRUPmJ0GJGj9pE2PCI3/BwbMrwHSvd+UALEY3OAl9Rzv9tTNXsusiG+LV2qGrEor12jWuxba8HDVd21Z4PVF3ijJsWxWS14K71LFZ8SezR6+1iYXMnfoVNXeZvVw2F1yu6C/1FnTLvAJLuy7f0CdX4ojaLfu1iQV0NXMoYamdHdflJRO8aCh0fsxfkfdMZU2Go/rsC8nLY9BzRb2psmfe/H/1A4e2qnJ4Ghe2EeUxOqPOdOlU5csCsB8OiZd2NkmXFnsJl4KEc4eAImbGjVoVnKP637xCO/9JuE+jSp99ktcF5eSFMVec84POItnrpLSBRUuXVNnBkLjsxcU5EXNGhym1eHXj2n9HbELdSfbadtIlMzQMCA4dss/2Ja1jfGtessCVCT/q+Afjtqxk5Y5oabcV0ccVzlmAHcGlPTpaF9cVFvr+MqBzd0RMYdbpGGdGn505H7Wn1+QAyyHRUoKwxg/GK8ZlMZT/jKYcU1dKoqxH/q99grbGa4Xs88i8Zxw7hGzftPjKXSVdZsK0YBx5L3S1coibbRvjTxLLeKKjuIybF3/hV+xMpaJtNXZDnwj6UxyYzlxPOgiMGWc2ZjHjM1ni6UowUREz88Urv5A13ETWNK7GJtQPqe9ayzLbVRhbalMs59I7uj07xp3MPWqO7lDzFYx3OFwQvhuu5I602S4tVrg5I2+6s+K0uTH/GTlW1Kg9aSkfaHJIgkvjvOzv0XSsxCzALgW2bZdN3bEXaeO6gks5P+vGcSWhQ0lftWON+S354Agp1Zw1XkzsYRqgM4d2onaXAm1gIY0xf0UjKl6JcODaxFDbroAnPppwoB4oeUkhOcJNe0CaPrdkhpFbxdmKrBnPcXqERPjFTVpt4wEhjwRP6DJJCzSqpHAmck5HHo0nN2UymMxkpwx3dFnHtnfuPVP0Z7JaO8JrV9Bij1dA5g7Jl3pPzngSRfAia6n5HVNmfdvKbIWDjQvlVhsb+7cmvDANAvG5s8Jm3tAQyFZs5s6kIdUFML89BTGh0hhx5yhQu0GYl7KEO3QPQG1hZh7XtkjPnbTmvq2xa8togVjDFWJKVVDmYdw5EHNnQ+p3+tekNSVhSJ3pWWnbqKhCPRlgybi1I6x2sX1rLvijUylx7flB2rTEB4vSZhgVsk8iW+KApKkkh6DZbuos+9JHbln41uWMsTm6xPGScIeoWSuMiom/PB04VPOvuyWnYsEanBz1gvqZvSAdTkO8Ihy7KlPZ20TlwMpRucoej9BiRYIATZabFbpAq6Vr1mvRYqsVdrXRtVnFLlCtE4cSabqjM7RYceZMYtumTJ3/X+K7UjGnRpkzVxpqgZK2ujuDBNX4stHNlzZIdGjeg26bLB1WY2dDpV2j1vqEvbhz8tUtnnxy9DVzBZRSoZq5RkkLlOe5gslmOGFKArKW3owznnJrP071hXRhPrxc8ZabupWo+eBqOoJLmdH81l7ZNK+WK7zqILRX2xFcVnfjvXfmCKaWbjm4DqYHOicMbYKijvBSbIiW0TPxEW+ac4+xL/50xS/s6jad+CoyjsM0T5heAz1tocclEWrMGe9HCdNkPx731q8PcED5DLuSZFWH3fWz+0T541sH2CH7X20flj1OcSyCrngE9dq+C9XOHmo9FkJXvIS+dlLtWARd8Rv0o2jHIuiKK6HdNetoBDuuENzfxV/x9Y+FsOsIQvVaYCt74UreCFezRCD0XfFDtFtU5g4w9JeMu2MP6tYtHomfK9ag9pyqI/FzxhTUrTY+Ej9nDEHtQqKc+Z1R/9V3KCADzQzc8nPnANFtqncsgM6cINp5/iMBdPQIaWfPoR0JoDNniAIQjA50JpawfwhnbyaXO8AkcvUAAXACC3iOHh4N+4eHgOfowdHM3JPpGPBcOTR6+xHorxSS5UxviB0KuyidmqwrPQnPFaWnRk3tb1xJz1WtB0L0XNF62o0jjwHvhvnOzBVU6l+slx/IFt9zMkdXdLF8wa+OYFSb1lnfwxeEc1fgKTLYsR4vkFfCYp64s4mVE8R63veC8eeAPjlz/1A5RKwXEF1id8IFHe3a5iPAc8Vy1q/aPQI8ZwxnaFVrEp4rhjM8yeMsCedIeVs3YKoWjPWc2xXmM7lwF+llb2KfOz0SUJ+t3eleogZgOtYDMG65bx1oRRt/ErJ2xgJUs23WhS+l54oJqN/8JGd6N2LrxkuWRA7VvEDbv+8YuiKHbWgG4ZitydxVEbR/CWmDzxXpA1exMWYx42nVi5sEO9YzIRMs1oGD4BV5yWxF+EKI4yMn7kRVldSIdaCyWRIWUonSXuluUuxb39iez5hD+JRqXvv4CI7RGQlcie33oF3MFADRRF6KcwQguAtd3pK66xtbjwym9JyxCqGVok5x6Ir5osYE29bDqlP8kzoCD5zVMmUvaOBOQFXhZ78iQbyfH7t0DVhpX2vd+dgBdPTosF/YJufMhc7IXxua2bzB54r0dXSnsh4HnzOVHdDusG7weS4XJYCQwZUzClB13CBYMCtn9J96gxXABk78Z3eErw9O+CQ+R6WvBUDzSXzOnL5K9137zm+Kz5XKSnC3WDf4nLm7r9ygtp5I3+BzpQlgF1zINMXnSgNA9eiwfvLeh0RAQncMOzp20H7C6IEsqexe4tSdOAWilfjfDxKcDjinP2Q7/ItA1rRFjvA7mHvyFQ9ErF8LHHtB5zhyJVOu3oL7it2SA7Hbc1d45XDS5sFL7PGlI8h2MmUb2aMjvPKoa86Bl+fMlgTCiyXVlsyIrNqSmXg9EnfsCqW1knG74gwvFnjhTL2dYoYZN1zP3KlxUkXrK16SJis+Ixx5S3cGuO/r+6+1idNjRnASvyIPB+6kUjvWoTH2jAbhXNoWAg91S+aUM9O4SpNNue7Ep8OuTC9XujN8bZSLJrJoSV29JvGlWgc9XAzHaLh053aTWh78pcmHesgSzknov6Lzn/4Sh+4YaIqsGbdnh0kkFuBKJFa10b6STdbCNWIvYRRjyl0lZlzARpyGz2nMnyXi0KSumGk7X8neqTnaJkumLHHm6GxYPjrPA/JDXmt1hFdHNc2M+wLnkfjUDhFTL1J/paIjH2BIngWuUFNOAfP78o3avTOOpmKamd+aCWeOsOopVxSMB7LPf1JnQthKAMO4RXYlzFc/cQVXu2f7iLxiMXEl1qOW+tiBha7DJ8ZXTl1wUZquGz8hr1crKl6ukGVA9kvK3LmNYTvl+x5awxFobdvVUXIIhzPx624Od/U0aUVxml+SIR9HK437X7njrUVtnEQkWblCK4eeFlq0bhmaYC4Di64Qs51V2uJy5qTs5jAGJxdgrpyS1k2LiSSDvj8J8198QmeLyixsTYfOyTzam+vBEpIlPpwjuLq2I2OytMeZZKUiW8ZtMM+p1K7tOzZTKryiGI2xv6TOtKDsWY8nbrFNEu4vceQKN+t7c5qEoTNxWOsJkfu1W2Uqii7Tk6726P8D";
Sidebar.prototype.gearImage=GRAPH_IMAGE_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.libAliases={aws2:"aws3",gcp:"gcp2"};Sidebar.prototype.defaultEntries="general;uml;er;bpmn;flowchart;basic;arrows2";Sidebar.prototype.signs="Animals Food Healthcare Nature People Safety Science Sports Tech Transportation Travel".split(" ");Sidebar.prototype.ibm="Analytics Applications Blockchain Data DevOps Infrastructure Management Miscellaneous Security Social Users VPC Boxes Connectors".split(" ");Sidebar.prototype.allied_telesis=
@@ -9833,26 +9837,26 @@ DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.shadowData=this
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;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(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(b,e):this.updateFile(b,e)};
-DrawioFile.prototype.updateFile=function(b,e,d,c){null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=g?this.mergeFile(g,b,e,c):this.reloadFile(b,e))}catch(k){null!=e&&e(k)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,d,c){var g=!0;try{this.stats.fileMerged++;var k=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),n=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=n&&0<n.length){this.shadowPages=n;this.backupPatch=this.isModified()?this.ui.diffPages(k,this.ui.pages):null;var f=[this.ui.diffPages(null!=c?c:k,this.shadowPages)];if(!this.ignorePatches(f)){var l=this.ui.patchPages(k,
-f[0]);c={};var m=this.ui.getHashValueForPages(l,c),k={},p=this.ui.getHashValueForPages(this.shadowPages,k);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",f,"checksum",p==m,m);if(null!=m&&m!=p){var q=this.compressReportData(this.getAnonymizedXmlForPages(n)),t=this.compressReportData(this.getAnonymizedXmlForPages(l)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(d,f,"Shadow Details: "+JSON.stringify(c)+
-"\nChecksum: "+m+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(k)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+t,null,"mergeFile");return}this.patch(f,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=d&&d(z);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var x=this.getCurrentUser(),A=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),A,z)}}catch(y){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),d=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var g=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,g,!0);d.appendChild(g)}return mxUtils.getPrettyXml(d)};
+DrawioFile.prototype.updateFile=function(b,e,d,c){null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=d&&d()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=k?this.mergeFile(k,b,e,c):this.reloadFile(b,e))}catch(g){null!=e&&e(g)}}),e))};
+DrawioFile.prototype.mergeFile=function(b,e,d,c){var k=!0;try{this.stats.fileMerged++;var g=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),m=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=m&&0<m.length){this.shadowPages=m;this.backupPatch=this.isModified()?this.ui.diffPages(g,this.ui.pages):null;var f=[this.ui.diffPages(null!=c?c:g,this.shadowPages)];if(!this.ignorePatches(f)){var l=this.ui.patchPages(g,
+f[0]);c={};var n=this.ui.getHashValueForPages(l,c),g={},p=this.ui.getHashValueForPages(this.shadowPages,g);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",f,"checksum",p==n,n);if(null!=n&&n!=p){var q=this.compressReportData(this.getAnonymizedXmlForPages(m)),t=this.compressReportData(this.getAnonymizedXmlForPages(l)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(d,f,"Shadow Details: "+JSON.stringify(c)+
+"\nChecksum: "+n+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(g)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+t,null,"mergeFile");return}this.patch(f,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=d&&d(z);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,z);else{var x=this.getCurrentUser(),A=null!=x?x.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),A,z)}}catch(y){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),d=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var k=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,k,!0);d.appendChild(k)}return mxUtils.getPrettyXml(d)};
DrawioFile.prototype.compressReportData=function(b,e,d){e=null!=e?e:1E4;null!=d&&null!=b&&b.length>d?b=b.substring(0,d)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,d,c,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var k=mxUtils.bind(this,function(b){var f=this.compressReportData(JSON.stringify(e,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=d?d:"")+"\n\nPatches:\n"+f+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==c?k(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==c?k(b):k(null)}),function(){})}else{var n=this.getCurrentUser(),f=null!=n?n.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+f+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+f+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(l){}}}catch(l){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,d,c){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),k=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),n=this.getCurrentUser(),f=null!=n?this.ui.hashValue(n.id):"unknown",l=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",m=this.getTitle(),p=m.lastIndexOf("."),n="xml";0<p&&(n=m.substring(p));var q=null!=d?d.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+n+")\nUser="+f+l+"\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!=d?"\n\nError: "+d.message:"")+"\n\nStack:\n"+q+"\n\nShadow:\n"+g+"\n\nData:\n"+k,c)}catch(t){}};
-DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var d=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),d=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,c,d);null!=this.backupPatch&&this.patch([this.backupPatch]);var k=this.ui.getCurrentFile();null!=k&&(k.stats=this.stats);null!=b&&
+DrawioFile.prototype.checksumError=function(b,e,d,c,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var g=mxUtils.bind(this,function(b){var f=this.compressReportData(JSON.stringify(e,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=d?d:"")+"\n\nPatches:\n"+f+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==c?g(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==c?g(b):g(null)}),function(){})}else{var m=this.getCurrentUser(),f=null!=m?m.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+f+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+f+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(l){}}}catch(l){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,d,c){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),g=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),m=this.getCurrentUser(),f=null!=m?this.ui.hashValue(m.id):"unknown",l=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",n=this.getTitle(),p=n.lastIndexOf("."),m="xml";0<p&&(m=n.substring(p));var q=null!=d?d.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+m+")\nUser="+f+l+"\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!=d?"\n\nError: "+d.message:"")+"\n\nStack:\n"+q+"\n\nShadow:\n"+k+"\n\nData:\n"+g,c)}catch(t){}};
+DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var d=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),d=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,c,d);null!=this.backupPatch&&this.patch([this.backupPatch]);var g=this.ui.getCurrentFile();null!=g&&(g.stats=this.stats);null!=b&&
b()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):d()}catch(c){null!=e&&e(c)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(b){for(var e=!0,d=0;d<b.length&&e;d++)e=e&&0==Object.keys(b[d]).length;return e};
-DrawioFile.prototype.patch=function(b,e,d){var c=this.ui.editor.undoManager,g=c.history.slice(),k=c.indexOfNextAdd,n=this.ui.editor.graph;n.container.style.visibility="hidden";var f=this.changeListenerEnabled;this.changeListenerEnabled=d;var l=n.foldingEnabled,m=n.mathEnabled,p=n.cellRenderer.redraw;n.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());p.apply(this,arguments)};n.model.beginUpdate();try{for(var q=
-0;q<b.length;q++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[q],!0,e,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=p;this.changeListenerEnabled=f;d||(c.history=g,c.indexOfNextAdd=k,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)m!=
-n.mathEnabled?(this.ui.editor.updateGraphComponents(),n.refresh()):(l!=n.foldingEnabled?n.view.revalidate():n.view.validate(),n.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}};
-DrawioFile.prototype.save=function(b,e,d,c,g,k){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=d)d({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=d)d({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(n){if(null!=d)d(n);else throw n;}};
+DrawioFile.prototype.patch=function(b,e,d){var c=this.ui.editor.undoManager,k=c.history.slice(),g=c.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var f=this.changeListenerEnabled;this.changeListenerEnabled=d;var l=m.foldingEnabled,n=m.mathEnabled,p=m.cellRenderer.redraw;m.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());p.apply(this,arguments)};m.model.beginUpdate();try{for(var q=
+0;q<b.length;q++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[q],!0,e,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=p;this.changeListenerEnabled=f;d||(c.history=k,c.indexOfNextAdd=g,c.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)n!=
+m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(l!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}};
+DrawioFile.prototype.save=function(b,e,d,c,k,g){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=d)d({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=d)d({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(m){if(null!=d)d(m);else throw m;}};
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 b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,d){};DrawioFile.prototype.saveFile=function(b,e,d,c){};
DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};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(b,e,d){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,d){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -9877,405 +9881,405 @@ DrawioFile.prototype.showRefreshDialog=function(b,e,d){null==d&&(d=mxResources.g
e)}),null,mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(b,e)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150))};
DrawioFile.prototype.showCopyDialog=function(b,e,d){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,e)}),null,mxResources.get("overwrite"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150)};
DrawioFile.prototype.showConflictDialog=function(b,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("synchronize"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var d=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),c=mxResources.get("redirectToNewApp");null!=e&&(c+=" ("+e+")");var g=mxUtils.bind(this,function(){var c=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==d?window.location.reload():
-window.location.href=d});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()});null!=b?this.isModified()?this.ui.confirm(c,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),g,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(c,g,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-g)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
+DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var d=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),c=mxResources.get("redirectToNewApp");null!=e&&(c+=" ("+e+")");var k=mxUtils.bind(this,function(){var c=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==d?window.location.reload():
+window.location.href=d});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()});null!=b?this.isModified()?this.ui.confirm(c,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(c,k,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+k)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():b?(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(b,e){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(b,e);else if(this.isModified()&&this.addUnsavedStatus(b),e)this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var d=this.getErrorMessage(b);null!=d&&60<d.length&&(d=d.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=
d?" ("+mxUtils.htmlEntities(d)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(b,e){var d=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(b){this.handleFileError(b,!0)}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,d,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,
-mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,d,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(d,c,g):this.invalidChecksum?this.showRefreshDialog(d,c,this.getErrorMessage(b)):e?this.showConflictDialog(g,k):this.addConflictStatus(mxUtils.bind(this,
+DrawioFile.prototype.handleConflictError=function(b,e){var d=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(b){this.handleFileError(b,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,d,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,
+mxResources.get("updatingDocument"))&&this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,d,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(d,c,k):this.invalidChecksum?this.showRefreshDialog(d,c,this.getErrorMessage(b)):e?this.showConflictDialog(k,g):this.addConflictStatus(mxUtils.bind(this,
function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(d,c)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};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()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.sendFileChanges(),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(b){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(b){this.handleFileError(b)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.isOptimisticSync=function(){return!1};
DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(d){b(e,d)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.isOptimisticSync()&&this.sync.fileSaving();"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaving",[this])};
DrawioFile.prototype.sendFileChanges=function(){try{null!=this.p2pCollab&&null!=this.sync&&(this.updateFileData(),this.sync.sendFileChanges(this.ui.getPagesForNode(mxUtils.parseXml(this.getData()).documentElement),this.desc),"1"==urlParams.test&&EditorUi.debug("DrawioFile.sendFileChanges",[this]))}catch(b){console.log(b)}};
-DrawioFile.prototype.fileSaved=function(b,e,d,c,g){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=b,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=d&&d()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(b).documentElement),e,d,c,g)}catch(f){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=c&&c(f);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,f);else{var k=this.getCurrentUser(),n=null!=k?k.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),n,f)}}catch(l){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
-DrawioFile.prototype.autosave=function(b,e,d,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var g=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==g&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var b=this.isAutosaveRevision();b&&(this.lastAutosaveRevision=(new Date).getTime());this.save(b,mxUtils.bind(this,function(b){this.autosaveCompleted();null!=d&&d(b)}),mxUtils.bind(this,
-function(b){null!=c&&c(b)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=d&&d(null)}),b);this.autosaveThread=g};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
+DrawioFile.prototype.fileSaved=function(b,e,d,c,k){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=b,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=d&&d()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(b).documentElement),e,d,c,k)}catch(f){this.invalidChecksum=this.inConflictState=
+!0;this.descriptorChanged();null!=c&&c(f);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,f);else{var g=this.getCurrentUser(),m=null!=g?g.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,f)}}catch(l){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
+DrawioFile.prototype.autosave=function(b,e,d,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b: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 b=this.isAutosaveRevision();b&&(this.lastAutosaveRevision=(new Date).getTime());this.save(b,mxUtils.bind(this,function(b){this.autosaveCompleted();null!=d&&d(b)}),mxUtils.bind(this,
+function(b){null!=c&&c(b)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=d&&d(null)}),b);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 b=(new Date).getTime();return null==this.lastAutosaveRevision||b-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(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var d=b.lastIndexOf("."),c=0<d?b.substring(d):"",d=e.lastIndexOf(".");return c===(0<d?e.substring(d):"")}return b==e};
DrawioFile.prototype.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(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,d){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,d,c,g,k){DrawioFile.call(this,b,e);this.title=d;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=g;this.desc=k};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&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(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,d){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,d,c,k,g){DrawioFile.call(this,b,e);this.title=d;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=k;this.desc=g};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&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!0};LocalFile.prototype.save=function(b,e,d){this.saveAs(this.title,e,d)};LocalFile.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};LocalFile.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,d,c,g){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;g||this.updateFileData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var n=this.getData(),f=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=d&&d()}),l=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
-function(b){this.savingFile=!1;null!=c&&c({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(c){this.invalidFileHandle=null;this.desc.lastModified==c.lastModified?b.write(k?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=
-b;this.fileSaved(n,c,f,e);this.removeDraft()}catch(A){e(A)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;e(b)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,k?"image/png":"text/xml",k);else if(d.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf("."),l=0<l?b.substring(l+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(k?"&binary=1":""))).simulate(document,
-"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));f()}});k?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){l(b)}),c,this.ui.getCurrentFile()!=this?n:null,e.scale,e.border)):l(n)};LocalFile.prototype.rename=function(b,e,d){this.title=b;this.descriptorChanged();null!=e&&e()};
+LocalFile.prototype.saveFile=function(b,e,d,c,k){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;k||this.updateFileData();var g=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var m=this.getData(),f=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=d&&d()}),l=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var e=mxUtils.bind(this,
+function(b){this.savingFile=!1;null!=c&&c({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(c){this.invalidFileHandle=null;this.desc.lastModified==c.lastModified?b.write(g?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=
+b;this.fileSaved(m,c,f,e);this.removeDraft()}catch(A){e(A)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;e(b)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,g?"image/png":"text/xml",g);else if(d.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf("."),l=0<l?b.substring(l+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(g?"&binary=1":""))).simulate(document,
+"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));f()}});g?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){l(b)}),c,this.ui.getCurrentFile()!=this?m:null,e.scale,e.border)):l(m)};LocalFile.prototype.rename=function(b,e,d){this.title=b;this.descriptorChanged();null!=e&&e()};
LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,e,d){LocalFile.call(this,b,e,d)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,e,d){DrawioFile.call(this,b,e);this.title=d};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,e,d){this.saveAs(this.getTitle(),e,d)};StorageFile.prototype.saveAs=function(b,e,d){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,e,d)};
-StorageFile.insertFile=function(b,e,d,c,g){var k=mxUtils.bind(this,function(k){var f=function(){var f=new StorageFile(b,d,e);f.saveFile(e,!1,function(){c(f)},g)};k?b.confirm(mxResources.get("replaceIt",[e]),f,g):f()});StorageFile.getFileContent(b,e,function(b){k(null!=b)},function(){k(!1)})};StorageFile.getFileContent=function(b,e,d,c){b.getDatabaseItem(e,function(b){d(null!=b?b.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,d):null!=c&&c()}),"files")};
+StorageFile.insertFile=function(b,e,d,c,k){var g=mxUtils.bind(this,function(g){var f=function(){var f=new StorageFile(b,d,e);f.saveFile(e,!1,function(){c(f)},k)};g?b.confirm(mxResources.get("replaceIt",[e]),f,k):f()});StorageFile.getFileContent(b,e,function(b){g(null!=b)},function(){g(!1)})};StorageFile.getFileContent=function(b,e,d,c){b.getDatabaseItem(e,function(b){d(null!=b?b.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,d):null!=c&&c()}),"files")};
StorageFile.getFileInfo=function(b,e,d,c){b.getDatabaseItem(e,function(b){d(b)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(e,function(b){d(null!=b?{title:e}:null)}):null!=c&&c()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,e,d,c){if(this.isEditable()){var g=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var e=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=d&&d()});this.setShadowModified(!1);var g=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:g.length,lastModified:Date.now(),type:this.type},{title:this.title,data:g}],e,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
-g,e):null!=c&&c()}),["filesInfo","files"])}catch(f){null!=c&&c(f)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(d){this.isRenamable()&&this.getTitle()!=b&&null!=d?this.ui.confirm(mxResources.get("replaceIt",[b]),g,c):g()}),c)}else null!=d&&d()};
-StorageFile.prototype.rename=function(b,e,d){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,e)}),d)});null!=g?this.ui.confirm(mxResources.get("replaceIt",[b]),k,d):k()}),d):e()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
+StorageFile.prototype.saveFile=function(b,e,d,c){if(this.isEditable()){var k=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var e=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=d&&d()});this.setShadowModified(!1);var k=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:k.length,lastModified:Date.now(),type:this.type},{title:this.title,data:k}],e,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
+k,e):null!=c&&c()}),["filesInfo","files"])}catch(f){null!=c&&c(f)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(d){this.isRenamable()&&this.getTitle()!=b&&null!=d?this.ui.confirm(mxResources.get("replaceIt",[b]),k,c):k()}),c)}else null!=d&&d()};
+StorageFile.prototype.rename=function(b,e,d){var c=this.getTitle();c!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(k){var g=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,e)}),d)});null!=k?this.ui.confirm(mxResources.get("replaceIt",[b]),g,d):g()}),d):e()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
StorageFile.prototype.getLatestVersion=function(b,e){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(d){b(new StorageFile(this.ui,d,this.title))}),e)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var e=[],d=0;d<localStorage.length;d++){var c=localStorage.key(d),g=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<g.length){var k=(null==b||"F"==b)&&("<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12)),n=(null==b||"L"==b)&&"<mxlibrary>"===g.substring(0,11);(k||n)&&e.push({title:c,type:k?"F":"L",size:g.length,lastModified:Date.now()})}}return e};
-StorageFile.migrate=function(b){var e=StorageFile.listLocalStorageFiles();e.push({title:".scratchpad",type:"L"});var d=b.transaction(["files","filesInfo"],"readwrite");b=d.objectStore("files");for(var d=d.objectStore("filesInfo"),c=0;c<e.length;c++){var g=e[c],k=localStorage.getItem(g.title);b.add({title:g.title,data:k});d.add(g)}};
-StorageFile.listFiles=function(b,e,d,c){b.getDatabaseItems(function(b){var c=[];if(null!=b)for(var g=0;g<b.length;g++)"."==b[g].title.charAt(0)||null!=e&&b[g].type!=e||c.push(b[g]);d(c)},function(){null==b.database?d(StorageFile.listLocalStorageFiles(e)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,e,d,c){b.removeDatabaseItem([e,e],d,function(){null==b.database?(localStorage.removeItem(e),d()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,e,d){StorageFile.call(this,b,e,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageFile.listLocalStorageFiles=function(b){for(var e=[],d=0;d<localStorage.length;d++){var c=localStorage.key(d),k=localStorage.getItem(c);if(0<c.length&&"."!=c.charAt(0)&&0<k.length){var g=(null==b||"F"==b)&&("<mxfile "===k.substring(0,8)||"<?xml"===k.substring(0,5)||"\x3c!--[if IE]>"===k.substring(0,12)),m=(null==b||"L"==b)&&"<mxlibrary>"===k.substring(0,11);(g||m)&&e.push({title:c,type:g?"F":"L",size:k.length,lastModified:Date.now()})}}return e};
+StorageFile.migrate=function(b){var e=StorageFile.listLocalStorageFiles();e.push({title:".scratchpad",type:"L"});var d=b.transaction(["files","filesInfo"],"readwrite");b=d.objectStore("files");for(var d=d.objectStore("filesInfo"),c=0;c<e.length;c++){var k=e[c],g=localStorage.getItem(k.title);b.add({title:k.title,data:g});d.add(k)}};
+StorageFile.listFiles=function(b,e,d,c){b.getDatabaseItems(function(b){var c=[];if(null!=b)for(var k=0;k<b.length;k++)"."==b[k].title.charAt(0)||null!=e&&b[k].type!=e||c.push(b[k]);d(c)},function(){null==b.database?d(StorageFile.listLocalStorageFiles(e)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,e,d,c){b.removeDatabaseItem([e,e],d,function(){null==b.database?(localStorage.removeItem(e),d()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,e,d){StorageFile.call(this,b,e,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(b,e,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,e,d){DrawioFile.call(this,b,e);this.title=d;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(b,e,d){RemoteFile.call(this,b,e,d.title);this.libObj=d};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(b,e,d){};
RemoteLibrary.prototype.saveAs=function(b,e,d){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,e,d){StorageFile.call(this,b,e,d);b=d;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,e,d){return!1};UrlLibrary.prototype.saveAs=function(b,e,d){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,e,d){DrawioFile.call(this,b,e);this.desc=d||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
var StorageDialog=function(b,e,d){function c(c,g,k,p,x,A){function q(){mxEvent.addListener(t,"click",null!=A?A:function(){k!=App.MODE_GOOGLE||b.isDriveDomain()?k==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);e()})):k==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);e()})):
-(b.setMode(k,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}f++;++n>d&&(mxUtils.br(l),n=1);var t=document.createElement("a");t.style.overflow="hidden";t.style.display="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="8px";t.style.marginBottom="0px";t.style.padding="8px 10px 8px 10px";t.style.width="88px";t.style.height="100px";t.style.whiteSpace="nowrap";t.setAttribute("title",
+(b.setMode(k,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}f++;++m>d&&(mxUtils.br(l),m=1);var t=document.createElement("a");t.style.overflow="hidden";t.style.display="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="8px";t.style.marginBottom="0px";t.style.padding="8px 10px 8px 10px";t.style.width="88px";t.style.height="100px";t.style.whiteSpace="nowrap";t.setAttribute("title",
g);var u=document.createElement("div");u.style.textOverflow="ellipsis";u.style.overflow="hidden";u.style.position="absolute";u.style.bottom="8px";u.style.left="0px";u.style.right="0px";mxUtils.write(u,g);t.appendChild(u);if(null!=c){var v=document.createElement("img");v.setAttribute("src",c);v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.style.width="60px";v.style.height="60px";v.style.paddingBottom="6px";t.appendChild(v)}else u.style.paddingTop="5px",u.style.whiteSpace="normal",
-mxClient.IS_IOS?(t.style.padding="0px 10px 20px 10px",t.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");if(null!=x)for(c=0;c<x.length;c++)mxUtils.br(u),mxUtils.write(u,x[c]);if(null!=p&&null==b[p]){v.style.visibility="hidden";mxUtils.setOpacity(u,10);var D=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});D.spin(t);var E=window.setTimeout(function(){null==
-b[p]&&(D.stop(),t.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(f,c){null!=b[p]&&c.getProperty("client")==b[p]&&(window.clearTimeout(E),mxUtils.setOpacity(u,100),v.style.visibility="",D.stop(),q(),"drive"==p&&null!=m.parentNode&&m.parentNode.removeChild(m))}))}else q();l.appendChild(t)}d=null!=d?d:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var k=document.createElement("div");
-k.style.border="1px solid #d3d3d3";k.style.borderWidth="1px 0px 1px 0px";k.style.padding="10px 0px 20px 0px";var n=0,f=0,l=document.createElement("div");l.style.paddingTop="2px";k.appendChild(l);var m=document.createElement("p"),p=document.createElement("p");p.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(p,mxResources.get("saveDiagramsTo")+":");g.appendChild(p);g.appendChild(k);n=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",
+mxClient.IS_IOS?(t.style.padding="0px 10px 20px 10px",t.style.top="6px"):mxClient.IS_FF&&(u.style.paddingTop="0px",u.style.marginTop="-2px");if(null!=x)for(c=0;c<x.length;c++)mxUtils.br(u),mxUtils.write(u,x[c]);if(null!=p&&null==b[p]){v.style.visibility="hidden";mxUtils.setOpacity(u,10);var D=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});D.spin(t);var G=window.setTimeout(function(){null==
+b[p]&&(D.stop(),t.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(c,f){null!=b[p]&&f.getProperty("client")==b[p]&&(window.clearTimeout(G),mxUtils.setOpacity(u,100),v.style.visibility="",D.stop(),q(),"drive"==p&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else q();l.appendChild(t)}d=null!=d?d:2;var k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";k.style.paddingTop="0px";k.style.paddingBottom="20px";var g=document.createElement("div");
+g.style.border="1px solid #d3d3d3";g.style.borderWidth="1px 0px 1px 0px";g.style.padding="10px 0px 20px 0px";var m=0,f=0,l=document.createElement("div");l.style.paddingTop="2px";g.appendChild(l);var n=document.createElement("p"),p=document.createElement("p");p.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(p,mxResources.get("saveDiagramsTo")+":");k.appendChild(p);k.appendChild(g);m=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",
mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",
-mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");6>f&&null!=b.notion&&c(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),App.MODE_NOTION,"notion");k=document.createElement("span");k.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
-mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,0)");mxUtils.write(k,mxResources.get("decideLater"));mxEvent.addListener(k,"click",function(){b.hideDialog();var f=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=f});g.appendChild(k);mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(m.style.padding="7px",m.style.fontSize=
-"9pt",m.style.marginTop="-14px",m.innerHTML='<a style="background-color:#dcdcdc;padding:6px;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="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(m))},5E3);this.container=g},SplashDialog=function(b){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp){var d=b.addLanguageMenu(e,!0);null!=d&&(d.style.bottom="19px")}b.getServiceCount();var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var g=document.createElement("div");g.style.margin="8px 0px 0px 0px";g.style.padding="18px 0px 24px 0px";d="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",d=mxResources.get("googleDrive")):
+mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");6>f&&null!=b.notion&&c(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),App.MODE_NOTION,"notion");g=document.createElement("span");g.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
+mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,0)");mxUtils.write(g,mxResources.get("decideLater"));mxEvent.addListener(g,"click",function(){b.hideDialog();var c=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=c});k.appendChild(g);mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(n.style.padding="7px",n.style.fontSize=
+"9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:6px;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="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",k.appendChild(n))},5E3);this.container=k},SplashDialog=function(b){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp){var d=b.addLanguageMenu(e,!0);null!=d&&(d.style.bottom="19px")}b.getServiceCount();var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var k=document.createElement("div");k.style.margin="8px 0px 0px 0px";k.style.padding="18px 0px 24px 0px";d="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",d=mxResources.get("googleDrive")):
b.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",d=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",d=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",d=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",d=mxResources.get("gitlab")):b.mode==App.MODE_NOTION?(c.src=IMAGE_PATH+"/notion-logo.svg",d=mxResources.get("notion")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+
-"/osa_database.png",d=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",d=mxResources.get("trello")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",g.style.paddingBottom="10px",g.style.paddingTop="30px",d=mxResources.get("device"));var k=document.createElement("button");k.className="geBigButton";k.style.marginBottom="8px";k.style.fontSize="18px";k.style.padding="10px";k.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)g.style.padding="42px 0px 56px 0px",
-k.style.marginBottom="12px";else{g.style.border="1px solid #d3d3d3";g.style.borderWidth="1px 0px 1px 0px";var n=document.createElement("table"),f=document.createElement("tbody"),l=document.createElement("tr"),m=document.createElement("td"),p=document.createElement("td");n.setAttribute("align","center");m.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,d);p.style.textAlign="left";p.appendChild(c);l.appendChild(m);
-l.appendChild(p);f.appendChild(l);n.appendChild(f);e.appendChild(n);d=document.createElement("span");d.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0)");mxUtils.write(d,mxResources.get("changeStorage"));mxEvent.addListener(d,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});e.appendChild(d)}mxUtils.write(k,mxResources.get("createNewDiagram"));
-mxEvent.addListener(k,"click",function(){b.hideDialog();b.actions.get("new").funct()});g.appendChild(k);mxUtils.br(g);k=document.createElement("button");k.className="geBigButton";k.style.marginBottom="22px";k.style.fontSize="18px";k.style.padding="10px";k.style.width="340px";mxUtils.write(k,mxResources.get("openExistingDiagram"));mxEvent.addListener(k,"click",function(){b.actions.get("open").funct()});g.appendChild(k);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?
-mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_NOTION?mxResources.get("notion"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(d=function(f){k.style.marginBottom="24px";var c=document.createElement("a");
-c.style.display="inline-block";c.style.color="gray";c.style.cursor="pointer";c.style.marginTop="6px";mxUtils.write(c,mxResources.get("signOut"));k.style.marginBottom="16px";g.style.paddingBottom="18px";mxEvent.addListener(c,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){f()})});g.appendChild(c)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var q=b.drive.getUsersList();if(0<q.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+
-":");k.style.marginBottom="16px";g.style.paddingBottom="18px";g.appendChild(c);var t=document.createElement("select");t.style.marginLeft="4px";t.style.width="140px";for(d=0;d<q.length;d++)n=document.createElement("option"),mxUtils.write(n,q[d].displayName),n.value=d,t.appendChild(n),n=document.createElement("option"),n.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(n,"<"+q[d].email+">"),n.setAttribute("disabled","disabled"),t.appendChild(n);n=document.createElement("option");mxUtils.write(n,mxResources.get("addAccount"));
-n.value=q.length;t.appendChild(n);mxEvent.addListener(t,"change",function(){var c=t.value,f=q.length!=c;f&&b.drive.setUser(q[c]);b.drive.authorize(f,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(c){b.handleError(c,null,function(){b.hideDialog();b.showSplash()})},!0)});g.appendChild(t)}else d(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?d(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):
-b.mode==App.MODE_GITLAB&&null!=b.gitLab?d(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_NOTION&&null!=b.notion?d(function(){b.notion.logout()}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&d(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&d(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):d(function(){b.oneDrive.logout()});e.appendChild(g);this.container=e},EmbedDialog=function(b,
-e,d,c,g,k,n,f,l){n=null!=n?n:"Check out the diagram I made using @drawio";c=document.createElement("div");var m=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=k?mxUtils.write(c,k):mxUtils.write(c,mxResources.get(5E5>e.length?m?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);k=document.createElement("div");k.style.position="absolute";k.style.top="30px";k.style.right="30px";k.style.color="gray";mxUtils.write(k,b.formatFileSize(e.length));c.appendChild(k);var p=document.createElement("textarea");
+"/osa_database.png",d=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",d=mxResources.get("trello")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",k.style.paddingBottom="10px",k.style.paddingTop="30px",d=mxResources.get("device"));var g=document.createElement("button");g.className="geBigButton";g.style.marginBottom="8px";g.style.fontSize="18px";g.style.padding="10px";g.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k.style.padding="42px 0px 56px 0px",
+g.style.marginBottom="12px";else{k.style.border="1px solid #d3d3d3";k.style.borderWidth="1px 0px 1px 0px";var m=document.createElement("table"),f=document.createElement("tbody"),l=document.createElement("tr"),n=document.createElement("td"),p=document.createElement("td");m.setAttribute("align","center");n.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,d);p.style.textAlign="left";p.appendChild(c);l.appendChild(n);
+l.appendChild(p);f.appendChild(l);m.appendChild(f);e.appendChild(m);d=document.createElement("span");d.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,0)");mxUtils.write(d,mxResources.get("changeStorage"));mxEvent.addListener(d,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});e.appendChild(d)}mxUtils.write(g,mxResources.get("createNewDiagram"));
+mxEvent.addListener(g,"click",function(){b.hideDialog();b.actions.get("new").funct()});k.appendChild(g);mxUtils.br(k);g=document.createElement("button");g.className="geBigButton";g.style.marginBottom="22px";g.style.fontSize="18px";g.style.padding="10px";g.style.width="340px";mxUtils.write(g,mxResources.get("openExistingDiagram"));mxEvent.addListener(g,"click",function(){b.actions.get("open").funct()});k.appendChild(g);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?
+mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_NOTION?mxResources.get("notion"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(d=function(c){g.style.marginBottom="24px";var f=document.createElement("a");
+f.style.display="inline-block";f.style.color="gray";f.style.cursor="pointer";f.style.marginTop="6px";mxUtils.write(f,mxResources.get("signOut"));g.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(f,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){c()})});k.appendChild(f)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var q=b.drive.getUsersList();if(0<q.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+
+":");g.style.marginBottom="16px";k.style.paddingBottom="18px";k.appendChild(c);var t=document.createElement("select");t.style.marginLeft="4px";t.style.width="140px";for(d=0;d<q.length;d++)m=document.createElement("option"),mxUtils.write(m,q[d].displayName),m.value=d,t.appendChild(m),m=document.createElement("option"),m.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(m,"<"+q[d].email+">"),m.setAttribute("disabled","disabled"),t.appendChild(m);m=document.createElement("option");mxUtils.write(m,mxResources.get("addAccount"));
+m.value=q.length;t.appendChild(m);mxEvent.addListener(t,"change",function(){var f=t.value,c=q.length!=f;c&&b.drive.setUser(q[f]);b.drive.authorize(c,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(f){b.handleError(f,null,function(){b.hideDialog();b.showSplash()})},!0)});k.appendChild(t)}else d(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?d(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):
+b.mode==App.MODE_GITLAB&&null!=b.gitLab?d(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_NOTION&&null!=b.notion?d(function(){b.notion.logout()}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&d(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&d(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):d(function(){b.oneDrive.logout()});e.appendChild(k);this.container=e},EmbedDialog=function(b,
+e,d,c,k,g,m,f,l){m=null!=m?m:"Check out the diagram I made using @drawio";c=document.createElement("div");var n=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=g?mxUtils.write(c,g):mxUtils.write(c,mxResources.get(5E5>e.length?n?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);g=document.createElement("div");g.style.position="absolute";g.style.top="30px";g.style.right="30px";g.style.color="gray";mxUtils.write(g,b.formatFileSize(e.length));c.appendChild(g);var p=document.createElement("textarea");
p.setAttribute("autocomplete","off");p.setAttribute("autocorrect","off");p.setAttribute("autocapitalize","off");p.setAttribute("spellcheck","false");p.style.fontFamily="monospace";p.style.wordBreak="break-all";p.style.marginTop="10px";p.style.resize="none";p.style.height="150px";p.style.width="440px";p.style.border="1px solid gray";p.value=mxResources.get("updatingDocument");c.appendChild(p);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(p.value=e,p.focus(),mxClient.IS_GC||
-mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null)):(p.setAttribute("readonly","true"),p.value=mxResources.get("tooLargeUseDownload"))},0)};k=document.createElement("div");k.style.position="absolute";k.style.bottom="36px";k.style.right="32px";var q=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!m||navigator.standalone||!(m||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(q=mxUtils.button(null!=f?f:mxResources.get(5E5>
-e.length?"preview":"openInNewWindow"),function(){var c=5E5>e.length?p.value:e;if(null!=g)g(c);else if(m)try{var f=b.openLink(c);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=c.substring(0,8)&&(f.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(A){}}),d||500)}catch(A){b.handleError({message:A.message||mxResources.get("drawingTooLarge")})}else{var l=window.open(),l=null!=l?l.document:
-null;null!=l?(l.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),l.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),q.className="geBtn",k.appendChild(q));if(!m||7500<e.length)f=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();b.saveData(null!=l?l:"embed.txt","txt",e,"text/plain")}),f.className="geBtn",k.appendChild(f);if(m&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>
-e.length){var t=mxUtils.button("",function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(p.value);b.openLink(c)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}});f=document.createElement("img");f.setAttribute("src",Editor.facebookImage);f.setAttribute("width","18");f.setAttribute("height","18");f.setAttribute("border","0");t.appendChild(f);t.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");t.style.verticalAlign=
-"bottom";t.style.paddingTop="4px";t.style.minWidth="46px";t.className="geBtn";k.appendChild(t)}7168>e.length&&(t=mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+encodeURIComponent(n)+"&url="+encodeURIComponent(p.value);b.openLink(c)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border",
-"0"),f.style.marginBottom="5px",t.appendChild(f),t.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),t.style.verticalAlign="bottom",t.style.paddingTop="4px",t.style.minWidth="46px",t.className="geBtn",k.appendChild(t))}f=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});k.appendChild(f);t=mxUtils.button(mxResources.get("copy"),function(){p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",
-!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?f.className="geBtn gePrimaryBtn":(k.appendChild(t),t.className="geBtn gePrimaryBtn",f.className="geBtn"):(k.appendChild(q),f.className="geBtn",q.className="geBtn gePrimaryBtn");c.appendChild(k);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,e){function d(){var b=null!=E&&null!=E.getTitle()?E.getTitle():this.defaultFilename;if(C.checked&&""!=t.value){var c="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=b&&(c+="&title="+encodeURIComponent(b));0<D.length&&(c+="&s="+D);""!=u.value&&"0"!=u.value&&(c+="&border="+u.value);""!=q.value&&(c+="&height="+q.value);c+="&pan="+(v.checked?"1":"0");c+="&zoom="+(x.checked?"1":"0");c+="&fit="+(B.checked?"1":"0");
-c+="&resize="+(y.checked?"1":"0");c+="&x0="+Number(p.value);c+="&y0="+l;g.mathEnabled&&(c+="&math=1");z.checked?c+="&edit=_blank":A.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));m.value=c}else E.constructor==DriveFile||E.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?c+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(c+=E.getHash().substring(1),c=E.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=
-b&&(c+="&title="+encodeURIComponent(b)),""!=q.value&&(b=parseInt(q.value)+parseInt(p.value),c+="&height="+b),m.value=c):m.value=""}var c=document.createElement("div"),g=b.editor.graph,k=g.getGraphBounds(),n=g.view.scale,f=Math.floor(k.x/n-g.view.translate.x),l=Math.floor(k.y/n-g.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";
-c.appendChild(m);mxUtils.br(c);this.init=function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","4");p.style.marginRight="16px";p.style.marginLeft="4px";p.value=f;c.appendChild(p);mxUtils.write(c,mxResources.get("height")+":");var q=document.createElement("input");q.setAttribute("type","text");
-q.setAttribute("size","4");q.style.marginLeft="4px";q.value=Math.ceil(k.height/n);c.appendChild(q);mxUtils.br(c);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";c.appendChild(k);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var 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||"";c.appendChild(t);
+mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null)):(p.setAttribute("readonly","true"),p.value=mxResources.get("tooLargeUseDownload"))},0)};g=document.createElement("div");g.style.position="absolute";g.style.bottom="36px";g.style.right="32px";var q=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!n||navigator.standalone||!(n||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(q=mxUtils.button(null!=f?f:mxResources.get(5E5>
+e.length?"preview":"openInNewWindow"),function(){var f=5E5>e.length?p.value:e;if(null!=k)k(f);else if(n)try{var c=b.openLink(f);null!=c&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=c&&null!=c.location.href&&c.location.href.substring(0,8)!=f.substring(0,8)&&(c.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(A){}}),d||500)}catch(A){b.handleError({message:A.message||mxResources.get("drawingTooLarge")})}else{var l=window.open(),l=null!=l?l.document:
+null;null!=l?(l.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>"),l.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),q.className="geBtn",g.appendChild(q));if(!n||7500<e.length)f=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();b.saveData(null!=l?l:"embed.txt","txt",e,"text/plain")}),f.className="geBtn",g.appendChild(f);if(n&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>
+e.length){var t=mxUtils.button("",function(){try{var f="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(p.value);b.openLink(f)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}});f=document.createElement("img");f.setAttribute("src",Editor.facebookImage);f.setAttribute("width","18");f.setAttribute("height","18");f.setAttribute("border","0");t.appendChild(f);t.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");t.style.verticalAlign=
+"bottom";t.style.paddingTop="4px";t.style.minWidth="46px";t.className="geBtn";g.appendChild(t)}7168>e.length&&(t=mxUtils.button("",function(){try{var f="https://twitter.com/intent/tweet?text="+encodeURIComponent(m)+"&url="+encodeURIComponent(p.value);b.openLink(f)}catch(v){b.handleError({message:v.message||mxResources.get("drawingTooLarge")})}}),f=document.createElement("img"),f.setAttribute("src",Editor.tweetImage),f.setAttribute("width","18"),f.setAttribute("height","18"),f.setAttribute("border",
+"0"),f.style.marginBottom="5px",t.appendChild(f),t.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),t.style.verticalAlign="bottom",t.style.paddingTop="4px",t.style.minWidth="46px",t.className="geBtn",g.appendChild(t))}f=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});g.appendChild(f);t=mxUtils.button(mxResources.get("copy"),function(){p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",
+!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?f.className="geBtn gePrimaryBtn":(g.appendChild(t),t.className="geBtn gePrimaryBtn",f.className="geBtn"):(g.appendChild(q),f.className="geBtn",q.className="geBtn gePrimaryBtn");c.appendChild(g);this.container=c};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(b,e){function d(){var b=null!=G&&null!=G.getTitle()?G.getTitle():this.defaultFilename;if(C.checked&&""!=t.value){var f="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=b&&(f+="&title="+encodeURIComponent(b));0<D.length&&(f+="&s="+D);""!=u.value&&"0"!=u.value&&(f+="&border="+u.value);""!=q.value&&(f+="&height="+q.value);f+="&pan="+(v.checked?"1":"0");f+="&zoom="+(x.checked?"1":"0");f+="&fit="+(B.checked?"1":"0");
+f+="&resize="+(y.checked?"1":"0");f+="&x0="+Number(p.value);f+="&y0="+l;k.mathEnabled&&(f+="&math=1");z.checked?f+="&edit=_blank":A.checked&&(f+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));n.value=f}else G.constructor==DriveFile||G.constructor==DropboxFile?(f="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?f+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(f+=G.getHash().substring(1),f=G.constructor==DropboxFile?f+"&type=2":f+"&type=1"),null!=
+b&&(f+="&title="+encodeURIComponent(b)),""!=q.value&&(b=parseInt(q.value)+parseInt(p.value),f+="&height="+b),n.value=f):n.value=""}var c=document.createElement("div"),k=b.editor.graph,g=k.getGraphBounds(),m=k.view.scale,f=Math.floor(g.x/m-k.view.translate.x),l=Math.floor(g.y/m-k.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var n=document.createElement("input");n.setAttribute("type","text");n.style.marginBottom="8px";n.style.marginTop="2px";n.style.width="410px";
+c.appendChild(n);mxUtils.br(c);this.init=function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","4");p.style.marginRight="16px";p.style.marginLeft="4px";p.value=f;c.appendChild(p);mxUtils.write(c,mxResources.get("height")+":");var q=document.createElement("input");q.setAttribute("type","text");
+q.setAttribute("size","4");q.style.marginLeft="4px";q.value=Math.ceil(g.height/m);c.appendChild(q);mxUtils.br(c);g=document.createElement("hr");g.setAttribute("size","1");g.style.marginBottom="16px";g.style.marginTop="16px";c.appendChild(g);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var 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||"";c.appendChild(t);
mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";c.appendChild(u);mxUtils.br(c);var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";c.appendChild(v);mxUtils.write(c,mxResources.get("pan")+" ");var x=document.createElement("input");
x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,mxResources.get("zoom")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";A.setAttribute("title",window.location.href);c.appendChild(A);mxUtils.write(c,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,
mxResources.get("asNew")+" ");mxUtils.br(c);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";c.appendChild(y);mxUtils.write(c,mxResources.get("resize")+" ");var B=document.createElement("input");B.setAttribute("type","checkbox");B.style.marginLeft="8px";c.appendChild(B);mxUtils.write(c,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
-"8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var D=b.getBasenames().join(";"),E=b.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(B,"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(C,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(t,"change",d);d();
-mxEvent.addListener(m,"click",function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.className="geBtn gePrimaryBtn";k.appendChild(n);c.appendChild(k);this.container=c},CreateGraphDialog=function(b,e,d){var c=document.createElement("div");c.style.textAlign="right";this.init=
-function(){var e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);c.appendChild(e);var k=new Graph(e);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var n="curved=1;";k.cellRenderer.installCellOverlayListeners=
-function(b,c,f){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(f.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(f){c.fireEvent(new mxEventObject("pointerdown","event",f,"state",b))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(f.node,"touchstart",function(f){c.fireEvent(new mxEventObject("pointerdown","event",f,"state",b))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=
-!1;k.connectionHandler.createEdgeState=function(b){b=k.createEdge(null,null,null,null,null,n);return new mxCellState(this.graph.view,b,this.graph.getCellStyle(b))};var f=k.getDefaultParent(),l=mxUtils.bind(this,function(b){var c=new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,d){k.connectionHandler.reset();k.clearSelection();var e=k.getCellGeometry(b),m;q(function(){m=k.insertVertex(f,null,"Entry",e.x,e.y,80,30,"rounded=1;");l(m);k.view.refresh(m);
-k.insertEdge(f,null,"",b,m,n)},function(){k.scrollCellToVisible(m)})});c.addListener("pointerdown",function(b,c){var f=c.getProperty("event"),d=c.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var e=mxUtils.convertPoint(k.container,mxEvent.getClientX(f),mxEvent.getClientY(f));k.connectionHandler.start(d,e.x,e.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(f);mxEvent.consume(f)});k.addCellOverlay(b,c)});k.getModel().beginUpdate();var m;try{m=k.insertVertex(f,null,"Start",
-0,0,80,30,"ellipse"),l(m)}finally{k.getModel().endUpdate()}var p;"horizontalTree"==d?(p=new mxCompactTreeLayout(k),p.edgeRouting=!1,p.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(p=new mxCompactTreeLayout(k,!1),p.edgeRouting=!1,p.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(p=new mxRadialTreeLayout(k,!1),p.edgeRouting=!1,p.levelDistance=80):"verticalFlow"==d?p=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-d?p=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==d?(p=new mxFastOrganicLayout(k,!1),p.forceConstant=80):"circle"==d&&(p=new mxCircleLayout(k));if(null!=p){var q=function(b,c){k.getModel().beginUpdate();try{null!=b&&b(),p.execute(k.getDefaultParent(),m)}catch(y){throw y;}finally{var f=new mxMorphing(k);f.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=c&&c()}));f.startAnimation()}},t=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(b,c,f,d,e){t.apply(this,arguments);q()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);q()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){q()})}var u=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));b.hideDialog()})});u.className="geBtn";b.editor.cancelFirst&&c.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(c){k.clearCellOverlays();
-var f=k.getModel().getChildren(k.getDefaultParent());c=mxEvent.isAltDown(c)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(k.getBoundingBoxFromGeometry(f,!0));f=b.editor.graph.importCells(f,c.x,c.y);c=b.editor.graph.view;var d=c.getBounds(f);d.x-=c.translate.x;d.y-=c.translate.y;b.editor.graph.scrollRectToVisible(d);b.editor.graph.setSelectionCells(f);null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));b.hideDialog()});c.appendChild(v);v.className="geBtn gePrimaryBtn";
+"8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var D=b.getBasenames().join(";"),G=b.getCurrentFile();mxEvent.addListener(v,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(B,"change",d);mxEvent.addListener(A,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(C,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(p,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(t,"change",d);d();
+mxEvent.addListener(n,"click",function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn gePrimaryBtn";g.appendChild(m);c.appendChild(g);this.container=c},CreateGraphDialog=function(b,e,d){var c=document.createElement("div");c.style.textAlign="right";this.init=
+function(){var e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);c.appendChild(e);var g=new Graph(e);g.setCellsCloneable(!0);g.setPanning(!0);g.setAllowDanglingEdges(!1);g.connectionHandler.select=!1;g.view.setTranslate(20,20);g.border=20;g.panningHandler.useLeftButtonForPanning=!0;var m="curved=1;";g.cellRenderer.installCellOverlayListeners=
+function(b,f,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){f.fireEvent(new mxEventObject("pointerdown","event",c,"state",b))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){f.fireEvent(new mxEventObject("pointerdown","event",c,"state",b))})};g.getAllConnectionConstraints=function(){return null};g.connectionHandler.marker.highlight.keepOnTop=
+!1;g.connectionHandler.createEdgeState=function(b){b=g.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,b,this.graph.getCellStyle(b))};var f=g.getDefaultParent(),l=mxUtils.bind(this,function(b){var c=new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,d){g.connectionHandler.reset();g.clearSelection();var e=g.getCellGeometry(b),n;q(function(){n=g.insertVertex(f,null,"Entry",e.x,e.y,80,30,"rounded=1;");l(n);g.view.refresh(n);
+g.insertEdge(f,null,"",b,n,m)},function(){g.scrollCellToVisible(n)})});c.addListener("pointerdown",function(b,f){var c=f.getProperty("event"),d=f.getProperty("state");g.popupMenuHandler.hideMenu();g.stopEditing(!1);var e=mxUtils.convertPoint(g.container,mxEvent.getClientX(c),mxEvent.getClientY(c));g.connectionHandler.start(d,e.x,e.y);g.isMouseDown=!0;g.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});g.addCellOverlay(b,c)});g.getModel().beginUpdate();var n;try{n=g.insertVertex(f,null,"Start",
+0,0,80,30,"ellipse"),l(n)}finally{g.getModel().endUpdate()}var p;"horizontalTree"==d?(p=new mxCompactTreeLayout(g),p.edgeRouting=!1,p.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(p=new mxCompactTreeLayout(g,!1),p.edgeRouting=!1,p.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(p=new mxRadialTreeLayout(g,!1),p.edgeRouting=!1,p.levelDistance=80):"verticalFlow"==d?p=new mxHierarchicalLayout(g,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+d?p=new mxHierarchicalLayout(g,mxConstants.DIRECTION_WEST):"organic"==d?(p=new mxFastOrganicLayout(g,!1),p.forceConstant=80):"circle"==d&&(p=new mxCircleLayout(g));if(null!=p){var q=function(b,f){g.getModel().beginUpdate();try{null!=b&&b(),p.execute(g.getDefaultParent(),n)}catch(y){throw y;}finally{var c=new mxMorphing(g);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=f&&f()}));c.startAnimation()}},t=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(b,f,c,d,e){t.apply(this,arguments);q()};g.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);q()};g.connectionHandler.addListener(mxEvent.CONNECT,function(){q()})}var u=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(g.destroy(),e.parentNode.removeChild(e));b.hideDialog()})});u.className="geBtn";b.editor.cancelFirst&&c.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(f){g.clearCellOverlays();
+var c=g.getModel().getChildren(g.getDefaultParent());f=mxEvent.isAltDown(f)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(g.getBoundingBoxFromGeometry(c,!0));c=b.editor.graph.importCells(c,f.x,f.y);f=b.editor.graph.view;var d=f.getBounds(c);d.x-=f.translate.x;d.y-=f.translate.y;b.editor.graph.scrollRectToVisible(d);b.editor.graph.setSelectionCells(c);null!=e.parentNode&&(g.destroy(),e.parentNode.removeChild(e));b.hideDialog()});c.appendChild(v);v.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||c.appendChild(u)};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(b,e,d){var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=document.createElement("h2");mxUtils.write(g,mxResources.get("backgroundImage"));g.style.marginTop="0px";c.appendChild(g);var k=null!=d&&null!=d.originalSrc,g=!1,n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","geBackgroundImageDialogOption");var f=document.createElement("input");
-f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","geBackgroundImageDialogOption");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.width="320px";l.value=k||null==d?"":d.src;var m=document.createElement("select");m.style.width="320px";if(null!=b.pages)for(var p=0;p<b.pages.length;p++){var q=document.createElement("option");mxUtils.write(q,b.pages[p].getName()||
-mxResources.get("pageWithNumber",[p+1]));q.setAttribute("value","data:page/id,"+b.pages[p].getId());b.pages[p]==b.currentPage&&q.setAttribute("disabled","disabled");null!=d&&d.originalSrc==q.getAttribute("value")&&(q.setAttribute("selected","selected"),g=!0);m.appendChild(q)}k||null!=b.pages&&1!=b.pages.length||(n.style.display="none",f.style.display="none",m.style.display="none");var t=!1,u=!1,v=function(c,d){t||null!=c&&u||(f.checked?null!=d&&d(m.value):""==l.value||b.isOffline()?(x.value="",A.value=
-"",null!=d&&d("")):(l.value=mxUtils.trim(l.value),b.loadImage(l.value,function(b){x.value=b.width;A.value=b.height;null!=d&&d(l.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));x.value="";A.value="";null!=d&&d(null)})))};this.init=function(){k?m.focus():l.focus();mxEvent.addListener(m,"focus",function(){n.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});mxEvent.addListener(l,"focus",function(){f.removeAttribute("checked");
-n.setAttribute("checked","checked");n.checked=!0});if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=c.parentNode,e=null;mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(c){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=b.highlightElement(d));c.stopPropagation();c.preventDefault()}));mxEvent.addListener(d,
-"drop",mxUtils.bind(this,function(c){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxBackgroundSize,function(b,c,f,d,e,m){l.value=b;v()},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var f=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&
-(l.value=decodeURIComponent(f),v())}c.stopPropagation();c.preventDefault()}),!1)}};c.appendChild(n);c.appendChild(l);mxUtils.br(c);p=document.createElement("span");p.style.marginLeft="30px";mxUtils.write(p,mxResources.get("width")+":");c.appendChild(p);var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px";x.value=null==d||k?"":d.width;c.appendChild(x);mxUtils.write(c,mxResources.get("height")+":");var A=document.createElement("input");
-A.setAttribute("type","text");A.style.width="60px";A.style.marginLeft="8px";A.style.marginRight="16px";A.value=null==d||k?"":d.height;c.appendChild(A);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(l,"change",v);ImageDialog.filePicked=function(b){b.action==google.picker.Action.PICKED&&null!=b.docs[0].thumbnails&&(b=b.docs[0].thumbnails[b.docs[0].thumbnails.length-1],null!=b&&(l.value=b.url,v()));l.focus()};c.appendChild(f);c.appendChild(m);mxUtils.br(c);k?(f.setAttribute("checked","checked"),f.checked=
-!0):(n.setAttribute("checked","checked"),n.checked=!0);if(!g&&f.checked){var z=document.createElement("option");mxUtils.write(z,mxResources.get("pageNotFound"));z.setAttribute("disabled","disabled");z.setAttribute("selected","selected");z.setAttribute("value","pageNotFound");m.appendChild(z);mxEvent.addListener(m,"change",function(){null==z.parentNode||z.selected||z.parentNode.removeChild(z)})}d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";g=mxUtils.button(mxResources.get("reset"),
-function(){l.value="";x.value="";A.value="";n.checked=!0;t=!1});mxEvent.addGestureListeners(g,function(){t=!0});g.className="geBtn";g.width="100";d.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});g.className="geBtn";b.editor.cancelFirst&&d.appendChild(g);applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();v(null,function(b){e(""!=b&&null!=b?new mxImage(b,x.value,A.value):null,null==b)})});mxEvent.addGestureListeners(applyBtn,function(){u=
-!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(g);c.appendChild(d);this.container=c},ParseDialog=function(b,e,d){function c(c,f,d){var e=c.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==f||"plantUmlTxt"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var l=function(c,f,e,l,g){k=mxEvent.isAltDown(d)?k:m.getCenterInsertPoint(new mxRectangle(0,0,l,g));var p=null;m.getModel().beginUpdate();try{p="txt"==f?b.insertAsPreText(e,
-k.x,k.y):m.insertVertex(null,null,null,k.x,k.y,l,g,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(e)+";"),m.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:c,format:f},null,2))}finally{m.getModel().endUpdate()}null!=p&&(m.setSelectionCell(p),m.scrollCellToVisible(p))},m=b.editor.graph,g="plantUmlTxt"==f?"txt":"plantUmlPng"==f?"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"==
-c&&"svg"==g?window.setTimeout(function(){b.spinner.stop();l(c,g,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(c,g,function(f,d,e){b.spinner.stop();l(c,g,f,d,e)},function(c){b.handleError(c)})}}else if("mermaid"==f)b.spinner.spin(document.body,mxResources.get("inserting"))&&(m=b.editor.graph,b.generateMermaidImage(c,g,function(f,e,l){k=mxEvent.isAltDown(d)?k:m.getCenterInsertPoint(new mxRectangle(0,0,e,l));b.spinner.stop();var g=null;m.getModel().beginUpdate();try{g=m.insertVertex(null,null,null,k.x,k.y,e,l,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-f+";"),m.setAttributeForCell(g,"mermaidData",JSON.stringify({data:c,config:EditorUi.defaultMermaidConfig},null,2))}finally{m.getModel().endUpdate()}null!=g&&(m.setSelectionCell(g),m.scrollCellToVisible(g))},function(c){b.handleError(c)}));else if("table"==f){var p=null,q=[],t=0;for(f=0;f<e.length;f++){var n=mxUtils.trim(e[f]);if("create table"==n.substring(0,12).toLowerCase())n=mxUtils.trim(n.substring(12)),"("==n.charAt(n.length-1)&&(n=mxUtils.trim(n.substring(0,n.length-1))),p=new mxCell(n,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,q.push(p),n=b.editor.graph.getPreferredSizeForCell(v),null!=n&&(p.geometry.width=n.width+10);else if(null!=p&&")"==n.charAt(0))t+=p.geometry.width+40,p=null;else if("("!=n&&null!=p&&(n=n.substring(0,","==n.charAt(n.length-1)?n.length-1:n.length),"primary key"!=n.substring(0,11).toLowerCase())){var u=n.toLowerCase().indexOf("primary key"),
-n=n.replace(/primary key/i,""),v=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")+";");v.vertex=!0;var J=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;":""));J.vertex=!0;v.insert(J);n=new mxCell(n,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;":""));n.vertex=!0;v.insert(n);n=b.editor.graph.getPreferredSizeForCell(n);null!=n&&p.geometry.width<n.width+30&&(p.geometry.width=Math.min(320,Math.max(p.geometry.width,n.width+30)));p.insert(v);p.geometry.height+=30}}0<q.length&&(m=b.editor.graph,k=mxEvent.isAltDown(d)?k:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0)),m.setSelectionCells(m.importCells(q,
-k.x,k.y)),m.scrollCellToVisible(m.getSelectionCell()))}else if("list"==f){if(0<e.length){m=b.editor.graph;v=null;q=[];for(f=p=0;f<e.length;f++)";"!=e[f].charAt(0)&&(0==e[f].length?v=null:null==v?(v=new mxCell(e[f],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;"),v.vertex=!0,q.push(v),n=m.getPreferredSizeForCell(v),null!=n&&v.geometry.width<n.width+10&&(v.geometry.width=
-n.width+10),p+=v.geometry.width+40):"--"==e[f]?(n=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),n.vertex=!0,v.geometry.height+=n.geometry.height,v.insert(n)):0<e[f].length&&(t=new mxCell(e[f],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-t.vertex=!0,n=m.getPreferredSizeForCell(t),null!=n&&t.geometry.width<n.width&&(t.geometry.width=n.width),v.geometry.width=Math.max(v.geometry.width,t.geometry.width),v.geometry.height+=t.geometry.height,v.insert(t)));if(0<q.length){k=mxEvent.isAltDown(d)?k:m.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0));m.getModel().beginUpdate();try{q=m.importCells(q,k.x,k.y);n=[];for(f=0;f<q.length;f++)n.push(q[f]),n=n.concat(q[f].children);m.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{m.getModel().endUpdate()}m.setSelectionCells(q);
-m.scrollCellToVisible(m.getSelectionCell())}}}else{var v=function(b){var c=L[b];null==c&&(c=new mxCell(b,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,L[b]=c,q.push(c));return c},L={},q=[];for(f=0;f<e.length;f++)if(";"!=e[f].charAt(0)){var H=e[f].split("->");2<=H.length&&(u=v(H[0]),J=v(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry),H.edge=!0,u.insertEdge(H,!0),J.insertEdge(H,!1),q.push(H))}if(0<q.length){e=document.createElement("div");e.style.visibility="hidden";
-document.body.appendChild(e);m=new Graph(e);m.getModel().beginUpdate();try{q=m.importCells(q);for(f=0;f<q.length;f++)m.getModel().isVertex(q[f])&&(n=m.getPreferredSizeForCell(q[f]),q[f].geometry.width=Math.max(q[f].geometry.width,n.width),q[f].geometry.height=Math.max(q[f].geometry.height,n.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();
-n=[];b.editor.graph.getModel().beginUpdate();try{q=m.getModel().getChildren(m.getDefaultParent()),k=mxEvent.isAltDown(d)?k:b.editor.graph.getCenterInsertPoint(m.getBoundingBoxFromGeometry(q,!0)),n=b.editor.graph.importCells(q,k.x,k.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(n);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());m.destroy();e.parentNode.removeChild(e)}}}function g(){return"list"==
+var BackgroundImageDialog=function(b,e,d){var c=document.createElement("div");c.style.whiteSpace="nowrap";var k=document.createElement("h2");mxUtils.write(k,mxResources.get("backgroundImage"));k.style.marginTop="0px";c.appendChild(k);var g=null!=d&&null!=d.originalSrc,k=!1,m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","geBackgroundImageDialogOption");var f=document.createElement("input");
+f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","geBackgroundImageDialogOption");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginBottom="8px";l.style.width="320px";l.value=g||null==d?"":d.src;var n=document.createElement("select");n.style.width="320px";if(null!=b.pages)for(var p=0;p<b.pages.length;p++){var q=document.createElement("option");mxUtils.write(q,b.pages[p].getName()||
+mxResources.get("pageWithNumber",[p+1]));q.setAttribute("value","data:page/id,"+b.pages[p].getId());b.pages[p]==b.currentPage&&q.setAttribute("disabled","disabled");null!=d&&d.originalSrc==q.getAttribute("value")&&(q.setAttribute("selected","selected"),k=!0);n.appendChild(q)}g||null!=b.pages&&1!=b.pages.length||(m.style.display="none",f.style.display="none",n.style.display="none");var t=!1,u=!1,v=function(c,d){t||null!=c&&u||(f.checked?null!=d&&d(n.value):""==l.value||b.isOffline()?(x.value="",A.value=
+"",null!=d&&d("")):(l.value=mxUtils.trim(l.value),b.loadImage(l.value,function(b){x.value=b.width;A.value=b.height;null!=d&&d(l.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));x.value="";A.value="";null!=d&&d(null)})))};this.init=function(){g?n.focus():l.focus();mxEvent.addListener(n,"focus",function(){m.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});mxEvent.addListener(l,"focus",function(){f.removeAttribute("checked");
+m.setAttribute("checked","checked");m.checked=!0});if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var d=c.parentNode,e=null;mxEvent.addListener(d,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(f){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=b.highlightElement(d));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(d,
+"drop",mxUtils.bind(this,function(f){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<f.dataTransfer.files.length)b.importFiles(f.dataTransfer.files,0,0,b.maxBackgroundSize,function(b,f,c,d,e,n){l.value=b;v()},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var f=0;f<b.length;f++)b[f]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0);else if(0<=mxUtils.indexOf(f.dataTransfer.types,"text/uri-list")){var c=f.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&
+(l.value=decodeURIComponent(c),v())}f.stopPropagation();f.preventDefault()}),!1)}};c.appendChild(m);c.appendChild(l);mxUtils.br(c);p=document.createElement("span");p.style.marginLeft="30px";mxUtils.write(p,mxResources.get("width")+":");c.appendChild(p);var x=document.createElement("input");x.setAttribute("type","text");x.style.width="60px";x.style.marginLeft="8px";x.style.marginRight="16px";x.value=null==d||g?"":d.width;c.appendChild(x);mxUtils.write(c,mxResources.get("height")+":");var A=document.createElement("input");
+A.setAttribute("type","text");A.style.width="60px";A.style.marginLeft="8px";A.style.marginRight="16px";A.value=null==d||g?"":d.height;c.appendChild(A);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(l,"change",v);ImageDialog.filePicked=function(b){b.action==google.picker.Action.PICKED&&null!=b.docs[0].thumbnails&&(b=b.docs[0].thumbnails[b.docs[0].thumbnails.length-1],null!=b&&(l.value=b.url,v()));l.focus()};c.appendChild(f);c.appendChild(n);mxUtils.br(c);g?(f.setAttribute("checked","checked"),f.checked=
+!0):(m.setAttribute("checked","checked"),m.checked=!0);if(!k&&f.checked){var z=document.createElement("option");mxUtils.write(z,mxResources.get("pageNotFound"));z.setAttribute("disabled","disabled");z.setAttribute("selected","selected");z.setAttribute("value","pageNotFound");n.appendChild(z);mxEvent.addListener(n,"change",function(){null==z.parentNode||z.selected||z.parentNode.removeChild(z)})}d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";k=mxUtils.button(mxResources.get("reset"),
+function(){l.value="";x.value="";A.value="";m.checked=!0;t=!1});mxEvent.addGestureListeners(k,function(){t=!0});k.className="geBtn";k.width="100";d.appendChild(k);k=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&d.appendChild(k);applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();v(null,function(b){e(""!=b&&null!=b?new mxImage(b,x.value,A.value):null,null==b)})});mxEvent.addGestureListeners(applyBtn,function(){u=
+!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(k);c.appendChild(d);this.container=c},ParseDialog=function(b,e,d){function c(f,c,d){var e=f.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==c||"plantUmlTxt"==c){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var l=function(c,f,e,l,k){g=mxEvent.isAltDown(d)?g:n.getCenterInsertPoint(new mxRectangle(0,0,l,k));var p=null;n.getModel().beginUpdate();try{p="txt"==f?b.insertAsPreText(e,
+g.x,g.y):n.insertVertex(null,null,null,g.x,g.y,l,k,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(e)+";"),n.setAttributeForCell(p,"plantUmlData",JSON.stringify({data:c,format:f},null,2))}finally{n.getModel().endUpdate()}null!=p&&(n.setSelectionCell(p),n.scrollCellToVisible(p))},n=b.editor.graph,k="plantUmlTxt"==c?"txt":"plantUmlPng"==c?"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"==
+f&&"svg"==k?window.setTimeout(function(){b.spinner.stop();l(f,k,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(f,k,function(c,d,e){b.spinner.stop();l(f,k,c,d,e)},function(c){b.handleError(c)})}}else if("mermaid"==c)b.spinner.spin(document.body,mxResources.get("inserting"))&&(n=b.editor.graph,b.generateMermaidImage(f,k,function(c,e,l){g=mxEvent.isAltDown(d)?g:n.getCenterInsertPoint(new mxRectangle(0,0,e,l));b.spinner.stop();var k=null;n.getModel().beginUpdate();try{k=n.insertVertex(null,null,null,g.x,g.y,e,l,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+c+";"),n.setAttributeForCell(k,"mermaidData",JSON.stringify({data:f,config:EditorUi.defaultMermaidConfig},null,2))}finally{n.getModel().endUpdate()}null!=k&&(n.setSelectionCell(k),n.scrollCellToVisible(k))},function(c){b.handleError(c)}));else if("table"==c){var p=null,q=[],t=0;for(c=0;c<e.length;c++){var m=mxUtils.trim(e[c]);if("create table"==m.substring(0,12).toLowerCase())m=mxUtils.trim(m.substring(12)),"("==m.charAt(m.length-1)&&(m=mxUtils.trim(m.substring(0,m.length-1))),p=new mxCell(m,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,q.push(p),m=b.editor.graph.getPreferredSizeForCell(v),null!=m&&(p.geometry.width=m.width+10);else if(null!=p&&")"==m.charAt(0))t+=p.geometry.width+40,p=null;else if("("!=m&&null!=p&&(m=m.substring(0,","==m.charAt(m.length-1)?m.length-1:m.length),"primary key"!=m.substring(0,11).toLowerCase())){var u=m.toLowerCase().indexOf("primary key"),
+m=m.replace(/primary key/i,""),v=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")+";");v.vertex=!0;var J=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;":""));J.vertex=!0;v.insert(J);m=new mxCell(m,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;":""));m.vertex=!0;v.insert(m);m=b.editor.graph.getPreferredSizeForCell(m);null!=m&&p.geometry.width<m.width+30&&(p.geometry.width=Math.min(320,Math.max(p.geometry.width,m.width+30)));p.insert(v);p.geometry.height+=30}}0<q.length&&(n=b.editor.graph,g=mxEvent.isAltDown(d)?g:n.getCenterInsertPoint(n.getBoundingBoxFromGeometry(q,!0)),n.setSelectionCells(n.importCells(q,
+g.x,g.y)),n.scrollCellToVisible(n.getSelectionCell()))}else if("list"==c){if(0<e.length){n=b.editor.graph;v=null;q=[];for(c=p=0;c<e.length;c++)";"!=e[c].charAt(0)&&(0==e[c].length?v=null:null==v?(v=new mxCell(e[c],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;"),v.vertex=!0,q.push(v),m=n.getPreferredSizeForCell(v),null!=m&&v.geometry.width<m.width+10&&(v.geometry.width=
+m.width+10),p+=v.geometry.width+40):"--"==e[c]?(m=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),m.vertex=!0,v.geometry.height+=m.geometry.height,v.insert(m)):0<e[c].length&&(t=new mxCell(e[c],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,m=n.getPreferredSizeForCell(t),null!=m&&t.geometry.width<m.width&&(t.geometry.width=m.width),v.geometry.width=Math.max(v.geometry.width,t.geometry.width),v.geometry.height+=t.geometry.height,v.insert(t)));if(0<q.length){g=mxEvent.isAltDown(d)?g:n.getCenterInsertPoint(n.getBoundingBoxFromGeometry(q,!0));n.getModel().beginUpdate();try{q=n.importCells(q,g.x,g.y);m=[];for(c=0;c<q.length;c++)m.push(q[c]),m=m.concat(q[c].children);n.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{n.getModel().endUpdate()}n.setSelectionCells(q);
+n.scrollCellToVisible(n.getSelectionCell())}}}else{var v=function(b){var c=L[b];null==c&&(c=new mxCell(b,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,L[b]=c,q.push(c));return c},L={},q=[];for(c=0;c<e.length;c++)if(";"!=e[c].charAt(0)){var F=e[c].split("->");2<=F.length&&(u=v(F[0]),J=v(F[F.length-1]),F=new mxCell(2<F.length?F[1]:"",new mxGeometry),F.edge=!0,u.insertEdge(F,!0),J.insertEdge(F,!1),q.push(F))}if(0<q.length){e=document.createElement("div");e.style.visibility="hidden";
+document.body.appendChild(e);n=new Graph(e);n.getModel().beginUpdate();try{q=n.importCells(q);for(c=0;c<q.length;c++)n.getModel().isVertex(q[c])&&(m=n.getPreferredSizeForCell(q[c]),q[c].geometry.width=Math.max(q[c].geometry.width,m.width),q[c].geometry.height=Math.max(q[c].geometry.height,m.height));p=new mxFastOrganicLayout(n);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(n.getDefaultParent());t=new mxParallelEdgeLayout(n);t.spacing=20;t.execute(n.getDefaultParent())}finally{n.getModel().endUpdate()}n.clearCellOverlays();
+m=[];b.editor.graph.getModel().beginUpdate();try{q=n.getModel().getChildren(n.getDefaultParent()),g=mxEvent.isAltDown(d)?g:b.editor.graph.getCenterInsertPoint(n.getBoundingBoxFromGeometry(q,!0)),m=b.editor.graph.importCells(q,g.x,g.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(m);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());n.destroy();e.parentNode.removeChild(e)}}}function k(){return"list"==
f.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"==f.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==f.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"==f.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"==f.value||"plantUmlTxt"==f.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
-";Example:\na->b\nb->edge label->c\nc->a\n"}var k=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var n=document.createElement("textarea");n.style.resize="none";n.style.width="100%";n.style.height="354px";n.style.marginBottom="16px";var f=document.createElement("select");if("formatSql"==d||"mermaid"==d)f.style.display="none";var l=document.createElement("option");l.setAttribute("value","list");mxUtils.write(l,mxResources.get("list"));"plantUml"!=d&&f.appendChild(l);
+";Example:\na->b\nb->edge label->c\nc->a\n"}var g=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var m=document.createElement("textarea");m.style.resize="none";m.style.width="100%";m.style.height="354px";m.style.marginBottom="16px";var f=document.createElement("select");if("formatSql"==d||"mermaid"==d)f.style.display="none";var l=document.createElement("option");l.setAttribute("value","list");mxUtils.write(l,mxResources.get("list"));"plantUml"!=d&&f.appendChild(l);
null!=d&&"fromText"!=d||l.setAttribute("selected","selected");l=document.createElement("option");l.setAttribute("value","table");mxUtils.write(l,mxResources.get("formatSql"));"formatSql"==d&&(f.appendChild(l),l.setAttribute("selected","selected"));l=document.createElement("option");l.setAttribute("value","mermaid");mxUtils.write(l,mxResources.get("formatSql"));"mermaid"==d&&(f.appendChild(l),l.setAttribute("selected","selected"));l=document.createElement("option");l.setAttribute("value","diagram");
-mxUtils.write(l,mxResources.get("diagram"));"plantUml"!=d&&f.appendChild(l);l=document.createElement("option");l.setAttribute("value","plantUmlSvg");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&l.setAttribute("selected","selected");var m=document.createElement("option");m.setAttribute("value","plantUmlPng");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var p=document.createElement("option");p.setAttribute("value",
-"plantUmlTxt");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==d&&(f.appendChild(l),f.appendChild(m),f.appendChild(p));var q=g();n.value=q;e.appendChild(n);this.init=function(){n.focus()};Graph.fileSupport&&(n.addEventListener("dragover",function(b){b.stopPropagation();b.preventDefault()},!1),n.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=
-b.dataTransfer.files[0];var c=new FileReader;c.onload=function(b){n.value=b.target.result};c.readAsText(b)}},!1));e.appendChild(f);mxEvent.addListener(f,"change",function(){var b=g();if(0==n.value.length||n.value==q)q=b,n.value=q});b.isOffline()||"mermaid"!=d&&"plantUml"!=d||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==d?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),l.className="geBtn",e.appendChild(l));l=mxUtils.button(mxResources.get("close"),
-function(){n.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&e.appendChild(l);m=mxUtils.button(mxResources.get("insert"),function(d){b.hideDialog();c(n.value,f.value,d)});e.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);this.container=e},NewDialog=function(b,e,d,c,g,k,n,f,l,m,p,q,t,u,v,x,A,z){function y(b){null!=b&&(V=na=b?135:140);b=!0;if(null!=pa)for(;M<pa.length&&(b||
-0!=mxUtils.mod(M,30));){var c=pa[M++],c=D(c.url,c.libs,c.title,c.tooltip?c.tooltip:c.title,c.select,c.imgUrl,c.info,c.onClick,c.preview,c.noImg,c.clibs);b&&c.click();b=!1}}function B(){if(W&&null!=u)d||b.hideDialog(),u(W,X,H.value);else if(c)d||b.hideDialog(),c(ea,H.value,fa,ga);else{var f=H.value;null!=f&&0<f.length&&b.pickFolder(b.mode,function(c){b.createFile(f,ea,null!=ga&&0<ga.length?ga:null,null,function(){b.hideDialog()},null,c,null,null!=ca&&0<ca.length?ca:null)},b.mode!=App.MODE_GOOGLE||
-null==b.stateArg||null==b.stateArg.folderId)}}function C(b,c,d,e,m,k,g){null!=la&&(la.style.backgroundColor="transparent",la.style.border="1px solid transparent");S.removeAttribute("disabled");ea=c;ga=d;ca=k;la=b;W=e;fa=g;X=m;la.style.backgroundColor=f;la.style.border=l}function D(c,f,d,e,l,m,k,g,p,q,n){function t(c,f){if(null==v){var d=c,d=/^https?:\/\//.test(d)&&!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=
-b.getStatus()&&299>=b.getStatus()&&(v=b.getText());f(v)}))}else f(v)}function y(f,e,l){if(null!=f&&mxUtils.isAncestorNode(document.body,u)){f=mxUtils.parseXml(f);f=Editor.parseDiagramNode(f.documentElement);var m=new mxCodec(f.ownerDocument),g=new mxGraphModel;m.decode(f,g);f=g.root.getChildAt(0).children;b.sidebar.createTooltip(u,f,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||
-document.body.clientHeight)-80,800),null!=d?mxResources.get(d,null,d):null,!0,new mxPoint(e,l),!0,function(){F=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;C(u,null,null,c,k,n)},!0)}}function K(f,d){null==c||x||b.sidebar.currentElt==u?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),b.sidebar.currentElt=u,x=!0,t(c,function(c){x&&b.sidebar.currentElt==u&&y(c,mxEvent.getClientX(f),mxEvent.getClientY(f));x=!1}))}var u=document.createElement("div");u.className="geTemplate";u.style.position=
-"relative";u.style.height=V+"px";u.style.width=na+"px";var v=null;Editor.isDarkMode()&&(u.style.filter="invert(100%)");null!=d?u.setAttribute("title",mxResources.get(d,null,d)):null!=e&&0<e.length&&u.setAttribute("title",e);var x=!1;if(null!=m){u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";l=document.createElement("img");l.setAttribute("src",m);l.setAttribute("alt",e);l.style.maxWidth=V+"px";l.style.maxHeight=na+"px";var A=m.replace(".drawio.xml","").replace(".drawio",
-"").replace(".xml","");u.appendChild(l);l.onerror=function(){this.src!=A?this.src=A:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,k,n)}),null,null);mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)})}else if(!q&&null!=c&&0<c.length){var T=function(b){S.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";P.spin(N);t(c,function(c){P.stop();null!=
-c&&(C(u,c,f,null,null,n,qa),b&&B())})};e=p||TEMPLATE_PATH+"/"+c.substring(0,c.length-4)+".png";u.style.backgroundImage="url("+e+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";null!=d&&(u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+(Editor.isDarkMode()?"":"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:'+
+mxUtils.write(l,mxResources.get("diagram"));"plantUml"!=d&&f.appendChild(l);l=document.createElement("option");l.setAttribute("value","plantUmlSvg");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&l.setAttribute("selected","selected");var n=document.createElement("option");n.setAttribute("value","plantUmlPng");mxUtils.write(n,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var p=document.createElement("option");p.setAttribute("value",
+"plantUmlTxt");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==d&&(f.appendChild(l),f.appendChild(n),f.appendChild(p));var q=k();m.value=q;e.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(b){b.stopPropagation();b.preventDefault()},!1),m.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=
+b.dataTransfer.files[0];var c=new FileReader;c.onload=function(b){m.value=b.target.result};c.readAsText(b)}},!1));e.appendChild(f);mxEvent.addListener(f,"change",function(){var b=k();if(0==m.value.length||m.value==q)q=b,m.value=q});b.isOffline()||"mermaid"!=d&&"plantUml"!=d||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==d?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),l.className="geBtn",e.appendChild(l));l=mxUtils.button(mxResources.get("close"),
+function(){m.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&e.appendChild(l);n=mxUtils.button(mxResources.get("insert"),function(d){b.hideDialog();c(m.value,f.value,d)});e.appendChild(n);n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);this.container=e},NewDialog=function(b,e,d,c,k,g,m,f,l,n,p,q,t,u,v,x,A,z){function y(b){null!=b&&(V=na=b?135:140);b=!0;if(null!=pa)for(;M<pa.length&&(b||
+0!=mxUtils.mod(M,30));){var c=pa[M++],c=D(c.url,c.libs,c.title,c.tooltip?c.tooltip:c.title,c.select,c.imgUrl,c.info,c.onClick,c.preview,c.noImg,c.clibs);b&&c.click();b=!1}}function B(){if(W&&null!=u)d||b.hideDialog(),u(W,X,F.value);else if(c)d||b.hideDialog(),c(ea,F.value,fa,ga);else{var f=F.value;null!=f&&0<f.length&&b.pickFolder(b.mode,function(c){b.createFile(f,ea,null!=ga&&0<ga.length?ga:null,null,function(){b.hideDialog()},null,c,null,null!=ca&&0<ca.length?ca:null)},b.mode!=App.MODE_GOOGLE||
+null==b.stateArg||null==b.stateArg.folderId)}}function C(b,c,d,e,n,g,k){null!=la&&(la.style.backgroundColor="transparent",la.style.border="1px solid transparent");S.removeAttribute("disabled");ea=c;ga=d;ca=g;la=b;W=e;fa=k;X=n;la.style.backgroundColor=f;la.style.border=l}function D(c,f,d,e,l,n,g,k,p,q,m){function t(c,f){if(null==v){var d=c,d=/^https?:\/\//.test(d)&&!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=
+b.getStatus()&&299>=b.getStatus()&&(v=b.getText());f(v)}))}else f(v)}function y(f,e,l){if(null!=f&&mxUtils.isAncestorNode(document.body,u)){f=mxUtils.parseXml(f);f=Editor.parseDiagramNode(f.documentElement);var n=new mxCodec(f.ownerDocument),k=new mxGraphModel;n.decode(f,k);f=k.root.getChildAt(0).children;b.sidebar.createTooltip(u,f,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||
+document.body.clientHeight)-80,800),null!=d?mxResources.get(d,null,d):null,!0,new mxPoint(e,l),!0,function(){E=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;C(u,null,null,c,g,m)},!0)}}function K(f,d){null==c||x||b.sidebar.currentElt==u?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),b.sidebar.currentElt=u,x=!0,t(c,function(c){x&&b.sidebar.currentElt==u&&y(c,mxEvent.getClientX(f),mxEvent.getClientY(f));x=!1}))}var u=document.createElement("div");u.className="geTemplate";u.style.position=
+"relative";u.style.height=V+"px";u.style.width=na+"px";var v=null;Editor.isDarkMode()&&(u.style.filter="invert(100%)");null!=d?u.setAttribute("title",mxResources.get(d,null,d)):null!=e&&0<e.length&&u.setAttribute("title",e);var x=!1;if(null!=n){u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";l=document.createElement("img");l.setAttribute("src",n);l.setAttribute("alt",e);l.style.maxWidth=V+"px";l.style.maxHeight=na+"px";var A=n.replace(".drawio.xml","").replace(".drawio",
+"").replace(".xml","");u.appendChild(l);l.onerror=function(){this.src!=A?this.src=A:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,g,m)}),null,null);mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)})}else if(!q&&null!=c&&0<c.length){var T=function(b){S.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";P.spin(N);t(c,function(c){P.stop();null!=
+c&&(C(u,c,f,null,null,m,qa),b&&B())})};e=p||TEMPLATE_PATH+"/"+c.substring(0,c.length-4)+".png";u.style.backgroundImage="url("+e+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";null!=d&&(u.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+(Editor.isDarkMode()?"":"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:'+
(V-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>");mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){T()}),null,null);mxEvent.addListener(u,"dblclick",function(b){T(!0);mxEvent.consume(b)})}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:'+
-(V-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>",l&&C(u),mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,k)}),null,null),null!=g?mxEvent.addListener(u,"click",g):(mxEvent.addListener(u,"click",function(b){C(u,null,null,c,k)}),mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)}));if(null!=c){var I=document.createElement("img");I.setAttribute("src",Sidebar.prototype.searchImage);I.setAttribute("title",mxResources.get("preview"));
-I.className="geActiveButton";I.style.position="absolute";I.style.cursor="default";I.style.padding="8px";I.style.right="0px";I.style.top="0px";u.appendChild(I);var F=!1;mxEvent.addGestureListeners(I,mxUtils.bind(this,function(c){F=b.sidebar.currentElt==u}),null,null);mxEvent.addListener(I,"click",mxUtils.bind(this,function(b){F||K(b,I);mxEvent.consume(b)}))}N.appendChild(u);return u}function E(){function b(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));18<
-f.length&&(f=f.substring(0,18)+"&hellip;");return f+" ("+c.length+")"}function c(b,c,f){mxEvent.addListener(c,"click",function(){ja!=c&&(ja.style.backgroundColor="",ja=c,ja.style.backgroundColor=n,N.scrollTop=0,N.innerHTML="",M=0,pa=f?ha[b][f]:Z[b],I=null,y(!1))})}ua&&(ua=!1,mxEvent.addListener(N,"scroll",function(b){N.scrollTop+N.clientHeight>=N.scrollHeight&&(y(),mxEvent.consume(b))}));if(0<da){var f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
-mxUtils.write(f,mxResources.get("custom"));ka.appendChild(f);for(var d in U){var e=document.createElement("div"),l=d,f=U[d];18<l.length&&(l=l.substring(0,18)+"&hellip;");e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";e.setAttribute("title",l+" ("+f.length+")");mxUtils.write(e,e.getAttribute("title"));null!=m&&(e.style.padding=m);ka.appendChild(e);(function(b,c){mxEvent.addListener(e,"click",
-function(){ja!=c&&(ja.style.backgroundColor="",ja=c,ja.style.backgroundColor=n,N.scrollTop=0,N.innerHTML="",M=0,pa=U[b],I=null,y(!1))})})(d,e)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(f,"draw.io");ka.appendChild(f)}for(d in Z){var l=ha[d],k=e=document.createElement(l?"ul":"div"),f=Z[d],g=b(d,f);if(null!=l){var p=document.createElement("li"),q=document.createElement("div");q.className="geTempTreeCaret";
-q.setAttribute("title",g);mxUtils.write(q,g);k=q;p.appendChild(q);g=document.createElement("ul");g.className="geTempTreeNested";g.style.visibility="hidden";for(var t in l){var u=document.createElement("li"),K=b(t,l[t]);u.setAttribute("title",K);mxUtils.write(u,K);c(d,u,t);g.appendChild(u)}p.appendChild(g);e.className="geTempTree";e.appendChild(p);(function(b,c){mxEvent.addListener(c,"click",function(){b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&
-setTimeout(function(){b.style.visibility="hidden"},550);c.classList.toggle("geTempTreeCaret-down")})})(g,q)}else e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",e.setAttribute("title",g),mxUtils.write(e,g);null!=m&&(e.style.padding=m);ka.appendChild(e);null==ja&&0<f.length&&(ja=e,ja.style.backgroundColor=n,pa=f);c(d,k)}y(!1)}var G=500>(window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth);d=null!=d?d:!0;g=null!=g?g:!1;n=null!=n?n:"#ebf2f9";f=null!=f?f:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";l=null!=l?l:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";p=null!=p?p:EditorUi.templateFile;var F=document.createElement("div");F.style.userSelect="none";F.style.height="100%";var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.height="46px";d&&F.appendChild(J);var L=document.createElement("img");L.setAttribute("border","0");L.setAttribute("align",
+(V-34)+'px;">'+mxUtils.htmlEntities(mxResources.get(d,null,d))+"</span></td></tr></table>",l&&C(u),mxEvent.addGestureListeners(u,mxUtils.bind(this,function(b){C(u,null,null,c,g)}),null,null),null!=k?mxEvent.addListener(u,"click",k):(mxEvent.addListener(u,"click",function(b){C(u,null,null,c,g)}),mxEvent.addListener(u,"dblclick",function(b){B();mxEvent.consume(b)}));if(null!=c){var I=document.createElement("img");I.setAttribute("src",Sidebar.prototype.searchImage);I.setAttribute("title",mxResources.get("preview"));
+I.className="geActiveButton";I.style.position="absolute";I.style.cursor="default";I.style.padding="8px";I.style.right="0px";I.style.top="0px";u.appendChild(I);var E=!1;mxEvent.addGestureListeners(I,mxUtils.bind(this,function(c){E=b.sidebar.currentElt==u}),null,null);mxEvent.addListener(I,"click",mxUtils.bind(this,function(b){E||K(b,I);mxEvent.consume(b)}))}N.appendChild(u);return u}function G(){function b(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));18<
+f.length&&(f=f.substring(0,18)+"&hellip;");return f+" ("+c.length+")"}function c(b,c,f){mxEvent.addListener(c,"click",function(){ja!=c&&(ja.style.backgroundColor="",ja=c,ja.style.backgroundColor=m,N.scrollTop=0,N.innerHTML="",M=0,pa=f?ha[b][f]:Z[b],I=null,y(!1))})}ua&&(ua=!1,mxEvent.addListener(N,"scroll",function(b){N.scrollTop+N.clientHeight>=N.scrollHeight&&(y(),mxEvent.consume(b))}));if(0<da){var f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";
+mxUtils.write(f,mxResources.get("custom"));ka.appendChild(f);for(var d in U){var e=document.createElement("div"),l=d,f=U[d];18<l.length&&(l=l.substring(0,18)+"&hellip;");e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";e.setAttribute("title",l+" ("+f.length+")");mxUtils.write(e,e.getAttribute("title"));null!=n&&(e.style.padding=n);ka.appendChild(e);(function(b,c){mxEvent.addListener(e,"click",
+function(){ja!=c&&(ja.style.backgroundColor="",ja=c,ja.style.backgroundColor=m,N.scrollTop=0,N.innerHTML="",M=0,pa=U[b],I=null,y(!1))})})(d,e)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(f,"draw.io");ka.appendChild(f)}for(d in Z){var l=ha[d],g=e=document.createElement(l?"ul":"div"),f=Z[d],k=b(d,f);if(null!=l){var p=document.createElement("li"),q=document.createElement("div");q.className="geTempTreeCaret";
+q.setAttribute("title",k);mxUtils.write(q,k);g=q;p.appendChild(q);k=document.createElement("ul");k.className="geTempTreeNested";k.style.visibility="hidden";for(var t in l){var u=document.createElement("li"),K=b(t,l[t]);u.setAttribute("title",K);mxUtils.write(u,K);c(d,u,t);k.appendChild(u)}p.appendChild(k);e.className="geTempTree";e.appendChild(p);(function(b,c){mxEvent.addListener(c,"click",function(){b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&
+setTimeout(function(){b.style.visibility="hidden"},550);c.classList.toggle("geTempTreeCaret-down")})})(k,q)}else e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",e.setAttribute("title",k),mxUtils.write(e,k);null!=n&&(e.style.padding=n);ka.appendChild(e);null==ja&&0<f.length&&(ja=e,ja.style.backgroundColor=m,pa=f);c(d,g)}y(!1)}var H=500>(window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth);d=null!=d?d:!0;k=null!=k?k:!1;m=null!=m?m:"#ebf2f9";f=null!=f?f:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";l=null!=l?l:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";p=null!=p?p:EditorUi.templateFile;var E=document.createElement("div");E.style.userSelect="none";E.style.height="100%";var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.height="46px";d&&E.appendChild(J);var L=document.createElement("img");L.setAttribute("border","0");L.setAttribute("align",
"absmiddle");L.style.width="40px";L.style.height="40px";L.style.marginRight="10px";L.style.paddingBottom="4px";L.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_NOTION?IMAGE_PATH+"/notion-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":
-b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||G||!d||J.appendChild(L);d&&mxUtils.write(J,(G?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");L=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?L=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?L=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?L=b.oneDrive.extension:b.mode==
-App.MODE_GITHUB&&null!=b.gitHub?L=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?L=b.gitLab.extension:b.mode==App.MODE_NOTION&&null!=b.notion?L=b.notion.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(L=b.trello.extension);var H=document.createElement("input");H.setAttribute("value",b.defaultFilename+L);H.style.marginLeft="10px";H.style.width=e||G?"144px":"244px";this.init=function(){d&&(H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",
-!1,null));null!=N.parentNode&&null!=N.parentNode.parentNode&&mxEvent.addGestureListeners(N.parentNode.parentNode,mxUtils.bind(this,function(c){b.sidebar.hideTooltip()}),null,null)};d&&(J.appendChild(H),z?H.style.width=e||G?"350px":"450px":(null!=b.editor.diagramFileTypes&&(z=FilenameDialog.createFileTypes(b,H,b.editor.diagramFileTypes),z.style.marginLeft="6px",z.style.width=e||G?"80px":"180px",J.appendChild(z)),null!=b.editor.fileExtensions&&(G=FilenameDialog.createTypeHint(b,H,b.editor.fileExtensions),
-G.style.marginTop="12px",J.appendChild(G))));var J=!1,M=0,P=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}),S=mxUtils.button(x||mxResources.get("create"),function(){S.setAttribute("disabled","disabled");B();S.removeAttribute("disabled")});S.className="geBtn gePrimaryBtn";if(q||t){var K=[],I=null,T=null,R=null,O=function(b){S.setAttribute("disabled","disabled");for(var c=0;c<K.length;c++)K[c].className=c==b?"geBtn gePrimaryBtn":
-"geBtn"},J=!0;x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";F.appendChild(x);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ka.style.display="";ma.style.display="";N.style.left="160px";O(0);N.scrollTop=0;N.innerHTML="";M=0;I!=pa&&(pa=I,Z=T,da=R,ka.innerHTML="",E(),I=null)});K.push(G);x.appendChild(G);var Y=function(b){ka.style.display="none";ma.style.display="none";N.style.left="30px";O(b?-1:1);null==I&&(I=pa);N.scrollTop=0;N.innerHTML=
-"";P.spin(N);var c=function(b,c,f){M=0;P.stop();pa=b;f=f||{};var d=0,e;for(e in f)d+=f[e].length;if(c)N.innerHTML=c;else if(0==b.length&&0==d)N.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(N.innerHTML="",0<d){ka.style.display="";N.style.left="160px";ka.innerHTML="";da=0;Z={"draw.io":b};for(e in f)Z[e]=f[e];E()}else y(!0)};b?t(aa.value,c):q(c)};q&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Y()}),x.appendChild(G),K.push(G));
-if(t){G=document.createElement("span");G.style.marginLeft="10px";G.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");x.appendChild(G);var aa=document.createElement("input");aa.style.marginRight="10px";aa.style.marginLeft="10px";aa.style.width="220px";mxEvent.addListener(aa,"keypress",function(b){13==b.keyCode&&Y(!0)});x.appendChild(aa);G=mxUtils.button(mxResources.get("search"),function(){Y(!0)});G.className="geBtn";x.appendChild(G)}O(0)}var ga=null,ca=null,ea=null,la=null,W=null,fa=null,
+b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||H||!d||J.appendChild(L);d&&mxUtils.write(J,(H?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");L=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?L=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?L=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?L=b.oneDrive.extension:b.mode==
+App.MODE_GITHUB&&null!=b.gitHub?L=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?L=b.gitLab.extension:b.mode==App.MODE_NOTION&&null!=b.notion?L=b.notion.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(L=b.trello.extension);var F=document.createElement("input");F.setAttribute("value",b.defaultFilename+L);F.style.marginLeft="10px";F.style.width=e||H?"144px":"244px";this.init=function(){d&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",
+!1,null));null!=N.parentNode&&null!=N.parentNode.parentNode&&mxEvent.addGestureListeners(N.parentNode.parentNode,mxUtils.bind(this,function(c){b.sidebar.hideTooltip()}),null,null)};d&&(J.appendChild(F),z?F.style.width=e||H?"350px":"450px":(null!=b.editor.diagramFileTypes&&(z=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),z.style.marginLeft="6px",z.style.width=e||H?"80px":"180px",J.appendChild(z)),null!=b.editor.fileExtensions&&(H=FilenameDialog.createTypeHint(b,F,b.editor.fileExtensions),
+H.style.marginTop="12px",J.appendChild(H))));var J=!1,M=0,P=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}),S=mxUtils.button(x||mxResources.get("create"),function(){S.setAttribute("disabled","disabled");B();S.removeAttribute("disabled")});S.className="geBtn gePrimaryBtn";if(q||t){var K=[],I=null,T=null,R=null,O=function(b){S.setAttribute("disabled","disabled");for(var c=0;c<K.length;c++)K[c].className=c==b?"geBtn gePrimaryBtn":
+"geBtn"},J=!0;x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";E.appendChild(x);H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ka.style.display="";ma.style.display="";N.style.left="160px";O(0);N.scrollTop=0;N.innerHTML="";M=0;I!=pa&&(pa=I,Z=T,da=R,ka.innerHTML="",G(),I=null)});K.push(H);x.appendChild(H);var Y=function(b){ka.style.display="none";ma.style.display="none";N.style.left="30px";O(b?-1:1);null==I&&(I=pa);N.scrollTop=0;N.innerHTML=
+"";P.spin(N);var c=function(b,c,f){M=0;P.stop();pa=b;f=f||{};var d=0,e;for(e in f)d+=f[e].length;if(c)N.innerHTML=c;else if(0==b.length&&0==d)N.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(N.innerHTML="",0<d){ka.style.display="";N.style.left="160px";ka.innerHTML="";da=0;Z={"draw.io":b};for(e in f)Z[e]=f[e];G()}else y(!0)};b?t(aa.value,c):q(c)};q&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Y()}),x.appendChild(H),K.push(H));
+if(t){H=document.createElement("span");H.style.marginLeft="10px";H.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");x.appendChild(H);var aa=document.createElement("input");aa.style.marginRight="10px";aa.style.marginLeft="10px";aa.style.width="220px";mxEvent.addListener(aa,"keypress",function(b){13==b.keyCode&&Y(!0)});x.appendChild(aa);H=mxUtils.button(mxResources.get("search"),function(){Y(!0)});H.className="geBtn";x.appendChild(H)}O(0)}var ga=null,ca=null,ea=null,la=null,W=null,fa=null,
X=null,N=document.createElement("div");N.style.border="1px solid #d3d3d3";N.style.position="absolute";N.style.left="160px";N.style.right="34px";x=(d?72:40)+(J?30:0);N.style.top=x+"px";N.style.bottom="68px";N.style.margin="6px 0 0 -1px";N.style.padding="6px";N.style.overflow="auto";var ma=document.createElement("div");ma.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;height:22px;margin-top: 6px;white-space: nowrap";var Q=document.createElement("input");Q.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";
Q.setAttribute("placeholder",mxResources.get("search"));Q.setAttribute("type","text");ma.appendChild(Q);var ba=document.createElement("img"),oa="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ba.setAttribute("src",oa);ba.setAttribute("title",mxResources.get("search"));ba.style.position="relative";ba.style.left="-18px";ba.style.top="1px";ba.style.background="url('"+b.editor.transparentImage+"')";ma.appendChild(ba);mxEvent.addListener(ba,"click",function(){ba.getAttribute("src")==
-Dialog.prototype.closeImage&&(ba.setAttribute("src",oa),ba.setAttribute("title",mxResources.get("search")),Q.value="",null!=ia&&(ia.click(),ia=null));Q.focus()});mxEvent.addListener(Q,"keydown",mxUtils.bind(this,function(b){if(13==b.keyCode){var c=Q.value;if(""==c)null!=ia&&(ia.click(),ia=null);else{if(null==NewDialog.tagsList[p]){var f={},d;for(d in Z)for(var e=Z[d],l=0;l<e.length;l++){var m=e[l];if(null!=m.tags)for(var g=m.tags.toLowerCase().split(";"),k=0;k<g.length;k++)null==f[g[k]]&&(f[g[k]]=
-[]),f[g[k]].push(m)}NewDialog.tagsList[p]=f}var q=c.toLowerCase().split(" "),f=NewDialog.tagsList[p];if(0<da&&null==f.__tagsList__){for(d in U)for(e=U[d],l=0;l<e.length;l++)for(m=e[l],g=m.title.split(" "),g.push(d),k=0;k<g.length;k++){var t=g[k].toLowerCase();null==f[t]&&(f[t]=[]);f[t].push(m)}f.__tagsList__=!0}d=[];e={};for(l=g=0;l<q.length;l++)if(0<q[l].length){var t=f[q[l]],n={};d=[];if(null!=t)for(k=0;k<t.length;k++)m=t[k],0==g==(null==e[m.url])&&(n[m.url]=!0,d.push(m));e=n;g++}N.scrollTop=0;
+Dialog.prototype.closeImage&&(ba.setAttribute("src",oa),ba.setAttribute("title",mxResources.get("search")),Q.value="",null!=ia&&(ia.click(),ia=null));Q.focus()});mxEvent.addListener(Q,"keydown",mxUtils.bind(this,function(b){if(13==b.keyCode){var c=Q.value;if(""==c)null!=ia&&(ia.click(),ia=null);else{if(null==NewDialog.tagsList[p]){var f={},d;for(d in Z)for(var e=Z[d],l=0;l<e.length;l++){var n=e[l];if(null!=n.tags)for(var k=n.tags.toLowerCase().split(";"),g=0;g<k.length;g++)null==f[k[g]]&&(f[k[g]]=
+[]),f[k[g]].push(n)}NewDialog.tagsList[p]=f}var q=c.toLowerCase().split(" "),f=NewDialog.tagsList[p];if(0<da&&null==f.__tagsList__){for(d in U)for(e=U[d],l=0;l<e.length;l++)for(n=e[l],k=n.title.split(" "),k.push(d),g=0;g<k.length;g++){var t=k[g].toLowerCase();null==f[t]&&(f[t]=[]);f[t].push(n)}f.__tagsList__=!0}d=[];e={};for(l=k=0;l<q.length;l++)if(0<q[l].length){var t=f[q[l]],m={};d=[];if(null!=t)for(g=0;g<t.length;g++)n=t[g],0==k==(null==e[n.url])&&(m[n.url]=!0,d.push(n));e=m;k++}N.scrollTop=0;
N.innerHTML="";M=0;f=document.createElement("div");f.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(f,mxResources.get(0==d.length?"noResultsFor":"resultsFor",[c]));N.appendChild(f);null!=ja&&null==ia&&(ja.style.backgroundColor="",ia=ja,ja=f);pa=d;I=null;y(!1)}mxEvent.consume(b)}}));mxEvent.addListener(Q,"keyup",mxUtils.bind(this,function(b){""==Q.value?(ba.setAttribute("src",oa),ba.setAttribute("title",mxResources.get("search"))):(ba.setAttribute("src",
Dialog.prototype.closeImage),ba.setAttribute("title",mxResources.get("reset")))}));x+=23;var ka=document.createElement("div");ka.style.cssText="position:absolute;left:30px;width:128px;top:"+x+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(N,"scroll",function(){b.sidebar.hideTooltip()});var V=140,na=140,Z={},ha={},U={},da=0,ua=!0,ja=null,ia=null;Z.basic=[{title:"blankDiagram",select:!0}];var pa=Z.basic;if(!e){var wa=function(){mxUtils.get(qa,function(b){if(!ra){ra=
-!0;b=b.getXml().documentElement.firstChild;for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var m=e.indexOf("/",l+1);-1<
-m&&(f=e.substring(l+1,m))}l=Z[d];null==l&&(l=[],Z[d]=l);e=b.getAttribute("clibs");null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title"),tooltip:b.getAttribute("name")||b.getAttribute("url"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=ha[d],null==l&&(l={},ha[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}P.stop();E()}})};F.appendChild(ma);F.appendChild(ka);F.appendChild(N);var ra=
-!1,qa=p;/^https?:\/\//.test(qa)&&!b.editor.isCorsEnabledForUrl(qa)&&(qa=PROXY_URL+"?url="+encodeURIComponent(qa));P.spin(N);null!=A?A(function(b,c){U=b;R=da=c;wa()},wa):wa();T=Z}mxEvent.addListener(H,"keypress",function(c){b.dialog.container.firstChild==F&&13==c.keyCode&&B()});A=document.createElement("div");A.style.marginTop=e?"4px":"16px";A.style.textAlign="right";A.style.position="absolute";A.style.left="40px";A.style.bottom="24px";A.style.right="40px";e||b.isOffline()||!d||null!=c||g||(x=mxUtils.button(mxResources.get("help"),
-function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),x.className="geBtn",A.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();b.hideDialog(!0)});x.className="geBtn";!b.editor.cancelFirst||g&&null==k||A.appendChild(x);e||"1"==urlParams.embed||g||mxClient.IS_ANDROID||mxClient.IS_IOS||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(b,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&
-(c=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+encodeURIComponent(H.value)+"&create="+encodeURIComponent(c)),null==b.getCurrentFile()?window.location.href=c:window.openWindow(c))},mxResources.get("url"));b.showDialog(c.container,300,80,!0,!0);c.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var c=document.createElement("input");c.setAttribute("multiple","multiple");c.setAttribute("type",
-"file");mxEvent.addListener(c,"change",function(f){b.openFiles(c.files,!0);c.value=""});c.style.display="none";document.body.appendChild(c);b.newDlgFileInputElt=c}b.newDlgFileInputElt.click()}),v.className="geBtn",A.appendChild(v));A.appendChild(S);b.editor.cancelFirst||null!=c||g&&null==k||A.appendChild(x);F.appendChild(A);this.container=F};NewDialog.tagsList={};
-var CreateDialog=function(b,e,d,c,g,k,n,f,l,m,p,q,t,u,v,x,A){function z(c,f,d,l){function m(){mxEvent.addListener(g,"click",function(){var c=d;if(n){var f=C.value,l=f.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>l){var c=null!=c?c:F.value,m="";c==App.MODE_GOOGLE?m=b.drive.extension:c==App.MODE_GITHUB?m=b.gitHub.extension:c==App.MODE_GITLAB?m=b.gitLab.extension:c==App.MODE_NOTION?m=b.notion.extension:c==App.MODE_TRELLO?m=b.trello.extension:c==App.MODE_DROPBOX?m=b.dropbox.extension:c==App.MODE_ONEDRIVE?
-m=b.oneDrive.extension:c==App.MODE_DEVICE&&(m=".drawio");0<=l&&(f=f.substring(0,l));C.value=f+m}}y(d)})}var g=document.createElement("a");g.style.overflow="hidden";var k=document.createElement("img");k.src=c;k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.width="60px";k.style.height="60px";k.style.paddingBottom="6px";g.style.display="inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 8px 10px 8px";g.style.whiteSpace=
+!0;b=b.getXml().documentElement.firstChild;for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var n=e.indexOf("/",l+1);-1<
+n&&(f=e.substring(l+1,n))}l=Z[d];null==l&&(l=[],Z[d]=l);e=b.getAttribute("clibs");null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title"),tooltip:b.getAttribute("name")||b.getAttribute("url"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=ha[d],null==l&&(l={},ha[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}P.stop();G()}})};E.appendChild(ma);E.appendChild(ka);E.appendChild(N);var ra=
+!1,qa=p;/^https?:\/\//.test(qa)&&!b.editor.isCorsEnabledForUrl(qa)&&(qa=PROXY_URL+"?url="+encodeURIComponent(qa));P.spin(N);null!=A?A(function(b,c){U=b;R=da=c;wa()},wa):wa();T=Z}mxEvent.addListener(F,"keypress",function(c){b.dialog.container.firstChild==E&&13==c.keyCode&&B()});A=document.createElement("div");A.style.marginTop=e?"4px":"16px";A.style.textAlign="right";A.style.position="absolute";A.style.left="40px";A.style.bottom="24px";A.style.right="40px";e||b.isOffline()||!d||null!=c||k||(x=mxUtils.button(mxResources.get("help"),
+function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),x.className="geBtn",A.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();b.hideDialog(!0)});x.className="geBtn";!b.editor.cancelFirst||k&&null==g||A.appendChild(x);e||"1"==urlParams.embed||k||mxClient.IS_ANDROID||mxClient.IS_IOS||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(b,"",mxResources.get("create"),function(c){null!=c&&0<c.length&&
+(c=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+encodeURIComponent(F.value)+"&create="+encodeURIComponent(c)),null==b.getCurrentFile()?window.location.href=c:window.openWindow(c))},mxResources.get("url"));b.showDialog(c.container,300,80,!0,!0);c.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&v&&(v=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var c=document.createElement("input");c.setAttribute("multiple","multiple");c.setAttribute("type",
+"file");mxEvent.addListener(c,"change",function(f){b.openFiles(c.files,!0);c.value=""});c.style.display="none";document.body.appendChild(c);b.newDlgFileInputElt=c}b.newDlgFileInputElt.click()}),v.className="geBtn",A.appendChild(v));A.appendChild(S);b.editor.cancelFirst||null!=c||k&&null==g||A.appendChild(x);E.appendChild(A);this.container=E};NewDialog.tagsList={};
+var CreateDialog=function(b,e,d,c,k,g,m,f,l,n,p,q,t,u,v,x,A){function z(c,f,d,l){function n(){mxEvent.addListener(g,"click",function(){var c=d;if(m){var f=C.value,l=f.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>l){var c=null!=c?c:E.value,n="";c==App.MODE_GOOGLE?n=b.drive.extension:c==App.MODE_GITHUB?n=b.gitHub.extension:c==App.MODE_GITLAB?n=b.gitLab.extension:c==App.MODE_NOTION?n=b.notion.extension:c==App.MODE_TRELLO?n=b.trello.extension:c==App.MODE_DROPBOX?n=b.dropbox.extension:c==App.MODE_ONEDRIVE?
+n=b.oneDrive.extension:c==App.MODE_DEVICE&&(n=".drawio");0<=l&&(f=f.substring(0,l));C.value=f+n}}y(d)})}var g=document.createElement("a");g.style.overflow="hidden";var k=document.createElement("img");k.src=c;k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.width="60px";k.style.height="60px";k.style.paddingBottom="6px";g.style.display="inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding="8px 8px 10px 8px";g.style.whiteSpace=
"nowrap";g.appendChild(k);g.style.color="gray";g.style.fontSize="11px";var p=document.createElement("div");g.appendChild(p);mxUtils.write(p,f);if(null!=l&&null==b[l]){k.style.visibility="hidden";mxUtils.setOpacity(p,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(g);var u=window.setTimeout(function(){null==b[l]&&(t.stop(),g.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,
-function(){null!=b[l]&&(window.clearTimeout(u),mxUtils.setOpacity(p,100),k.style.visibility="",t.stop(),m())}))}else m();E.appendChild(g);++G==q&&(mxUtils.br(E),G=0)}function y(c){var f=C.value;if(null==c||null!=f&&0<f.length)A&&b.hideDialog(),d(f,c,C)}p="1"==urlParams.noDevice?!1:p;n=null!=n?n:!0;f=null!=f?f:!0;q=null!=q?q:4;A=null!=A?A:!0;k=document.createElement("div");k.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(k);var B=document.createElement("h2");mxUtils.write(B,g||mxResources.get("create"));
-B.style.marginTop="0px";B.style.marginBottom="24px";k.appendChild(B);mxUtils.write(k,mxResources.get("filename")+":");var C=document.createElement("input");C.setAttribute("value",e);C.style.width="200px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};k.appendChild(C);null!=x&&(null!=b.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(b,
-C,b.editor.diagramFileTypes),g.style.marginLeft="6px",g.style.width="80px",k.appendChild(g)),k.appendChild(FilenameDialog.createTypeHint(b,C,x)));x=null;if(null!=t&&null!=u&&"image/"==u.substring(0,6)&&("image/svg"!=u.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";g=document.createElement("img");var D=v?t:btoa(unescape(encodeURIComponent(t)));g.setAttribute("src","data:"+u+";base64,"+D);g.style.position="absolute";g.style.top="70px";g.style.right="100px";g.style.maxWidth="120px";g.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)");k.appendChild(g);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=u||(x=mxUtils.button(mxResources.get("copy"),function(c){c=b.base64ToBlob(D,"image/png");c=new ClipboardItem({"image/png":c,"text/html":new Blob(['<img src="data:'+u+";base64,"+D+'">'],{type:"text/html"})});navigator.clipboard.write([c]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(c){b.handleError(c)}))}),
-x.style.marginTop="6px",x.className="geBtn");l&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addGestureListeners(g,null,null,function(b){mxEvent.isPopupTrigger(b)||y("_blank")}))}mxUtils.br(k);var E=document.createElement("div");E.style.textAlign="center";var G=0;E.style.marginTop="6px";k.appendChild(E);var F=document.createElement("select");F.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(t=document.createElement("option"),t.setAttribute("value",
-App.MODE_GOOGLE),mxUtils.write(t,mxResources.get("googleDrive")),F.appendChild(t),z(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")),F.appendChild(t),b.mode==App.MODE_ONEDRIVE&&t.setAttribute("selected","selected"),z(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")),F.appendChild(t),b.mode==App.MODE_DROPBOX&&t.setAttribute("selected","selected"),z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITHUB),mxUtils.write(t,mxResources.get("github")),F.appendChild(t),z(IMAGE_PATH+
-"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITLAB),mxUtils.write(t,mxResources.get("gitlab")),F.appendChild(t),z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),null!=b.notion&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_NOTION),mxUtils.write(t,mxResources.get("notion")),F.appendChild(t),z(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),
-App.MODE_NOTION,"notion")),"function"===typeof window.TrelloClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_TRELLO),mxUtils.write(t,mxResources.get("trello")),F.appendChild(t),z(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)t=document.createElement("option"),t.setAttribute("value",App.MODE_DEVICE),mxUtils.write(t,mxResources.get("device")),
-F.appendChild(t),b.mode!=App.MODE_DEVICE&&f||t.setAttribute("selected","selected"),p&&z(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);f&&isLocalStorage&&"0"!=urlParams.browser&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_BROWSER),mxUtils.write(f,mxResources.get("browser")),F.appendChild(f),b.mode==App.MODE_BROWSER&&f.setAttribute("selected","selected"),z(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));f=document.createElement("div");
-f.style.marginTop="26px";f.style.textAlign="center";null!=m&&(p=mxUtils.button(mxResources.get("help"),function(){b.openLink(m)}),p.className="geBtn",f.appendChild(p));p=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});p.className="geBtn";b.editor.cancelFirst&&null==c&&f.appendChild(p);null==c&&(t=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),t.className="geBtn",
+function(){null!=b[l]&&(window.clearTimeout(u),mxUtils.setOpacity(p,100),k.style.visibility="",t.stop(),n())}))}else n();G.appendChild(g);++H==q&&(mxUtils.br(G),H=0)}function y(c){var f=C.value;if(null==c||null!=f&&0<f.length)A&&b.hideDialog(),d(f,c,C)}p="1"==urlParams.noDevice?!1:p;m=null!=m?m:!0;f=null!=f?f:!0;q=null!=q?q:4;A=null!=A?A:!0;g=document.createElement("div");g.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(g);var B=document.createElement("h2");mxUtils.write(B,k||mxResources.get("create"));
+B.style.marginTop="0px";B.style.marginBottom="24px";g.appendChild(B);mxUtils.write(g,mxResources.get("filename")+":");var C=document.createElement("input");C.setAttribute("value",e);C.style.width="200px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){C.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null)};g.appendChild(C);null!=x&&(null!=b.editor.diagramFileTypes&&(k=FilenameDialog.createFileTypes(b,
+C,b.editor.diagramFileTypes),k.style.marginLeft="6px",k.style.width="80px",g.appendChild(k)),g.appendChild(FilenameDialog.createTypeHint(b,C,x)));x=null;if(null!=t&&null!=u&&"image/"==u.substring(0,6)&&("image/svg"!=u.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";k=document.createElement("img");var D=v?t:btoa(unescape(encodeURIComponent(t)));k.setAttribute("src","data:"+u+";base64,"+D);k.style.position="absolute";k.style.top="70px";k.style.right="100px";k.style.maxWidth="120px";k.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(k.style,"transform","translate(50%,-50%)");g.appendChild(k);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=u||(x=mxUtils.button(mxResources.get("copy"),function(c){c=b.base64ToBlob(D,"image/png");c=new ClipboardItem({"image/png":c,"text/html":new Blob(['<img src="data:'+u+";base64,"+D+'">'],{type:"text/html"})});navigator.clipboard.write([c]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(c){b.handleError(c)}))}),
+x.style.marginTop="6px",x.className="geBtn");l&&Editor.popupsAllowed&&(k.style.cursor="pointer",mxEvent.addGestureListeners(k,null,null,function(b){mxEvent.isPopupTrigger(b)||y("_blank")}))}mxUtils.br(g);var G=document.createElement("div");G.style.textAlign="center";var H=0;G.style.marginTop="6px";g.appendChild(G);var E=document.createElement("select");E.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(t=document.createElement("option"),t.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(t,mxResources.get("googleDrive")),E.appendChild(t),z(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),b.mode==App.MODE_ONEDRIVE&&t.setAttribute("selected","selected"),z(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),b.mode==App.MODE_DROPBOX&&t.setAttribute("selected","selected"),z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITHUB),mxUtils.write(t,mxResources.get("github")),E.appendChild(t),z(IMAGE_PATH+
+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_GITLAB),mxUtils.write(t,mxResources.get("gitlab")),E.appendChild(t),z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),null!=b.notion&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_NOTION),mxUtils.write(t,mxResources.get("notion")),E.appendChild(t),z(IMAGE_PATH+"/notion-logo.svg",mxResources.get("notion"),
+App.MODE_NOTION,"notion")),"function"===typeof window.TrelloClient&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_TRELLO),mxUtils.write(t,mxResources.get("trello")),E.appendChild(t),z(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)t=document.createElement("option"),t.setAttribute("value",App.MODE_DEVICE),mxUtils.write(t,mxResources.get("device")),
+E.appendChild(t),b.mode!=App.MODE_DEVICE&&f||t.setAttribute("selected","selected"),p&&z(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);f&&isLocalStorage&&"0"!=urlParams.browser&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_BROWSER),mxUtils.write(f,mxResources.get("browser")),E.appendChild(f),b.mode==App.MODE_BROWSER&&f.setAttribute("selected","selected"),z(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));f=document.createElement("div");
+f.style.marginTop="26px";f.style.textAlign="center";null!=n&&(p=mxUtils.button(mxResources.get("help"),function(){b.openLink(n)}),p.className="geBtn",f.appendChild(p));p=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});p.className="geBtn";b.editor.cancelFirst&&null==c&&f.appendChild(p);null==c&&(t=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),t.className="geBtn",
f.appendChild(t));l&&Editor.popupsAllowed&&(l=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),l.className="geBtn",f.appendChild(l));CreateDialog.showDownloadButton&&(l=mxUtils.button(mxResources.get("download"),function(){y("download")}),l.className="geBtn",f.appendChild(l),null!=x&&(l.style.marginTop="6px",f.style.marginTop="6px"));null!=x&&(mxUtils.br(f),f.appendChild(x));b.editor.cancelFirst&&null==c||f.appendChild(p);mxEvent.addListener(C,"keypress",function(c){13==
-c.keyCode?y(App.MODE_DEVICE):27==c.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});k.appendChild(f);this.container=k};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
-var PopupDialog=function(b,e,d,c,g){g=null!=g?g:!0;var k=document.createElement("div");k.style.textAlign="left";k.style.height="100%";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var n=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&b.hideDialog();null!=c&&c()});n.className="geBtn";n.style.marginBottom="8px";n.style.width="280px";k.appendChild(n);mxUtils.br(k);var f=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&b.hideDialog();
-null!=d&&d();b.openLink(e,null,!0)});f.className="geBtn gePrimaryBtn";f.style.width=n.style.width;k.appendChild(f);mxUtils.br(k);mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(b,e,d,c,g,k){k=null!=k?k:!0;var n=b.editor.graph,f=document.createElement("div");mxUtils.write(f,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow=
+c.keyCode?y(App.MODE_DEVICE):27==c.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});g.appendChild(f);this.container=g};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+var PopupDialog=function(b,e,d,c,k){k=null!=k?k:!0;var g=document.createElement("div");g.style.textAlign="left";g.style.height="100%";mxUtils.write(g,mxResources.get("fileOpenLocation"));mxUtils.br(g);mxUtils.br(g);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){k&&b.hideDialog();null!=c&&c()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";g.appendChild(m);mxUtils.br(g);var f=mxUtils.button(mxResources.get("openInNewWindow"),function(){k&&b.hideDialog();
+null!=d&&d();b.openLink(e,null,!0)});f.className="geBtn gePrimaryBtn";f.style.width=m.style.width;g.appendChild(f);mxUtils.br(g);mxUtils.br(g);mxUtils.write(g,mxResources.get("allowPopups"));this.container=g},ImageDialog=function(b,e,d,c,k,g){g=null!=g?g:!0;var m=b.editor.graph,f=document.createElement("div");mxUtils.write(f,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow=
"clip";e.style.cursor="default";e.style.paddingRight="20px";var l=document.createElement("input");l.setAttribute("value",d);l.setAttribute("type","text");l.setAttribute("spellcheck","false");l.setAttribute("autocorrect","off");l.setAttribute("autocomplete","off");l.setAttribute("autocapitalize","off");l.style.marginTop="6px";l.style.width=(Graph.fileSupport?460:340)-20+"px";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition=
-"100% 50%";l.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display="inline-block";d.style.top="3px";d.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){l.value="";l.focus()});e.appendChild(l);e.appendChild(d);f.appendChild(e);var m=function(f,d,e,l){var m="data:"==f.substring(0,
-5);!b.isOffline()||m&&"undefined"===typeof chrome?0<f.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(f,function(m){b.spinner.stop();b.hideDialog();var g=!1===l?1:null!=d&&null!=e?Math.max(d/m.width,e/m.height):Math.min(1,Math.min(520/m.width,520/m.height));k&&(f=b.convertDataUri(f));c(f,Math.round(Number(m.width)*g),Math.round(Number(m.height)*g))},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):
-(b.hideDialog(),c(f)):(f=b.convertDataUri(f),d=null==d?120:d,e=null==e?100:e,b.hideDialog(),c(f,d,e))},p=function(f,d){if(null!=f){var e=g?null:n.getModel().getGeometry(n.getSelectionCell());null!=e?m(f,e.width,e.height,d):m(f,null,null,d)}else b.hideDialog(),c(null)};this.init=function(){l.focus();if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=f.parentNode,d=null;mxEvent.addListener(c,"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);
-b.stopPropagation();b.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=b.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxImageSize,function(b,c,f,d,e,l,m,g){p(b,g)},function(){},function(b){return"image/"==b.type.substring(0,
+"100% 50%";l.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display="inline-block";d.style.top="3px";d.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){l.value="";l.focus()});e.appendChild(l);e.appendChild(d);f.appendChild(e);var n=function(f,d,e,l){var n="data:"==f.substring(0,
+5);!b.isOffline()||n&&"undefined"===typeof chrome?0<f.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(f,function(n){b.spinner.stop();b.hideDialog();var k=!1===l?1:null!=d&&null!=e?Math.max(d/n.width,e/n.height):Math.min(1,Math.min(520/n.width,520/n.height));g&&(f=b.convertDataUri(f));c(f,Math.round(Number(n.width)*k),Math.round(Number(n.height)*k))},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):
+(b.hideDialog(),c(f)):(f=b.convertDataUri(f),d=null==d?120:d,e=null==e?100:e,b.hideDialog(),c(f,d,e))},p=function(f,d){if(null!=f){var e=k?null:m.getModel().getGeometry(m.getSelectionCell());null!=e?n(f,e.width,e.height,d):n(f,null,null,d)}else b.hideDialog(),c(null)};this.init=function(){l.focus();if(Graph.fileSupport){l.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=f.parentNode,d=null;mxEvent.addListener(c,"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);
+b.stopPropagation();b.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(f){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=b.highlightElement(c));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxImageSize,function(b,c,f,d,e,l,n,g){p(b,g)},function(){},function(b){return"image/"==b.type.substring(0,
6)},function(b){for(var c=0;c<b.length;c++)b[c]()},!mxEvent.isControlDown(c),null,null,!0);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var f=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(f)&&p(decodeURIComponent(f))}c.stopPropagation();c.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign="center";e=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});e.className=
"geBtn";b.editor.cancelFirst&&d.appendChild(e);ImageDialog.filePicked=function(b){b.action==google.picker.Action.PICKED&&null!=b.docs[0].thumbnails&&(b=b.docs[0].thumbnails[b.docs[0].thumbnails.length-1],null!=b&&(l.value=b.url));l.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var q=document.createElement("input");q.setAttribute("multiple","multiple");q.setAttribute("type","file");mxEvent.addListener(q,"change",function(c){null!=q.files&&(b.importFiles(q.files,0,0,b.maxImageSize,function(b,
c,f,d,e,l){p(b)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()},!0),q.type="",q.type="file",q.value="")});q.style.display="none";document.body.appendChild(q);b.imgDlgFileInputElt=q}var t=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});t.className="geBtn";d.appendChild(t)}document.createElement("canvas").getContext&&"data:image/"==l.value.substring(0,11)&&"data:image/svg"!=l.value.substring(0,14)&&(t=mxUtils.button(mxResources.get("crop"),
function(){var c=new CropImageDialog(b,l.value,function(b){l.value=b});b.showDialog(c.container,300,380,!0,!0);c.init()}),t.className="geBtn",d.appendChild(t));mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&p(l.value)});t=mxUtils.button(mxResources.get("apply"),function(){p(l.value)});t.className="geBtn gePrimaryBtn";d.appendChild(t);b.editor.cancelFirst||d.appendChild(e);Graph.fileSupport&&(d.style.marginTop="120px",f.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",f.style.backgroundPosition=
-"center 65%",f.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")),f.appendChild(e));f.appendChild(d);this.container=f},LinkDialog=function(b,e,d,c,g,k,n){function f(b,c,f){f=mxUtils.button("",f);f.className="geBtn";f.setAttribute("title",c);c=document.createElement("img");c.style.height="26px";
-c.style.width="26px";c.setAttribute("src",b);f.style.minWidth="42px";f.style.verticalAlign="middle";f.appendChild(c);y.appendChild(f)}var l=document.createElement("div");mxUtils.write(l,mxResources.get("editLink")+":");var m=document.createElement("div");m.className="geTitle";m.style.backgroundColor="transparent";m.style.borderColor="transparent";m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";m.style.paddingRight="20px";var p=document.createElement("input");p.setAttribute("placeholder",
+"center 65%",f.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")),f.appendChild(e));f.appendChild(d);this.container=f},LinkDialog=function(b,e,d,c,k,g,m){function f(b,c,f){f=mxUtils.button("",f);f.className="geBtn";f.setAttribute("title",c);c=document.createElement("img");c.style.height="26px";
+c.style.width="26px";c.setAttribute("src",b);f.style.minWidth="42px";f.style.verticalAlign="middle";f.appendChild(c);y.appendChild(f)}var l=document.createElement("div");mxUtils.write(l,mxResources.get("editLink")+":");var n=document.createElement("div");n.className="geTitle";n.style.backgroundColor="transparent";n.style.borderColor="transparent";n.style.whiteSpace="nowrap";n.style.textOverflow="clip";n.style.cursor="default";n.style.paddingRight="20px";var p=document.createElement("input");p.setAttribute("placeholder",
mxResources.get("dragUrlsHere"));p.setAttribute("type","text");p.style.marginTop="6px";p.style.width="100%";p.style.boxSizing="border-box";p.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";p.style.marginBottom="4px";var q=document.createElement("div");q.setAttribute("title",mxResources.get("reset"));q.style.position="relative";q.style.left="-16px";q.style.width="12px";q.style.height=
"14px";q.style.cursor="pointer";q.style.display="inline-block";q.style.top="3px";q.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(q,"click",function(){p.value="";p.focus()});var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","url");t.setAttribute("type","radio");t.setAttribute("name","geLinkDialogOption");var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value",
-"url");u.setAttribute("type","radio");u.setAttribute("name","geLinkDialogOption");var v=document.createElement("select");v.style.width="100%";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.margin="0 6p 0 6px";null!=n&&(x.setAttribute("checked","checked"),x.defaultChecked=!0);n=null!=n?n:"_blank";x.setAttribute("title",n);k&&(p.style.width="340px");if(g&&null!=b.pages){null!=e&&Graph.isPageLink(e)?(u.setAttribute("checked","checked"),u.defaultChecked=!0):(p.setAttribute("value",
-e),t.setAttribute("checked","checked"),t.defaultChecked=!0);m.appendChild(t);m.appendChild(p);m.appendChild(q);k&&(m.appendChild(x),mxUtils.write(m,mxResources.get("openInNewWindow")));mxUtils.br(m);m.appendChild(u);g=!1;for(k=0;k<b.pages.length;k++)q=document.createElement("option"),mxUtils.write(q,b.pages[k].getName()||mxResources.get("pageWithNumber",[k+1])),q.setAttribute("value","data:page/id,"+b.pages[k].getId()),e==q.getAttribute("value")&&(q.setAttribute("selected","selected"),g=!0),v.appendChild(q);
-if(!g&&u.checked){var A=document.createElement("option");mxUtils.write(A,mxResources.get("pageNotFound"));A.setAttribute("disabled","disabled");A.setAttribute("selected","selected");A.setAttribute("value","pageNotFound");v.appendChild(A);mxEvent.addListener(v,"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)})}m.appendChild(v)}else p.setAttribute("value",e),m.appendChild(p),m.appendChild(q);l.appendChild(m);var z=mxUtils.button(d,function(){b.hideDialog();c(u.checked?
-"pageNotFound"!==v.value?v.value:e:p.value,LinkDialog.selectedDocs,x.checked?n:null)});z.style.verticalAlign="middle";z.className="geBtn gePrimaryBtn";this.init=function(){u.checked?v.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(v,"focus",function(){t.removeAttribute("checked");u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(p,"focus",function(){u.removeAttribute("checked");
+"url");u.setAttribute("type","radio");u.setAttribute("name","geLinkDialogOption");var v=document.createElement("select");v.style.width="100%";var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.margin="0 6p 0 6px";null!=m&&(x.setAttribute("checked","checked"),x.defaultChecked=!0);m=null!=m?m:"_blank";x.setAttribute("title",m);g&&(p.style.width="340px");if(k&&null!=b.pages){null!=e&&Graph.isPageLink(e)?(u.setAttribute("checked","checked"),u.defaultChecked=!0):(p.setAttribute("value",
+e),t.setAttribute("checked","checked"),t.defaultChecked=!0);n.appendChild(t);n.appendChild(p);n.appendChild(q);g&&(n.appendChild(x),mxUtils.write(n,mxResources.get("openInNewWindow")));mxUtils.br(n);n.appendChild(u);k=!1;for(g=0;g<b.pages.length;g++)q=document.createElement("option"),mxUtils.write(q,b.pages[g].getName()||mxResources.get("pageWithNumber",[g+1])),q.setAttribute("value","data:page/id,"+b.pages[g].getId()),e==q.getAttribute("value")&&(q.setAttribute("selected","selected"),k=!0),v.appendChild(q);
+if(!k&&u.checked){var A=document.createElement("option");mxUtils.write(A,mxResources.get("pageNotFound"));A.setAttribute("disabled","disabled");A.setAttribute("selected","selected");A.setAttribute("value","pageNotFound");v.appendChild(A);mxEvent.addListener(v,"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)})}n.appendChild(v)}else p.setAttribute("value",e),n.appendChild(p),n.appendChild(q);l.appendChild(n);var z=mxUtils.button(d,function(){b.hideDialog();c(u.checked?
+"pageNotFound"!==v.value?v.value:e:p.value,LinkDialog.selectedDocs,x.checked?m:null)});z.style.verticalAlign="middle";z.className="geBtn gePrimaryBtn";this.init=function(){u.checked?v.focus():(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(v,"focus",function(){t.removeAttribute("checked");u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(p,"focus",function(){u.removeAttribute("checked");
t.setAttribute("checked","checked");t.checked=!0});if(Graph.fileSupport){var c=l.parentNode,f=null;mxEvent.addListener(c,"dragleave",function(b){null!=f&&(f.parentNode.removeChild(f),f=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(d){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=b.highlightElement(c));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(b){null!=f&&(f.parentNode.removeChild(f),
f=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(p.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),t.setAttribute("checked","checked"),t.checked=!0,z.click());b.stopPropagation();b.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="18px";y.style.textAlign="center";d=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});d.style.verticalAlign="middle";d.className="geBtn";y.appendChild(d);
b.isOffline()&&!mxClient.IS_CHROMEAPP&&(d.style.display="none");d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";b.editor.cancelFirst&&y.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(b){if(b.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=b.docs;var c=b.docs[0].url;"application/mxe"==b.docs[0].mimeType||null!=b.docs[0].mimeType&&"application/vnd.jgraph."==b.docs[0].mimeType.substring(0,
23)?c="https://www.draw.io/#G"+b.docs[0].id:"application/vnd.google-apps.folder"==b.docs[0].mimeType&&(c="https://drive.google.com/#folders/"+b.docs[0].id);p.value=c;p.focus()}else LinkDialog.selectedDocs=null;p.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&f(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();
if(null==b.linkPicker){var c=b.drive.createLinkPicker();b.linkPicker=c.setCallback(function(b){LinkDialog.filePicked(b)}).build()}b.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(b){p.value=b[0].link;p.focus()}})});null!=b.oneDrive&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){b.oneDrive.pickFile(function(b,
c){p.value=c.value[0].webUrl;p.focus()})});null!=b.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(b){if(null!=b){b=b.split("/");var c=b[0],f=b[1],d=b[2];b=b.slice(3,b.length).join("/");p.value="https://github.com/"+c+"/"+f+"/blob/"+d+"/"+b;p.focus()}})});null!=b.gitLab&&f(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(b){if(null!=b){b=b.split("/");var c=b[0],f=b[1],d=b[2];b=b.slice(3,b.length).join("/");
-p.value=DRAWIO_GITLAB_URL+"/"+c+"/"+f+"/blob/"+d+"/"+b;p.focus()}})});mxEvent.addListener(p,"keypress",function(f){13==f.keyCode&&(b.hideDialog(),c(u.checked?v.value:p.value,LinkDialog.selectedDocs))});y.appendChild(z);b.editor.cancelFirst||y.appendChild(d);l.appendChild(y);this.container=l},FeedbackDialog=function(b,e,d,c){var g=document.createElement("div"),k=document.createElement("div");mxUtils.write(k,mxResources.get("sendYourFeedback"));k.style.fontSize="18px";k.style.marginBottom="18px";g.appendChild(k);
-k=document.createElement("div");mxUtils.write(k,mxResources.get("yourEmailAddress")+(d?"":" ("+mxResources.get("required")+")"));g.appendChild(k);var n=document.createElement("input");n.setAttribute("type","text");n.style.marginTop="6px";n.style.width="600px";var f=mxUtils.button(mxResources.get("sendMessage"),function(){var f=p.value+(m.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+
-navigator.appName+"\nplatform:\n"+navigator.platform;f.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(n.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+f),function(c){b.spinner.stop();200<=c.getStatus()&&
-299>=c.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});f.className="geBtn gePrimaryBtn";if(!d){f.setAttribute("disabled","disabled");var l=/^(([^<>()[\]\\.,;:\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(n,"change",function(){0<n.value.length&&0<l.test(n.value)?
-f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});mxEvent.addListener(n,"keyup",function(){0<n.value.length&&l.test(n.value)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")})}g.appendChild(n);this.init=function(){n.focus()};var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(m);k=document.createElement("span");mxUtils.write(k,
-" "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(k);mxEvent.addListener(k,"click",function(b){m.checked=!m.checked;mxEvent.consume(b)});g.appendChild(d);k=document.createElement("div");mxUtils.write(k,mxResources.get("feedback"));g.appendChild(k);var p=document.createElement("textarea");p.style.resize="none";p.style.width="600px";p.style.height="140px";p.style.marginTop="6px";p.setAttribute("placeholder",mxResources.get("comments"));g.appendChild(p);d=document.createElement("div");d.style.marginTop=
-"26px";d.style.textAlign="right";k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";b.editor.cancelFirst?(d.appendChild(k),d.appendChild(f)):(d.appendChild(f),d.appendChild(k));g.appendChild(d);this.container=g};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(b,e,d){var c=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));c.appendChild(g);g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.width="170px";g.style.height="378px";c.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.left="199px";k.style.width="470px";k.style.height="376px";
-k.style.overflow="hidden";var n=document.createElement("div");n.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";k.appendChild(n);mxEvent.disableContextMenu(k);c.appendChild(k);var f=new Graph(k);f.setTooltips(!1);f.setEnabled(!1);f.setPanning(!0);f.panningHandler.ignoreCell=!0;f.panningHandler.useLeftButtonForPanning=!0;f.minFitScale=null;f.maxFitScale=null;f.centerZoom=!0;var l=0,m=null,p=0,q=f.getGlobalVariable;
-f.getGlobalVariable=function(b){return"page"==b&&null!=m&&null!=m[p]?m[p].getAttribute("name"):"pagenumber"==b?p+1:"pagecount"==b?null!=m?m.length:1:q.apply(this,arguments)};f.getLinkForCell=function(){return null};Editor.MathJaxRender&&f.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,d){b.editor.graph.mathEnabled&&Editor.MathJaxRender(f.container)}));for(var t={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
+p.value=DRAWIO_GITLAB_URL+"/"+c+"/"+f+"/blob/"+d+"/"+b;p.focus()}})});mxEvent.addListener(p,"keypress",function(f){13==f.keyCode&&(b.hideDialog(),c(u.checked?v.value:p.value,LinkDialog.selectedDocs))});y.appendChild(z);b.editor.cancelFirst||y.appendChild(d);l.appendChild(y);this.container=l},FeedbackDialog=function(b,e,d,c){var k=document.createElement("div"),g=document.createElement("div");mxUtils.write(g,mxResources.get("sendYourFeedback"));g.style.fontSize="18px";g.style.marginBottom="18px";k.appendChild(g);
+g=document.createElement("div");mxUtils.write(g,mxResources.get("yourEmailAddress")+(d?"":" ("+mxResources.get("required")+")"));k.appendChild(g);var m=document.createElement("input");m.setAttribute("type","text");m.style.marginTop="6px";m.style.width="600px";var f=mxUtils.button(mxResources.get("sendMessage"),function(){var f=p.value+(n.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+
+navigator.appName+"\nplatform:\n"+navigator.platform;f.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(m.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+f),function(c){b.spinner.stop();200<=c.getStatus()&&
+299>=c.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});f.className="geBtn gePrimaryBtn";if(!d){f.setAttribute("disabled","disabled");var l=/^(([^<>()[\]\\.,;:\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(m,"change",function(){0<m.value.length&&0<l.test(m.value)?
+f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});mxEvent.addListener(m,"keyup",function(){0<m.value.length&&l.test(m.value)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")})}k.appendChild(m);this.init=function(){m.focus()};var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(n);g=document.createElement("span");mxUtils.write(g,
+" "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(g);mxEvent.addListener(g,"click",function(b){n.checked=!n.checked;mxEvent.consume(b)});k.appendChild(d);g=document.createElement("div");mxUtils.write(g,mxResources.get("feedback"));k.appendChild(g);var p=document.createElement("textarea");p.style.resize="none";p.style.width="600px";p.style.height="140px";p.style.marginTop="6px";p.setAttribute("placeholder",mxResources.get("comments"));k.appendChild(p);d=document.createElement("div");d.style.marginTop=
+"26px";d.style.textAlign="right";g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";b.editor.cancelFirst?(d.appendChild(g),d.appendChild(f)):(d.appendChild(f),d.appendChild(g));k.appendChild(d);this.container=k};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(b,e,d){var c=document.createElement("div"),k=document.createElement("h3");k.style.marginTop="0px";mxUtils.write(k,mxResources.get("revisionHistory"));c.appendChild(k);k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";c.appendChild(k);var g=document.createElement("div");g.style.position="absolute";g.style.border="1px solid lightGray";g.style.left="199px";g.style.width="470px";g.style.height="376px";
+g.style.overflow="hidden";var m=document.createElement("div");m.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";g.appendChild(m);mxEvent.disableContextMenu(g);c.appendChild(g);var f=new Graph(g);f.setTooltips(!1);f.setEnabled(!1);f.setPanning(!0);f.panningHandler.ignoreCell=!0;f.panningHandler.useLeftButtonForPanning=!0;f.minFitScale=null;f.maxFitScale=null;f.centerZoom=!0;var l=0,n=null,p=0,q=f.getGlobalVariable;
+f.getGlobalVariable=function(b){return"page"==b&&null!=n&&null!=n[p]?n[p].getAttribute("name"):"pagenumber"==b?p+1:"pagecount"==b?null!=n?n.length:1:q.apply(this,arguments)};f.getLinkForCell=function(){return null};Editor.MathJaxRender&&f.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,d){b.editor.graph.mathEnabled&&Editor.MathJaxRender(f.container)}));for(var t={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},u=new Spinner(t),v=b.getCurrentFile(),x=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),A={},t=0;t<x.length;t++)A[x[t].getAttribute("id")]=x[t];var z=null,y=null,B=null,C=null,D=mxUtils.button("",function(){null!=B&&f.zoomIn()});D.className="geSprite geSprite-zoomin";D.setAttribute("title",mxResources.get("zoomIn"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");
-mxUtils.setOpacity(D,20);var E=mxUtils.button("",function(){null!=B&&f.zoomOut()});E.className="geSprite geSprite-zoomout";E.setAttribute("title",mxResources.get("zoomOut"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");mxUtils.setOpacity(E,20);var G=mxUtils.button("",function(){null!=B&&(f.maxFitScale=8,f.fit(8),f.center())});G.className="geSprite geSprite-fit";G.setAttribute("title",mxResources.get("fit"));G.style.outline="none";G.style.border=
-"none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var F=mxUtils.button("",function(){null!=B&&(f.zoomActual(),f.center())});F.className="geSprite geSprite-actualsize";F.setAttribute("title",mxResources.get("actualSize"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var J=mxUtils.button("",function(){});J.className="geSprite geSprite-middle";J.setAttribute("title",mxResources.get("compare"));
-J.style.outline="none";J.style.border="none";J.style.margin="2px";mxUtils.setOpacity(J,60);var L=k.cloneNode(!1);L.style.pointerEvent="none";k.parentNode.appendChild(L);var H=new Graph(L);H.setTooltips(!1);H.setEnabled(!1);H.setPanning(!0);H.panningHandler.ignoreCell=!0;H.panningHandler.useLeftButtonForPanning=!0;H.minFitScale=null;H.maxFitScale=null;H.centerZoom=!0;mxEvent.addGestureListeners(J,function(b){b=A[m[l].getAttribute("id")];mxUtils.setOpacity(J,20);n.innerHTML="";null==b?mxUtils.write(n,
-mxResources.get("pageNotFound")):(M.style.display="none",k.style.display="none",L.style.display="",L.style.backgroundColor=k.style.backgroundColor,b=Editor.parseDiagramNode(b),(new mxCodec(b.ownerDocument)).decode(b,H.getModel()),H.view.scaleAndTranslate(f.view.scale,f.view.translate.x,f.view.translate.y))},null,function(){mxUtils.setOpacity(J,60);n.innerHTML="";"none"==k.style.display&&(M.style.display="",k.style.display="",L.style.display="none")});var M=document.createElement("div");M.style.position=
+mxUtils.setOpacity(D,20);var G=mxUtils.button("",function(){null!=B&&f.zoomOut()});G.className="geSprite geSprite-zoomout";G.setAttribute("title",mxResources.get("zoomOut"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var H=mxUtils.button("",function(){null!=B&&(f.maxFitScale=8,f.fit(8),f.center())});H.className="geSprite geSprite-fit";H.setAttribute("title",mxResources.get("fit"));H.style.outline="none";H.style.border=
+"none";H.style.margin="2px";H.setAttribute("disabled","disabled");mxUtils.setOpacity(H,20);var E=mxUtils.button("",function(){null!=B&&(f.zoomActual(),f.center())});E.className="geSprite geSprite-actualsize";E.setAttribute("title",mxResources.get("actualSize"));E.style.outline="none";E.style.border="none";E.style.margin="2px";E.setAttribute("disabled","disabled");mxUtils.setOpacity(E,20);var J=mxUtils.button("",function(){});J.className="geSprite geSprite-middle";J.setAttribute("title",mxResources.get("compare"));
+J.style.outline="none";J.style.border="none";J.style.margin="2px";mxUtils.setOpacity(J,60);var L=g.cloneNode(!1);L.style.pointerEvent="none";g.parentNode.appendChild(L);var F=new Graph(L);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;mxEvent.addGestureListeners(J,function(b){b=A[n[l].getAttribute("id")];mxUtils.setOpacity(J,20);m.innerHTML="";null==b?mxUtils.write(m,
+mxResources.get("pageNotFound")):(M.style.display="none",g.style.display="none",L.style.display="",L.style.backgroundColor=g.style.backgroundColor,b=Editor.parseDiagramNode(b),(new mxCodec(b.ownerDocument)).decode(b,F.getModel()),F.view.scaleAndTranslate(f.view.scale,f.view.translate.x,f.view.translate.y))},null,function(){mxUtils.setOpacity(J,60);m.innerHTML="";"none"==g.style.display&&(M.style.display="",g.style.display="",L.style.display="none")});var M=document.createElement("div");M.style.position=
"absolute";M.style.textAlign="right";M.style.color="gray";M.style.marginTop="10px";M.style.backgroundColor="transparent";M.style.top="440px";M.style.right="32px";M.style.maxWidth="380px";M.style.cursor="default";var P=mxUtils.button(mxResources.get("download"),function(){if(null!=B){var c=mxUtils.getXml(B.documentElement),f=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml"):(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(Graph.compress(c)),
(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml"+c)).simulate(document,"_blank"))}});P.className="geBtn";P.setAttribute("disabled","disabled");var S=mxUtils.button(mxResources.get("restore"),function(c){null!=B&&null!=C&&(mxEvent.isShiftDown(c)?null!=B&&(c=b.getPagesForNode(B.documentElement),c=b.diffPages(b.pages,c),c=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(c,null,2),function(c){if(0<c.length)try{b.confirm(mxResources.get("areYouSure"),function(){v.patch([JSON.parse(c)],
null,!0);b.hideDialog();b.hideDialog()})}catch(fa){b.handleError(fa)}},null,null,null,null,null,!0,null,mxResources.get("merge")),c.textarea.style.width="600px",c.textarea.style.height="380px",b.showDialog(c.container,620,460,!0,!0),c.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=d?d(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&v.save(!0,function(c){b.spinner.stop();b.replaceFileData(C);b.hideDialog()},function(c){b.spinner.stop();b.editor.setStatus("");b.handleError(c,
null!=c?mxResources.get("errorSavingFile"):null)})}))});S.className="geBtn";S.setAttribute("disabled","disabled");S.setAttribute("title","Shift+Click for Diff");var K=document.createElement("select");K.setAttribute("disabled","disabled");K.style.maxWidth="80px";K.style.position="relative";K.style.top="-2px";K.style.verticalAlign="bottom";K.style.marginRight="6px";K.style.display="none";var I=null;mxEvent.addListener(K,"change",function(b){null!=I&&(I(b),mxEvent.consume(b))});var T=mxUtils.button(mxResources.get("edit"),
function(){null!=B&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(B.documentElement)),b.openLink(b.getUrl(),null,!0))});T.className="geBtn";T.setAttribute("disabled","disabled");null!=d&&(T.style.display="none");var R=mxUtils.button(mxResources.get("show"),function(){null!=y&&b.openLink(y.getUrl(K.selectedIndex))});R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");null!=d&&(R.style.display="none",S.className="geBtn gePrimaryBtn");
-x=document.createElement("div");x.style.position="absolute";x.style.top="482px";x.style.width="640px";x.style.textAlign="right";var O=document.createElement("div");O.className="geToolbarContainer";O.style.backgroundColor="transparent";O.style.padding="2px";O.style.border="none";O.style.left="199px";O.style.top="442px";var Y=null;if(null!=e&&0<e.length){k.style.cursor="move";var aa=document.createElement("table");aa.style.border="1px solid lightGray";aa.style.borderCollapse="collapse";aa.style.borderSpacing=
-"0px";aa.style.width="100%";var ga=document.createElement("tbody"),ca=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(l=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var ea=function(c){var d=new Date(c.modifiedDate),g=null;if(0<=d.getTime()){var q=function(e){u.stop();n.innerHTML="";var q=mxUtils.parseXml(e),t=b.editor.extractGraphModel(q.documentElement,!0);if(null!=t){var y=function(b){null!=b&&(b=A(Editor.parseDiagramNode(b)));return b},A=function(b){var c=b.getAttribute("background");
-if(null==c||""==c||c==mxConstants.NONE)c=f.defaultPageBackgroundColor;k.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,f.getModel());f.maxFitScale=1;f.fit(8);f.center();return b};K.style.display="none";K.innerHTML="";B=q;C=e;m=parseSelectFunction=null;p=0;if("mxfile"==t.nodeName){q=t.getElementsByTagName("diagram");m=[];for(e=0;e<q.length;e++)m.push(q[e]);p=Math.min(l,m.length-1);0<m.length&&y(m[p]);if(1<m.length)for(K.removeAttribute("disabled"),K.style.display="",e=0;e<m.length;e++)q=
-document.createElement("option"),mxUtils.write(q,m[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),q.setAttribute("value",e),e==p&&q.setAttribute("selected","selected"),K.appendChild(q);I=function(){try{var c=parseInt(K.value);p=l=c;y(m[c])}catch(na){K.value=l,b.handleError(na)}}}else A(t);e=c.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,20)+"...");M.innerHTML="";mxUtils.write(M,(null!=e?e+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());M.setAttribute("title",
-g.getAttribute("title"));D.removeAttribute("disabled");E.removeAttribute("disabled");G.removeAttribute("disabled");F.removeAttribute("disabled");J.removeAttribute("disabled");null!=v&&v.isRestricted()||(b.editor.graph.isEnabled()&&S.removeAttribute("disabled"),P.removeAttribute("disabled"),R.removeAttribute("disabled"),T.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(J,60)}else K.style.display="none",
-K.innerHTML="",M.innerHTML="",mxUtils.write(M,mxResources.get("errorLoadingFile")),mxUtils.write(n,mxResources.get("errorLoadingFile"))},g=document.createElement("tr");g.style.borderBottom="1px solid lightGray";g.style.fontSize="12px";g.style.cursor="pointer";var t=document.createElement("td");t.style.padding="6px";t.style.whiteSpace="nowrap";c==e[e.length-1]?mxUtils.write(t,mxResources.get("current")):d.toDateString()===ca?mxUtils.write(t,d.toLocaleTimeString()):mxUtils.write(t,d.toLocaleDateString()+
-" "+d.toLocaleTimeString());g.appendChild(t);g.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+(null!=c.fileSize?" "+b.formatFileSize(parseInt(c.fileSize)):"")+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(g,"click",function(b){y!=c&&(u.stop(),null!=z&&(z.style.backgroundColor=""),y=c,z=g,z.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",C=B=null,M.removeAttribute("title"),M.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
-"..."),k.style.backgroundColor=f.defaultPageBackgroundColor,n.innerHTML="",f.getModel().clear(),S.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),mxUtils.setOpacity(D,20),
-mxUtils.setOpacity(E,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(J,20),u.spin(k),c.getXml(function(b){if(y==c)try{q(b)}catch(ba){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ba.message)}},function(b){u.stop();K.style.display="none";K.innerHTML="";M.innerHTML="";mxUtils.write(M,mxResources.get("errorLoadingFile"));mxUtils.write(n,mxResources.get("errorLoadingFile"))}),mxEvent.consume(b))});mxEvent.addListener(g,"dblclick",function(b){R.click();window.getSelection?
-window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(b)},!1);ga.appendChild(g)}return g}(e[t]);null!=ea&&t==e.length-1&&(Y=ea)}aa.appendChild(ga);g.appendChild(aa)}else null==v||null==b.drive&&v.constructor==window.DriveFile||null==b.dropbox&&v.constructor==window.DropboxFile?(k.style.display="none",O.style.display="none",mxUtils.write(g,mxResources.get("notAvailable"))):(k.style.display="none",O.style.display="none",mxUtils.write(g,mxResources.get("noRevisions")));
-this.init=function(){null!=Y&&Y.click()};g=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});g.className="geBtn";O.appendChild(K);O.appendChild(D);O.appendChild(E);O.appendChild(F);O.appendChild(G);O.appendChild(J);b.editor.cancelFirst?(x.appendChild(g),x.appendChild(P),x.appendChild(T),x.appendChild(S),x.appendChild(R)):(x.appendChild(P),x.appendChild(T),x.appendChild(S),x.appendChild(R),x.appendChild(g));c.appendChild(x);c.appendChild(O);c.appendChild(M);this.container=c},DraftDialog=
-function(b,e,d,c,g,k,n,f,l){var m=document.createElement("div"),p=document.createElement("div");p.style.marginTop="0px";p.style.whiteSpace="nowrap";p.style.overflow="auto";p.style.lineHeight="normal";mxUtils.write(p,e);m.appendChild(p);var q=document.createElement("select"),t=mxUtils.bind(this,function(){y=mxUtils.parseXml(l[q.value].data);B=b.editor.extractGraphModel(y.documentElement,!0);C=0;this.init()});if(null!=l){q.style.marginLeft="4px";for(e=0;e<l.length;e++){var u=document.createElement("option");
+x=document.createElement("div");x.style.position="absolute";x.style.top="482px";x.style.width="640px";x.style.textAlign="right";var O=document.createElement("div");O.className="geToolbarContainer";O.style.backgroundColor="transparent";O.style.padding="2px";O.style.border="none";O.style.left="199px";O.style.top="442px";var Y=null;if(null!=e&&0<e.length){g.style.cursor="move";var aa=document.createElement("table");aa.style.border="1px solid lightGray";aa.style.borderCollapse="collapse";aa.style.borderSpacing=
+"0px";aa.style.width="100%";var ga=document.createElement("tbody"),ca=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(l=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var ea=function(c){var d=new Date(c.modifiedDate),k=null;if(0<=d.getTime()){var q=function(e){u.stop();m.innerHTML="";var q=mxUtils.parseXml(e),t=b.editor.extractGraphModel(q.documentElement,!0);if(null!=t){var y=function(b){null!=b&&(b=A(Editor.parseDiagramNode(b)));return b},A=function(b){var c=b.getAttribute("background");
+if(null==c||""==c||c==mxConstants.NONE)c=f.defaultPageBackgroundColor;g.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,f.getModel());f.maxFitScale=1;f.fit(8);f.center();return b};K.style.display="none";K.innerHTML="";B=q;C=e;n=parseSelectFunction=null;p=0;if("mxfile"==t.nodeName){q=t.getElementsByTagName("diagram");n=[];for(e=0;e<q.length;e++)n.push(q[e]);p=Math.min(l,n.length-1);0<n.length&&y(n[p]);if(1<n.length)for(K.removeAttribute("disabled"),K.style.display="",e=0;e<n.length;e++)q=
+document.createElement("option"),mxUtils.write(q,n[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),q.setAttribute("value",e),e==p&&q.setAttribute("selected","selected"),K.appendChild(q);I=function(){try{var c=parseInt(K.value);p=l=c;y(n[c])}catch(na){K.value=l,b.handleError(na)}}}else A(t);e=c.lastModifyingUserName;null!=e&&20<e.length&&(e=e.substring(0,20)+"...");M.innerHTML="";mxUtils.write(M,(null!=e?e+" ":"")+d.toLocaleDateString()+" "+d.toLocaleTimeString());M.setAttribute("title",
+k.getAttribute("title"));D.removeAttribute("disabled");G.removeAttribute("disabled");H.removeAttribute("disabled");E.removeAttribute("disabled");J.removeAttribute("disabled");null!=v&&v.isRestricted()||(b.editor.graph.isEnabled()&&S.removeAttribute("disabled"),P.removeAttribute("disabled"),R.removeAttribute("disabled"),T.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(H,60);mxUtils.setOpacity(E,60);mxUtils.setOpacity(J,60)}else K.style.display="none",
+K.innerHTML="",M.innerHTML="",mxUtils.write(M,mxResources.get("errorLoadingFile")),mxUtils.write(m,mxResources.get("errorLoadingFile"))},k=document.createElement("tr");k.style.borderBottom="1px solid lightGray";k.style.fontSize="12px";k.style.cursor="pointer";var t=document.createElement("td");t.style.padding="6px";t.style.whiteSpace="nowrap";c==e[e.length-1]?mxUtils.write(t,mxResources.get("current")):d.toDateString()===ca?mxUtils.write(t,d.toLocaleTimeString()):mxUtils.write(t,d.toLocaleDateString()+
+" "+d.toLocaleTimeString());k.appendChild(t);k.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+(null!=c.fileSize?" "+b.formatFileSize(parseInt(c.fileSize)):"")+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(k,"click",function(b){y!=c&&(u.stop(),null!=z&&(z.style.backgroundColor=""),y=c,z=k,z.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",C=B=null,M.removeAttribute("title"),M.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+
+"..."),g.style.backgroundColor=f.defaultPageBackgroundColor,m.innerHTML="",f.getModel().clear(),S.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),mxUtils.setOpacity(D,20),
+mxUtils.setOpacity(G,20),mxUtils.setOpacity(H,20),mxUtils.setOpacity(E,20),mxUtils.setOpacity(J,20),u.spin(g),c.getXml(function(b){if(y==c)try{q(b)}catch(ba){M.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ba.message)}},function(b){u.stop();K.style.display="none";K.innerHTML="";M.innerHTML="";mxUtils.write(M,mxResources.get("errorLoadingFile"));mxUtils.write(m,mxResources.get("errorLoadingFile"))}),mxEvent.consume(b))});mxEvent.addListener(k,"dblclick",function(b){R.click();window.getSelection?
+window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(b)},!1);ga.appendChild(k)}return k}(e[t]);null!=ea&&t==e.length-1&&(Y=ea)}aa.appendChild(ga);k.appendChild(aa)}else null==v||null==b.drive&&v.constructor==window.DriveFile||null==b.dropbox&&v.constructor==window.DropboxFile?(g.style.display="none",O.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(g.style.display="none",O.style.display="none",mxUtils.write(k,mxResources.get("noRevisions")));
+this.init=function(){null!=Y&&Y.click()};k=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});k.className="geBtn";O.appendChild(K);O.appendChild(D);O.appendChild(G);O.appendChild(E);O.appendChild(H);O.appendChild(J);b.editor.cancelFirst?(x.appendChild(k),x.appendChild(P),x.appendChild(T),x.appendChild(S),x.appendChild(R)):(x.appendChild(P),x.appendChild(T),x.appendChild(S),x.appendChild(R),x.appendChild(k));c.appendChild(x);c.appendChild(O);c.appendChild(M);this.container=c},DraftDialog=
+function(b,e,d,c,k,g,m,f,l){var n=document.createElement("div"),p=document.createElement("div");p.style.marginTop="0px";p.style.whiteSpace="nowrap";p.style.overflow="auto";p.style.lineHeight="normal";mxUtils.write(p,e);n.appendChild(p);var q=document.createElement("select"),t=mxUtils.bind(this,function(){y=mxUtils.parseXml(l[q.value].data);B=b.editor.extractGraphModel(y.documentElement,!0);C=0;this.init()});if(null!=l){q.style.marginLeft="4px";for(e=0;e<l.length;e++){var u=document.createElement("option");
u.setAttribute("value",e);var v=new Date(l[e].created),x=new Date(l[e].modified);mxUtils.write(u,v.toLocaleDateString()+" "+v.toLocaleTimeString()+" - "+(v.toDateString(),x.toDateString(),x.toLocaleDateString())+" "+x.toLocaleTimeString());q.appendChild(u)}p.appendChild(q);mxEvent.addListener(q,"change",t)}null==d&&(d=l[0].data);var A=document.createElement("div");A.style.position="absolute";A.style.border="1px solid lightGray";A.style.marginTop="10px";A.style.left="40px";A.style.right="40px";A.style.top=
-"46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);m.appendChild(A);var z=new Graph(A);z.setEnabled(!1);z.setPanning(!0);z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var y=mxUtils.parseXml(d),B=b.editor.extractGraphModel(y.documentElement,!0),C=0,D=null,E=z.getGlobalVariable;z.getGlobalVariable=function(b){return"page"==b&&null!=D&&null!=D[C]?D[C].getAttribute("name"):"pagenumber"==
-b?C+1:"pagecount"==b?null!=D?D.length:1:E.apply(this,arguments)};z.getLinkForCell=function(){return null};d=mxUtils.button("",function(){z.zoomIn()});d.className="geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);p=mxUtils.button("",function(){z.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.outline="none";p.style.border=
+"46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);n.appendChild(A);var z=new Graph(A);z.setEnabled(!1);z.setPanning(!0);z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var y=mxUtils.parseXml(d),B=b.editor.extractGraphModel(y.documentElement,!0),C=0,D=null,G=z.getGlobalVariable;z.getGlobalVariable=function(b){return"page"==b&&null!=D&&null!=D[C]?D[C].getAttribute("name"):"pagenumber"==
+b?C+1:"pagecount"==b?null!=D?D.length:1:G.apply(this,arguments)};z.getLinkForCell=function(){return null};d=mxUtils.button("",function(){z.zoomIn()});d.className="geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);p=mxUtils.button("",function(){z.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.outline="none";p.style.border=
"none";p.style.margin="2px";mxUtils.setOpacity(p,60);e=mxUtils.button("",function(){z.maxFitScale=8;z.fit(8);z.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);u=mxUtils.button("",function(){z.zoomActual();z.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);n=mxUtils.button(n||mxResources.get("discard"),function(){g.apply(this,[q.value,mxUtils.bind(this,function(){null!=q.parentNode&&(q.options[q.selectedIndex].parentNode.removeChild(q.options[q.selectedIndex]),0<q.options.length?(q.value=q.options[0].value,t()):b.hideDialog(!0))})])});n.className="geBtn";var G=document.createElement("select");G.style.maxWidth="80px";G.style.position="relative";G.style.top="-2px";G.style.verticalAlign="bottom";G.style.marginRight="6px";
-G.style.display="none";k=mxUtils.button(k||mxResources.get("edit"),function(){c.apply(this,[q.value])});k.className="geBtn gePrimaryBtn";v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";v.style.right="40px";v.style.textAlign="right";x=document.createElement("div");x.className="geToolbarContainer";x.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(b){if(null!=
-b){var c=b.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,z.getModel());z.maxFitScale=1;z.fit(8);z.center()}return b}function c(c){null!=c&&(c=b(Editor.parseDiagramNode(c)));return c}mxEvent.addListener(G,"change",function(b){C=parseInt(G.value);c(D[C]);mxEvent.consume(b)});if("mxfile"==B.nodeName){var f=B.getElementsByTagName("diagram");D=[];for(var d=0;d<f.length;d++)D.push(f[d]);
-0<D.length&&c(D[C]);G.innerHTML="";if(1<D.length)for(G.style.display="",d=0;d<D.length;d++)f=document.createElement("option"),mxUtils.write(f,D[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==C&&f.setAttribute("selected","selected"),G.appendChild(f);else G.style.display="none"}else b(B)};x.appendChild(G);x.appendChild(d);x.appendChild(p);x.appendChild(u);x.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.className=
-"geBtn";f=null!=f?mxUtils.button(mxResources.get("ignore"),f):null;null!=f&&(f.className="geBtn");b.editor.cancelFirst?(v.appendChild(d),null!=f&&v.appendChild(f),v.appendChild(n),v.appendChild(k)):(v.appendChild(k),v.appendChild(n),null!=f&&v.appendChild(f),v.appendChild(d));m.appendChild(v);m.appendChild(x);this.container=m},FindWindow=function(b,e,d,c,g,k){function n(b,c,f,d){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var e=0;e<c.length;e++)if("label"!=c[e].nodeName){var l=
-mxUtils.trim(c[e].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==b&&(d&&0<=l.indexOf(f)||!d&&l.substring(0,f.length)===f)||null!=b&&b.test(l))return!0}}return!1}function f(){u&&D.value?(P.removeAttribute("disabled"),S.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"));D.value&&C.value?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}function l(c,d,e){H.innerHTML="";var m=p.model.getDescendants(p.model.getRoot()),
-g=C.value.toLowerCase(),y=E.checked?new RegExp(g):null,K=null;x=null;q!=g&&(q=g,t=null,v=!1);var B=null==t;if(0<g.length){if(v){v=!1;for(var I,T=0;T<b.pages.length;T++)if(b.currentPage==b.pages[T]){I=T;break}c=(I+1)%b.pages.length;t=null;do v=!1,m=b.pages[c],p=b.createTemporaryGraph(p.getStylesheet()),b.updatePageRoot(m),p.model.setRoot(m.root),c=(c+1)%b.pages.length;while(!l(!0,d,e)&&c!=I);t&&(t=null,e?b.editor.graph.model.execute(new SelectPage(b,m)):b.selectPage(m));v=!1;p=b.editor.graph;return l(!0,
-d,e)}for(T=0;T<m.length;T++){I=p.view.getState(m[T]);d&&null!=y&&(B=B||I==t);if(null!=I&&null!=I.cell.value&&(B||null==K)&&(p.model.isVertex(I.cell)||p.model.isEdge(I.cell))){null!=I.style&&"1"==I.style.html?(F.innerHTML=p.sanitizeHtml(p.getLabel(I.cell)),label=mxUtils.extractTextWithWhitespace([F])):label=p.getLabel(I.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var O=0;d&&k&&null!=y&&I==t&&(label=label.substr(A),O=A);var z=""==D.value,R=z;if(null==y&&(R&&
-0<=label.indexOf(g)||!R&&label.substring(0,g.length)===g||z&&n(y,I.cell,g,R))||null!=y&&(y.test(label)||z&&n(y,I.cell,g,R)))if(k&&(null!=y?(z=label.match(y),x=z[0].toLowerCase(),A=O+z.index+x.length):(x=g,A=x.length)),B){K=I;break}else null==K&&(K=I)}B=B||I==t}}if(null!=K){if(T==m.length&&G.checked)return t=null,v=!0,l(!0,d,e);t=K;p.scrollCellToVisible(t.cell);p.isEnabled()&&!p.isCellLocked(t.cell)?e||p.getSelectionCell()==t.cell&&1==p.getSelectionCount()||p.setSelectionCell(t.cell):p.highlightCell(t.cell)}else{if(!c&&
-G.checked)return v=!0,l(!0,d,e);p.isEnabled()&&!e&&p.clearSelection()}u=null!=K;k&&!c&&f();return 0==g.length||null!=K}var m=b.actions.get("findReplace"),p=b.editor.graph,q=null,t=null,u=!1,v=!1,x=null,A=0,z=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var B=k?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";
-C.style.marginBottom="6px";C.style.width=B;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";y.appendChild(C);mxUtils.br(y);var D;k&&(D=document.createElement("input"),D.setAttribute("placeholder",mxResources.get("replaceWith")),D.setAttribute("type","text"),D.style.marginTop="4px",D.style.marginBottom="6px",D.style.width=B,D.style.fontSize="12px",D.style.borderRadius="4px",D.style.padding="6px",y.appendChild(D),mxUtils.br(y),mxEvent.addListener(D,"input",f));var E=document.createElement("input");
-E.setAttribute("id","geFindWinRegExChck");E.setAttribute("type","checkbox");E.style.marginRight="4px";y.appendChild(E);B=document.createElement("label");B.setAttribute("for","geFindWinRegExChck");y.appendChild(B);mxUtils.write(B,mxResources.get("regularExpression"));y.appendChild(B);B=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");B.style.position="relative";B.style.marginLeft="6px";B.style.top="-1px";y.appendChild(B);mxUtils.br(y);var G=document.createElement("input");G.setAttribute("id",
-"geFindWinAllPagesChck");G.setAttribute("type","checkbox");G.style.marginRight="4px";y.appendChild(G);B=document.createElement("label");B.setAttribute("for","geFindWinAllPagesChck");y.appendChild(B);mxUtils.write(B,mxResources.get("allPages"));y.appendChild(B);var F=document.createElement("div");mxUtils.br(y);B=document.createElement("div");B.style.left="0px";B.style.right="0px";B.style.marginTop="6px";B.style.padding="0 6px 0 6px";B.style.textAlign="center";y.appendChild(B);var J=mxUtils.button(mxResources.get("reset"),
-function(){H.innerHTML="";C.value="";C.style.backgroundColor="";k&&(D.value="",f());q=t=null;v=!1;C.focus()});J.setAttribute("title",mxResources.get("reset"));J.style["float"]="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn";k||B.appendChild(J);var L=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(T){b.handleError(T)}});
-L.setAttribute("title",mxResources.get("find")+" (Enter)");L.style["float"]="none";L.style.width="120px";L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";L.style.textOverflow="ellipsis";L.className="geBtn gePrimaryBtn";B.appendChild(L);var H=document.createElement("div");H.style.marginTop="10px";if(k){var M=function(b,c,f,d,e){if(null==e||"1"!=e.html)return d=b.toLowerCase().indexOf(c,d),0>d?b:b.substr(0,d)+f+b.substr(d+c.length);var l=b;c=mxUtils.htmlEntities(c);e=[];for(var m=
--1;-1<(m=b.indexOf("<",m+1));)e.push(m);m=b.match(/<[^>]*>/g);b=b.replace(/<[^>]*>/g,"");d=b.toLowerCase().indexOf(c,d);if(0>d)return l;l=d+c.length;f=mxUtils.htmlEntities(f);b=b.substr(0,d)+f+b.substr(l);for(var g=0,k=0;k<e.length;k++){if(e[k]-g<d)b=b.substr(0,e[k])+m[k]+b.substr(e[k]);else{var p=e[k]-g<l?d+g:e[k]+(f.length-c.length);b=b.substr(0,p)+m[k]+b.substr(p)}g+=m[k].length}return b},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=t&&D.value){var c=t.cell,f=p.getLabel(c);
+"2px";mxUtils.setOpacity(u,60);m=mxUtils.button(m||mxResources.get("discard"),function(){k.apply(this,[q.value,mxUtils.bind(this,function(){null!=q.parentNode&&(q.options[q.selectedIndex].parentNode.removeChild(q.options[q.selectedIndex]),0<q.options.length?(q.value=q.options[0].value,t()):b.hideDialog(!0))})])});m.className="geBtn";var H=document.createElement("select");H.style.maxWidth="80px";H.style.position="relative";H.style.top="-2px";H.style.verticalAlign="bottom";H.style.marginRight="6px";
+H.style.display="none";g=mxUtils.button(g||mxResources.get("edit"),function(){c.apply(this,[q.value])});g.className="geBtn gePrimaryBtn";v=document.createElement("div");v.style.position="absolute";v.style.bottom="30px";v.style.right="40px";v.style.textAlign="right";x=document.createElement("div");x.className="geToolbarContainer";x.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(b){if(null!=
+b){var c=b.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=c;(new mxCodec(b.ownerDocument)).decode(b,z.getModel());z.maxFitScale=1;z.fit(8);z.center()}return b}function c(c){null!=c&&(c=b(Editor.parseDiagramNode(c)));return c}mxEvent.addListener(H,"change",function(b){C=parseInt(H.value);c(D[C]);mxEvent.consume(b)});if("mxfile"==B.nodeName){var f=B.getElementsByTagName("diagram");D=[];for(var d=0;d<f.length;d++)D.push(f[d]);
+0<D.length&&c(D[C]);H.innerHTML="";if(1<D.length)for(H.style.display="",d=0;d<D.length;d++)f=document.createElement("option"),mxUtils.write(f,D[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==C&&f.setAttribute("selected","selected"),H.appendChild(f);else H.style.display="none"}else b(B)};x.appendChild(H);x.appendChild(d);x.appendChild(p);x.appendChild(u);x.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.className=
+"geBtn";f=null!=f?mxUtils.button(mxResources.get("ignore"),f):null;null!=f&&(f.className="geBtn");b.editor.cancelFirst?(v.appendChild(d),null!=f&&v.appendChild(f),v.appendChild(m),v.appendChild(g)):(v.appendChild(g),v.appendChild(m),null!=f&&v.appendChild(f),v.appendChild(d));n.appendChild(v);n.appendChild(x);this.container=n},FindWindow=function(b,e,d,c,k,g){function m(b,c,f,d){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var e=0;e<c.length;e++)if("label"!=c[e].nodeName){var l=
+mxUtils.trim(c[e].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==b&&(d&&0<=l.indexOf(f)||!d&&l.substring(0,f.length)===f)||null!=b&&b.test(l))return!0}}return!1}function f(){u&&D.value?(P.removeAttribute("disabled"),S.removeAttribute("disabled")):(P.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"));D.value&&C.value?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}function l(c,d,e){F.innerHTML="";var n=p.model.getDescendants(p.model.getRoot()),
+k=C.value.toLowerCase(),y=G.checked?new RegExp(k):null,K=null;x=null;q!=k&&(q=k,t=null,v=!1);var B=null==t;if(0<k.length){if(v){v=!1;for(var I,T=0;T<b.pages.length;T++)if(b.currentPage==b.pages[T]){I=T;break}c=(I+1)%b.pages.length;t=null;do v=!1,n=b.pages[c],p=b.createTemporaryGraph(p.getStylesheet()),b.updatePageRoot(n),p.model.setRoot(n.root),c=(c+1)%b.pages.length;while(!l(!0,d,e)&&c!=I);t&&(t=null,e?b.editor.graph.model.execute(new SelectPage(b,n)):b.selectPage(n));v=!1;p=b.editor.graph;return l(!0,
+d,e)}for(T=0;T<n.length;T++){I=p.view.getState(n[T]);d&&null!=y&&(B=B||I==t);if(null!=I&&null!=I.cell.value&&(B||null==K)&&(p.model.isVertex(I.cell)||p.model.isEdge(I.cell))){null!=I.style&&"1"==I.style.html?(E.innerHTML=p.sanitizeHtml(p.getLabel(I.cell)),label=mxUtils.extractTextWithWhitespace([E])):label=p.getLabel(I.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var O=0;d&&g&&null!=y&&I==t&&(label=label.substr(A),O=A);var z=""==D.value,R=z;if(null==y&&(R&&
+0<=label.indexOf(k)||!R&&label.substring(0,k.length)===k||z&&m(y,I.cell,k,R))||null!=y&&(y.test(label)||z&&m(y,I.cell,k,R)))if(g&&(null!=y?(z=label.match(y),x=z[0].toLowerCase(),A=O+z.index+x.length):(x=k,A=x.length)),B){K=I;break}else null==K&&(K=I)}B=B||I==t}}if(null!=K){if(T==n.length&&H.checked)return t=null,v=!0,l(!0,d,e);t=K;p.scrollCellToVisible(t.cell);p.isEnabled()&&!p.isCellLocked(t.cell)?e||p.getSelectionCell()==t.cell&&1==p.getSelectionCount()||p.setSelectionCell(t.cell):p.highlightCell(t.cell)}else{if(!c&&
+H.checked)return v=!0,l(!0,d,e);p.isEnabled()&&!e&&p.clearSelection()}u=null!=K;g&&!c&&f();return 0==k.length||null!=K}var n=b.actions.get("findReplace"),p=b.editor.graph,q=null,t=null,u=!1,v=!1,x=null,A=0,z=1,y=document.createElement("div");y.style.userSelect="none";y.style.overflow="hidden";y.style.padding="10px";y.style.height="100%";var B=g?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";
+C.style.marginBottom="6px";C.style.width=B;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";y.appendChild(C);mxUtils.br(y);var D;g&&(D=document.createElement("input"),D.setAttribute("placeholder",mxResources.get("replaceWith")),D.setAttribute("type","text"),D.style.marginTop="4px",D.style.marginBottom="6px",D.style.width=B,D.style.fontSize="12px",D.style.borderRadius="4px",D.style.padding="6px",y.appendChild(D),mxUtils.br(y),mxEvent.addListener(D,"input",f));var G=document.createElement("input");
+G.setAttribute("id","geFindWinRegExChck");G.setAttribute("type","checkbox");G.style.marginRight="4px";y.appendChild(G);B=document.createElement("label");B.setAttribute("for","geFindWinRegExChck");y.appendChild(B);mxUtils.write(B,mxResources.get("regularExpression"));y.appendChild(B);B=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");B.style.position="relative";B.style.marginLeft="6px";B.style.top="-1px";y.appendChild(B);mxUtils.br(y);var H=document.createElement("input");H.setAttribute("id",
+"geFindWinAllPagesChck");H.setAttribute("type","checkbox");H.style.marginRight="4px";y.appendChild(H);B=document.createElement("label");B.setAttribute("for","geFindWinAllPagesChck");y.appendChild(B);mxUtils.write(B,mxResources.get("allPages"));y.appendChild(B);var E=document.createElement("div");mxUtils.br(y);B=document.createElement("div");B.style.left="0px";B.style.right="0px";B.style.marginTop="6px";B.style.padding="0 6px 0 6px";B.style.textAlign="center";y.appendChild(B);var J=mxUtils.button(mxResources.get("reset"),
+function(){F.innerHTML="";C.value="";C.style.backgroundColor="";g&&(D.value="",f());q=t=null;v=!1;C.focus()});J.setAttribute("title",mxResources.get("reset"));J.style["float"]="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn";g||B.appendChild(J);var L=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(T){b.handleError(T)}});
+L.setAttribute("title",mxResources.get("find")+" (Enter)");L.style["float"]="none";L.style.width="120px";L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";L.style.textOverflow="ellipsis";L.className="geBtn gePrimaryBtn";B.appendChild(L);var F=document.createElement("div");F.style.marginTop="10px";if(g){var M=function(b,c,f,d,e){if(null==e||"1"!=e.html)return d=b.toLowerCase().indexOf(c,d),0>d?b:b.substr(0,d)+f+b.substr(d+c.length);var l=b;c=mxUtils.htmlEntities(c);e=[];for(var n=
+-1;-1<(n=b.indexOf("<",n+1));)e.push(n);n=b.match(/<[^>]*>/g);b=b.replace(/<[^>]*>/g,"");d=b.toLowerCase().indexOf(c,d);if(0>d)return l;l=d+c.length;f=mxUtils.htmlEntities(f);b=b.substr(0,d)+f+b.substr(l);for(var k=0,g=0;g<e.length;g++){if(e[g]-k<d)b=b.substr(0,e[g])+n[g]+b.substr(e[g]);else{var p=e[g]-k<l?d+k:e[g]+(f.length-c.length);b=b.substr(0,p)+n[g]+b.substr(p)}k+=n[g].length}return b},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=x&&null!=t&&D.value){var c=t.cell,f=p.getLabel(c);
p.isCellEditable(c)&&p.model.setValue(c,M(f,x,D.value,A-x.length,p.getCurrentCellStyle(c)));C.style.backgroundColor=l(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(O){b.handleError(O)}});P.setAttribute("title",mxResources.get("replFind"));P.style["float"]="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn gePrimaryBtn";P.setAttribute("disabled","disabled");B.appendChild(P);mxUtils.br(B);
var S=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=x&&null!=t&&D.value){var c=t.cell,f=p.getLabel(c);p.model.setValue(c,M(f,x,D.value,A-x.length,p.getCurrentCellStyle(c)));P.setAttribute("disabled","disabled");S.setAttribute("disabled","disabled")}}catch(O){b.handleError(O)}});S.setAttribute("title",mxResources.get("replace"));S.style["float"]="none";S.style.width="120px";S.style.marginTop="6px";S.style.marginLeft="8px";S.style.overflow="hidden";S.style.textOverflow="ellipsis";
-S.className="geBtn gePrimaryBtn";S.setAttribute("disabled","disabled");B.appendChild(S);var K=mxUtils.button(mxResources.get("replaceAll"),function(){H.innerHTML="";if(D.value){var c=b.currentPage,f=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;p.getModel().beginUpdate();try{for(var d=0,e={};l(!1,!0,!0)&&100>d;){var m=t.cell,g=p.getLabel(m),k=e[m.id];if(k&&k.replAllMrk==z&&k.replAllPos>=A)break;e[m.id]={replAllMrk:z,replAllPos:A};p.isCellEditable(m)&&(p.model.setValue(m,M(g,x,D.value,
-A-x.length,p.getCurrentCellStyle(m))),d++)}c!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,c));mxUtils.write(H,mxResources.get("matchesRepl",[d]))}catch(ea){b.handleError(ea)}finally{p.getModel().endUpdate(),b.editor.graph.setSelectionCells(f),b.editor.graph.rendering=!0}z++}});K.setAttribute("title",mxResources.get("replaceAll"));K.style["float"]="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";
-K.className="geBtn gePrimaryBtn";K.setAttribute("disabled","disabled");B.appendChild(K);mxUtils.br(B);B.appendChild(J);J=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));J.setAttribute("title",mxResources.get("close"));J.style["float"]="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn";B.appendChild(J);mxUtils.br(B);B.appendChild(H)}else J.style.width=
-"90px",L.style.width="90px";mxEvent.addListener(C,"keyup",function(b){if(91==b.keyCode||93==b.keyCode||17==b.keyCode)mxEvent.consume(b);else if(27==b.keyCode)m.funct();else if(q!=C.value.toLowerCase()||13==b.keyCode)try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(R){C.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(y,"keydown",function(c){70==c.keyCode&&b.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(m.funct(),mxEvent.consume(c))});
-this.window=new mxWindow(mxResources.get("find")+(k?"/"+mxResources.get("replace"):""),y,e,d,c,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?G.removeAttribute("disabled"):
-(G.checked=!1,G.setAttribute("disabled","disabled"))):p.container.focus()}));this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};
-var I=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",I);this.destroy=function(){mxEvent.removeListener(window,"resize",I);this.window.destroy()}},FreehandWindow=function(b,e,d,c,g){var k=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow="hidden";b.style.height="100%";var n=mxUtils.button(mxResources.get("startDrawing"),function(){k.freehand.isDrawing()?
-k.freehand.stopDrawing():k.freehand.startDrawing()});n.setAttribute("title",mxResources.get("startDrawing"));n.style.marginTop="10px";n.style.width="90%";n.style.boxSizing="border-box";n.style.overflow="hidden";n.style.textOverflow="ellipsis";n.style.textAlign="center";n.className="geBtn gePrimaryBtn";b.appendChild(n);this.window=new mxWindow(mxResources.get("freehand"),b,e,d,c,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
-k.addListener("freehandStateChanged",mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,mxResources.get(k.freehand.isDrawing()?"stopDrawing":"startDrawing"));n.setAttribute("title",mxResources.get(k.freehand.isDrawing()?"stopDrawing":"startDrawing"));n.className="geBtn"+(k.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){k.freehand.isDrawing()&&k.freehand.stopDrawing()}));
+S.className="geBtn gePrimaryBtn";S.setAttribute("disabled","disabled");B.appendChild(S);var K=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerHTML="";if(D.value){var c=b.currentPage,f=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;p.getModel().beginUpdate();try{for(var d=0,e={};l(!1,!0,!0)&&100>d;){var n=t.cell,k=p.getLabel(n),g=e[n.id];if(g&&g.replAllMrk==z&&g.replAllPos>=A)break;e[n.id]={replAllMrk:z,replAllPos:A};p.isCellEditable(n)&&(p.model.setValue(n,M(k,x,D.value,
+A-x.length,p.getCurrentCellStyle(n))),d++)}c!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,c));mxUtils.write(F,mxResources.get("matchesRepl",[d]))}catch(ea){b.handleError(ea)}finally{p.getModel().endUpdate(),b.editor.graph.setSelectionCells(f),b.editor.graph.rendering=!0}z++}});K.setAttribute("title",mxResources.get("replaceAll"));K.style["float"]="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";
+K.className="geBtn gePrimaryBtn";K.setAttribute("disabled","disabled");B.appendChild(K);mxUtils.br(B);B.appendChild(J);J=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));J.setAttribute("title",mxResources.get("close"));J.style["float"]="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn";B.appendChild(J);mxUtils.br(B);B.appendChild(F)}else J.style.width=
+"90px",L.style.width="90px";mxEvent.addListener(C,"keyup",function(b){if(91==b.keyCode||93==b.keyCode||17==b.keyCode)mxEvent.consume(b);else if(27==b.keyCode)n.funct();else if(q!=C.value.toLowerCase()||13==b.keyCode)try{C.style.backgroundColor=l()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(R){C.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(y,"keydown",function(c){70==c.keyCode&&b.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(n.funct(),mxEvent.consume(c))});
+this.window=new mxWindow(mxResources.get("find")+(g?"/"+mxResources.get("replace"):""),y,e,d,c,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()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?H.removeAttribute("disabled"):
+(H.checked=!1,H.setAttribute("disabled","disabled"))):p.container.focus()}));this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};
+var I=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",I);this.destroy=function(){mxEvent.removeListener(window,"resize",I);this.window.destroy()}},FreehandWindow=function(b,e,d,c,k){var g=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow="hidden";b.style.height="100%";var m=mxUtils.button(mxResources.get("startDrawing"),function(){g.freehand.isDrawing()?
+g.freehand.stopDrawing():g.freehand.startDrawing()});m.setAttribute("title",mxResources.get("startDrawing"));m.style.marginTop="10px";m.style.width="90%";m.style.boxSizing="border-box";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.style.textAlign="center";m.className="geBtn gePrimaryBtn";b.appendChild(m);this.window=new mxWindow(mxResources.get("freehand"),b,e,d,c,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
+g.addListener("freehandStateChanged",mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,mxResources.get(g.freehand.isDrawing()?"stopDrawing":"startDrawing"));m.setAttribute("title",mxResources.get(g.freehand.isDrawing()?"stopDrawing":"startDrawing"));m.className="geBtn"+(g.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){g.freehand.isDrawing()&&g.freehand.stopDrawing()}));
this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var f=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();
-this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",f);this.destroy=function(){mxEvent.removeListener(window,"resize",f);this.window.destroy()}},TagsWindow=function(b,e,d,c,g){var k=b.editor.graph,n=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(c,f){if(k.isEnabled()){var d=new FilenameDialog(b,"",mxResources.get("add"),function(d){b.hideDialog();if(null!=d&&0<d.length){d=d.split(" ");for(var e=[],l=0;l<d.length;l++){var m=
-mxUtils.trim(d[l]);""!=m&&0>mxUtils.indexOf(c,m)&&e.push(m)}0<e.length&&(k.isSelectionEmpty()?f(c.concat(e)):k.addTagsForCells(k.getSelectionCells(),e))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(d.container,300,80,!0,!0);d.init()}}),f=n.div;this.window=new mxWindow(mxResources.get("tags"),f,e,d,c,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
-this.window.addListener("show",mxUtils.bind(this,function(){n.refresh();this.window.fit()}));this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,
-arguments)};var l=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",l);this.destroy=function(){mxEvent.removeListener(window,"resize",l);this.window.destroy()}},AuthDialog=function(b,e,d,c){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("authorizationRequired"));
-var n="Unknown",f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.marginRight="10px";e==b.drive?(n=mxResources.get("googleDrive"),f.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(n=mxResources.get("dropbox"),f.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(n=mxResources.get("oneDrive"),f.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(n=mxResources.get("github"),f.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?
-(n=mxResources.get("gitlab"),f.src=IMAGE_PATH+"/gitlab-logo.svg",f.style.width="32px"):e==b.notion?(n=mxResources.get("notion"),f.src=IMAGE_PATH+"/notion-logo-white.svg",f.style.width="32px"):e==b.trello&&(n=mxResources.get("trello"),f.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[n]));var l=document.createElement("input");l.setAttribute("type","checkbox");n=mxUtils.button(mxResources.get("authorize"),function(){c(l.checked)});
-n.insertBefore(f,n.firstChild);n.style.marginTop="6px";n.className="geBigButton";n.style.fontSize="18px";n.style.padding="14px";g.appendChild(k);g.appendChild(b);g.appendChild(n);d&&(d=document.createElement("p"),d.style.marginTop="20px",d.appendChild(l),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberMe")),d.appendChild(k),g.appendChild(d),l.checked=!0,l.defaultChecked=!0,mxEvent.addListener(k,"click",function(b){l.checked=!l.checked;mxEvent.consume(b)}));this.container=
-g},MoreShapesDialog=function(b,e,d){d=null!=d?d:b.sidebar.entries;var c=document.createElement("div"),g=[];if(null!=b.sidebar.customEntries)for(var k=0;k<b.sidebar.customEntries.length;k++){for(var n=b.sidebar.customEntries[k],f={title:b.getResource(n.title),entries:[]},l=0;l<n.entries.length;l++){var m=n.entries[l];f.entries.push({id:m.id,title:b.getResource(m.title),desc:b.getResource(m.desc),image:m.preview})}g.push(f)}for(k=0;k<d.length;k++)if(null==b.sidebar.enabledLibraries)g.push(d[k]);else{f=
-{title:d[k].title,entries:[]};for(l=0;l<d[k].entries.length;l++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,d[k].entries[l].id)&&f.entries.push(d[k].entries[l]);0<f.entries.length&&g.push(f)}d=g;if(e){k=mxUtils.bind(this,function(c){for(var f=0;f<c.length;f++)(function(c){var d=v.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,c.title);p.appendChild(d);for(var e=0;e<c.entries.length;e++)(function(c){var d=
-v.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.setAttribute("title",c.title+" ("+c.id+")");var l=document.createElement("input");l.setAttribute("type","checkbox");l.checked=b.sidebar.isEntryVisible(c.id);l.defaultChecked=l.checked;d.appendChild(l);mxUtils.write(d," "+c.title);p.appendChild(d);var m=function(b){if(null==b||"INPUT"!=mxEvent.getSource(b).nodeName){q.style.textAlign="center";
+this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",f);this.destroy=function(){mxEvent.removeListener(window,"resize",f);this.window.destroy()}},TagsWindow=function(b,e,d,c,k){var g=b.editor.graph,m=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(c,f){if(g.isEnabled()){var d=new FilenameDialog(b,"",mxResources.get("add"),function(d){b.hideDialog();if(null!=d&&0<d.length){d=d.split(" ");for(var e=[],l=0;l<d.length;l++){var n=
+mxUtils.trim(d[l]);""!=n&&0>mxUtils.indexOf(c,n)&&e.push(n)}0<e.length&&(g.isSelectionEmpty()?f(c.concat(e)):g.addTagsForCells(g.getSelectionCells(),e))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(d.container,300,80,!0,!0);d.init()}}),f=m.div;this.window=new mxWindow(mxResources.get("tags"),f,e,d,c,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
+this.window.addListener("show",mxUtils.bind(this,function(){m.refresh();this.window.fit()}));this.window.setLocation=function(b,c){var f=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,f-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,
+arguments)};var l=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",l);this.destroy=function(){mxEvent.removeListener(window,"resize",l);this.window.destroy()}},AuthDialog=function(b,e,d,c){var k=document.createElement("div");k.style.textAlign="center";var g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("authorizationRequired"));
+var m="Unknown",f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.marginRight="10px";e==b.drive?(m=mxResources.get("googleDrive"),f.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(m=mxResources.get("dropbox"),f.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(m=mxResources.get("oneDrive"),f.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(m=mxResources.get("github"),f.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?
+(m=mxResources.get("gitlab"),f.src=IMAGE_PATH+"/gitlab-logo.svg",f.style.width="32px"):e==b.notion?(m=mxResources.get("notion"),f.src=IMAGE_PATH+"/notion-logo-white.svg",f.style.width="32px"):e==b.trello&&(m=mxResources.get("trello"),f.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[m]));var l=document.createElement("input");l.setAttribute("type","checkbox");m=mxUtils.button(mxResources.get("authorize"),function(){c(l.checked)});
+m.insertBefore(f,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";m.style.fontSize="18px";m.style.padding="14px";k.appendChild(g);k.appendChild(b);k.appendChild(m);d&&(d=document.createElement("p"),d.style.marginTop="20px",d.appendChild(l),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberMe")),d.appendChild(g),k.appendChild(d),l.checked=!0,l.defaultChecked=!0,mxEvent.addListener(g,"click",function(b){l.checked=!l.checked;mxEvent.consume(b)}));this.container=
+k},MoreShapesDialog=function(b,e,d){d=null!=d?d:b.sidebar.entries;var c=document.createElement("div"),k=[];if(null!=b.sidebar.customEntries)for(var g=0;g<b.sidebar.customEntries.length;g++){for(var m=b.sidebar.customEntries[g],f={title:b.getResource(m.title),entries:[]},l=0;l<m.entries.length;l++){var n=m.entries[l];f.entries.push({id:n.id,title:b.getResource(n.title),desc:b.getResource(n.desc),image:n.preview})}k.push(f)}for(g=0;g<d.length;g++)if(null==b.sidebar.enabledLibraries)k.push(d[g]);else{f=
+{title:d[g].title,entries:[]};for(l=0;l<d[g].entries.length;l++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,d[g].entries[l].id)&&f.entries.push(d[g].entries[l]);0<f.entries.length&&k.push(f)}d=k;if(e){g=mxUtils.bind(this,function(c){for(var f=0;f<c.length;f++)(function(c){var d=v.cloneNode(!1);d.style.fontWeight="bold";d.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";d.style.padding="6px 0px 6px 20px";mxUtils.write(d,c.title);p.appendChild(d);for(var e=0;e<c.entries.length;e++)(function(c){var d=
+v.cloneNode(!1);d.style.cursor="pointer";d.style.padding="4px 0px 4px 20px";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.setAttribute("title",c.title+" ("+c.id+")");var l=document.createElement("input");l.setAttribute("type","checkbox");l.checked=b.sidebar.isEntryVisible(c.id);l.defaultChecked=l.checked;d.appendChild(l);mxUtils.write(d," "+c.title);p.appendChild(d);var n=function(b){if(null==b||"INPUT"!=mxEvent.getSource(b).nodeName){q.style.textAlign="center";
q.style.padding="0px";q.style.color="";q.innerHTML="";if(null!=c.desc){var f=document.createElement("pre");f.style.boxSizing="border-box";f.style.fontFamily="inherit";f.style.margin="20px";f.style.right="0px";f.style.textAlign="left";mxUtils.write(f,c.desc);q.appendChild(f)}null!=c.imageCallback?c.imageCallback(q):null!=c.image?q.innerHTML+='<img border="0" src="'+c.image+'"/>':null==c.desc&&(q.style.padding="20px",q.style.color="rgb(179, 179, 179)",mxUtils.write(q,mxResources.get("noPreview")));
-null!=t&&(t.style.backgroundColor="");t=d;t.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=b&&mxEvent.consume(b)}};mxEvent.addListener(d,"click",m);mxEvent.addListener(d,"dblclick",function(b){l.checked=!l.checked;mxEvent.consume(b)});u.push(function(){return l.checked?c.id:null});0==f&&0==e&&m()})(c.entries[e])})(c[f])});l=document.createElement("div");l.className="geDialogTitle";mxUtils.write(l,mxResources.get("shapes"));l.style.position="absolute";l.style.top="0px";l.style.left=
+null!=t&&(t.style.backgroundColor="");t=d;t.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=b&&mxEvent.consume(b)}};mxEvent.addListener(d,"click",n);mxEvent.addListener(d,"dblclick",function(b){l.checked=!l.checked;mxEvent.consume(b)});u.push(function(){return l.checked?c.id:null});0==f&&0==e&&n()})(c.entries[e])})(c[f])});l=document.createElement("div");l.className="geDialogTitle";mxUtils.write(l,mxResources.get("shapes"));l.style.position="absolute";l.style.top="0px";l.style.left=
"0px";l.style.lineHeight="40px";l.style.height="40px";l.style.right="0px";var p=document.createElement("div"),q=document.createElement("div");p.style.position="absolute";p.style.top="40px";p.style.left="0px";p.style.width="202px";p.style.bottom="60px";p.style.overflow="auto";q.style.position="absolute";q.style.left="202px";q.style.right="0px";q.style.top="40px";q.style.bottom="60px";q.style.overflow="auto";q.style.borderLeft="1px solid rgb(211, 211, 211)";q.style.textAlign="center";var t=null,u=[],
-v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";k(d);c.style.padding="30px";c.appendChild(l);c.appendChild(p);c.appendChild(q);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";var x=document.createElement("input");x.setAttribute("type","checkbox");if(isLocalStorage||
-mxClient.IS_CHROMEAPP)k=document.createElement("span"),k.style.paddingRight="20px",k.appendChild(x),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),x.checked=!0,x.defaultChecked=!0,mxEvent.addListener(k,"click",function(b){mxEvent.getSource(b)!=x&&(x.checked=!x.checked,mxEvent.consume(b))}),d.appendChild(k);k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var c=[],f=0;f<u.length;f++){var d=
-u[f].apply(this,arguments);null!=d&&c.push(d)}b.sidebar.showEntries(c.join(";"),x.checked,!0)});l.className="geBtn gePrimaryBtn"}else{var A=document.createElement("table"),k=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";l=document.createElement("tr");A.style.width="100%";e=document.createElement("td");var g=document.createElement("td"),n=document.createElement("td"),z=mxUtils.bind(this,function(c,f,d){var e=document.createElement("input");e.type="checkbox";A.appendChild(e);
-e.checked=b.sidebar.isEntryVisible(d);var l=document.createElement("span");mxUtils.write(l,f);f=document.createElement("div");f.style.display="block";f.appendChild(e);f.appendChild(l);mxEvent.addListener(l,"click",function(b){e.checked=!e.checked;mxEvent.consume(b)});c.appendChild(f);return function(){return e.checked?d:null}});l.appendChild(e);l.appendChild(g);l.appendChild(n);k.appendChild(l);A.appendChild(k);for(var u=[],y=0,k=0;k<d.length;k++)for(l=0;l<d[k].entries.length;l++)y++;for(var B=[e,
-g,n],C=0,k=0;k<d.length;k++)(function(b){for(var c=0;c<b.entries.length;c++){var f=b.entries[c];u.push(z(B[Math.floor(C/(y/3))],f.title,f.id));C++}})(d[k]);c.appendChild(A);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";x=document.createElement("input");isLocalStorage&&(x.setAttribute("type","checkbox"),x.checked=!0,x.defaultChecked=!0,d.appendChild(x),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),d.appendChild(k),
-mxEvent.addListener(k,"click",function(b){x.checked=!x.checked;mxEvent.consume(b)}));c.appendChild(d);k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],f=0;f<u.length;f++){var d=u[f].apply(this,arguments);null!=d&&c.push(d)}b.sidebar.showEntries(0<c.length?c.join(";"):"",x.checked);b.hideDialog()});l.className="geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";
-d.style.textAlign="right"}b.editor.cancelFirst?(d.appendChild(k),d.appendChild(l)):(d.appendChild(l),d.appendChild(k));c.appendChild(d);this.container=c},PluginsDialog=function(b,e,d){function c(){if(0==n.length)k.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{k.innerHTML="";for(var f=0;f<n.length;f++){var e=document.createElement("span");e.style.whiteSpace="nowrap";var l=document.createElement("span");l.className="geSprite geSprite-delete";l.style.position="relative";l.style.cursor=
-"pointer";l.style.top="5px";l.style.marginRight="4px";l.style.display="inline-block";e.appendChild(l);mxUtils.write(e,n[f]);k.appendChild(e);mxUtils.br(k);mxEvent.addListener(l,"click",function(f){return function(){b.confirm(mxResources.get("delete")+' "'+n[f]+'"?',function(){null!=d&&d(n[f]);n.splice(f,1);c()})}}(f))}}}var g=document.createElement("div"),k=document.createElement("div");k.style.height="120px";k.style.overflow="auto";var n=mxSettings.getPlugins().slice();g.appendChild(k);c();var f=
-mxUtils.button(mxResources.get("add")+"...",null!=e?function(){e(function(b){b&&0>mxUtils.indexOf(n,b)&&n.push(b);c()})}:function(){var f=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("builtinPlugins")+": ");f.appendChild(d);var e=document.createElement("select");e.style.width="150px";for(d=0;d<App.publicPlugin.length;d++){var l=document.createElement("option");mxUtils.write(l,App.publicPlugin[d]);l.value=App.publicPlugin[d];
-e.appendChild(l)}f.appendChild(e);mxUtils.br(f);mxUtils.br(f);d=mxUtils.button(mxResources.get("custom")+"...",function(){var f=new FilenameDialog(b,"",mxResources.get("add"),function(f){b.hideDialog();if(null!=f&&0<f.length){f=f.split(";");for(var d=0;d<f.length;d++){var e=f[d],l=App.pluginRegistry[e];null!=l&&(e=l);0<e.length&&0>mxUtils.indexOf(n,e)&&n.push(e)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(f.container,300,80,!0,!0);f.init()});d.className="geBtn";
-f=new CustomDialog(b,f,mxUtils.bind(this,function(){var b=App.pluginRegistry[e.value];0>mxUtils.indexOf(n,b)&&(n.push(b),c())}),null,null,null,d);b.showDialog(f.container,300,100,!0,!0)});f.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";var m=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(n);mxSettings.save();b.hideDialog();b.alert(mxResources.get("restartForChangeRequired"))});m.className="geBtn gePrimaryBtn";
-var p=document.createElement("div");p.style.marginTop="14px";p.style.textAlign="right";var q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});q.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");p.appendChild(q);b.editor.cancelFirst?(p.appendChild(l),p.appendChild(f),p.appendChild(m)):(p.appendChild(f),p.appendChild(m),p.appendChild(l));g.appendChild(p);this.container=g},CropImageDialog=function(b,e,d){function c(b){null!=
-n&&n.destroy();n=b?new Croppie(k,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(k,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});n.bind({url:e})}var g=document.createElement("div"),k=document.createElement("div");k.style.width="300px";k.style.height="300px";g.appendChild(k);var n=null;this.init=function(){c()};var f=document.createElement("input");f.setAttribute("type",
-"checkbox");f.setAttribute("id","croppieCircle");f.style.margin="5px";g.appendChild(f);var l=document.createElement("label");l.setAttribute("for","croppieCircle");mxUtils.write(l,mxResources.get("circle"));g.appendChild(l);var m,p,q,t,l=document.createElement("div");m=document.createElement("button");p=document.createElement("button");l.appendChild(m);l.appendChild(p);q=document.createElement("i");t=document.createElement("i");m.appendChild(q);p.appendChild(t);l.className="cr-rotate-controls";l.style["float"]=
-"right";l.style.position="inherit";m.className="cr-rotate-l";p.className="cr-rotate-r";g.appendChild(l);m.addEventListener("click",function(){n.rotate(-90)});p.addEventListener("click",function(){n.rotate(90)});mxEvent.addListener(f,"change",function(){c(this.checked)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){n.result({type:"base64",size:"original"}).then(function(c){d(c);b.hideDialog()})});l.className=
-"geBtn gePrimaryBtn";m=document.createElement("div");m.style.marginTop="20px";m.style.textAlign="right";b.editor.cancelFirst?(m.appendChild(f),m.appendChild(l)):(m.appendChild(l),m.appendChild(f));g.appendChild(m);this.container=g},EditGeometryDialog=function(b,e){var d=b.editor.graph,c=1==e.length?d.getCellGeometry(e[0]):null,g=document.createElement("div"),k=document.createElement("table"),n=document.createElement("tbody"),f=document.createElement("tr"),l=document.createElement("td"),m=document.createElement("td");
-k.style.paddingLeft="6px";mxUtils.write(l,mxResources.get("relative")+":");var p=document.createElement("input");p.setAttribute("type","checkbox");null!=c&&c.relative&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);this.init=function(){p.focus()};m.appendChild(p);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("left")+":");var q=document.createElement("input");
-q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.x:"";m.appendChild(q);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("top")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.y:"";m.appendChild(t);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");
-m=document.createElement("td");mxUtils.write(l,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c&&null!=c.offset?c.offset.x:"";m.appendChild(u);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";
-v.value=null!=c&&null!=c.offset?c.offset.y:"";m.appendChild(v);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("width")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=c?c.width:"";m.appendChild(x);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=
-document.createElement("td");mxUtils.write(l,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";m.appendChild(A);f.appendChild(l);f.appendChild(m);n.appendChild(f);f=document.createElement("tr");l=document.createElement("td");m=document.createElement("td");mxUtils.write(l,mxResources.get("rotation")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=
-1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";m.appendChild(z);f.appendChild(l);f.appendChild(m);n.appendChild(f);k.appendChild(n);g.appendChild(k);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<e.length;c++){var f=d.getCellGeometry(e[c]);null!=f&&(f=f.clone(),d.isCellMovable(e[c])&&(f.relative=p.checked,
+v=document.createElement("div");v.style.position="relative";v.style.left="0px";v.style.right="0px";g(d);c.style.padding="30px";c.appendChild(l);c.appendChild(p);c.appendChild(q);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";var x=document.createElement("input");x.setAttribute("type","checkbox");if(isLocalStorage||
+mxClient.IS_CHROMEAPP)g=document.createElement("span"),g.style.paddingRight="20px",g.appendChild(x),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),x.checked=!0,x.defaultChecked=!0,mxEvent.addListener(g,"click",function(b){mxEvent.getSource(b)!=x&&(x.checked=!x.checked,mxEvent.consume(b))}),d.appendChild(g);g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var c=[],f=0;f<u.length;f++){var d=
+u[f].apply(this,arguments);null!=d&&c.push(d)}b.sidebar.showEntries(c.join(";"),x.checked,!0)});l.className="geBtn gePrimaryBtn"}else{var A=document.createElement("table"),g=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";l=document.createElement("tr");A.style.width="100%";e=document.createElement("td");var k=document.createElement("td"),m=document.createElement("td"),z=mxUtils.bind(this,function(c,f,d){var e=document.createElement("input");e.type="checkbox";A.appendChild(e);
+e.checked=b.sidebar.isEntryVisible(d);var l=document.createElement("span");mxUtils.write(l,f);f=document.createElement("div");f.style.display="block";f.appendChild(e);f.appendChild(l);mxEvent.addListener(l,"click",function(b){e.checked=!e.checked;mxEvent.consume(b)});c.appendChild(f);return function(){return e.checked?d:null}});l.appendChild(e);l.appendChild(k);l.appendChild(m);g.appendChild(l);A.appendChild(g);for(var u=[],y=0,g=0;g<d.length;g++)for(l=0;l<d[g].entries.length;l++)y++;for(var B=[e,
+k,m],C=0,g=0;g<d.length;g++)(function(b){for(var c=0;c<b.entries.length;c++){var f=b.entries[c];u.push(z(B[Math.floor(C/(y/3))],f.title,f.id));C++}})(d[g]);c.appendChild(A);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";x=document.createElement("input");isLocalStorage&&(x.setAttribute("type","checkbox"),x.checked=!0,x.defaultChecked=!0,d.appendChild(x),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),d.appendChild(g),
+mxEvent.addListener(g,"click",function(b){x.checked=!x.checked;mxEvent.consume(b)}));c.appendChild(d);g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],f=0;f<u.length;f++){var d=u[f].apply(this,arguments);null!=d&&c.push(d)}b.sidebar.showEntries(0<c.length?c.join(";"):"",x.checked);b.hideDialog()});l.className="geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";
+d.style.textAlign="right"}b.editor.cancelFirst?(d.appendChild(g),d.appendChild(l)):(d.appendChild(l),d.appendChild(g));c.appendChild(d);this.container=c},PluginsDialog=function(b,e,d){function c(){if(0==m.length)g.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{g.innerHTML="";for(var f=0;f<m.length;f++){var e=document.createElement("span");e.style.whiteSpace="nowrap";var l=document.createElement("span");l.className="geSprite geSprite-delete";l.style.position="relative";l.style.cursor=
+"pointer";l.style.top="5px";l.style.marginRight="4px";l.style.display="inline-block";e.appendChild(l);mxUtils.write(e,m[f]);g.appendChild(e);mxUtils.br(g);mxEvent.addListener(l,"click",function(f){return function(){b.confirm(mxResources.get("delete")+' "'+m[f]+'"?',function(){null!=d&&d(m[f]);m.splice(f,1);c()})}}(f))}}}var k=document.createElement("div"),g=document.createElement("div");g.style.height="120px";g.style.overflow="auto";var m=mxSettings.getPlugins().slice();k.appendChild(g);c();var f=
+mxUtils.button(mxResources.get("add")+"...",null!=e?function(){e(function(b){b&&0>mxUtils.indexOf(m,b)&&m.push(b);c()})}:function(){var f=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("builtinPlugins")+": ");f.appendChild(d);var e=document.createElement("select");e.style.width="150px";for(d=0;d<App.publicPlugin.length;d++){var l=document.createElement("option");mxUtils.write(l,App.publicPlugin[d]);l.value=App.publicPlugin[d];
+e.appendChild(l)}f.appendChild(e);mxUtils.br(f);mxUtils.br(f);d=mxUtils.button(mxResources.get("custom")+"...",function(){var f=new FilenameDialog(b,"",mxResources.get("add"),function(f){b.hideDialog();if(null!=f&&0<f.length){f=f.split(";");for(var d=0;d<f.length;d++){var e=f[d],l=App.pluginRegistry[e];null!=l&&(e=l);0<e.length&&0>mxUtils.indexOf(m,e)&&m.push(e)}c()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(f.container,300,80,!0,!0);f.init()});d.className="geBtn";
+f=new CustomDialog(b,f,mxUtils.bind(this,function(){var b=App.pluginRegistry[e.value];0>mxUtils.indexOf(m,b)&&(m.push(b),c())}),null,null,null,d);b.showDialog(f.container,300,100,!0,!0)});f.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(m);mxSettings.save();b.hideDialog();b.alert(mxResources.get("restartForChangeRequired"))});n.className="geBtn gePrimaryBtn";
+var p=document.createElement("div");p.style.marginTop="14px";p.style.textAlign="right";var q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});q.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");p.appendChild(q);b.editor.cancelFirst?(p.appendChild(l),p.appendChild(f),p.appendChild(n)):(p.appendChild(f),p.appendChild(n),p.appendChild(l));k.appendChild(p);this.container=k},CropImageDialog=function(b,e,d){function c(b){null!=
+m&&m.destroy();m=b?new Croppie(g,{viewport:{width:150,height:150,type:"circle"},enableExif:!0,showZoomer:!1,enableResize:!1,enableOrientation:!0}):new Croppie(g,{viewport:{width:150,height:150,type:"square"},enableExif:!0,showZoomer:!1,enableResize:!0,enableOrientation:!0});m.bind({url:e})}var k=document.createElement("div"),g=document.createElement("div");g.style.width="300px";g.style.height="300px";k.appendChild(g);var m=null;this.init=function(){c()};var f=document.createElement("input");f.setAttribute("type",
+"checkbox");f.setAttribute("id","croppieCircle");f.style.margin="5px";k.appendChild(f);var l=document.createElement("label");l.setAttribute("for","croppieCircle");mxUtils.write(l,mxResources.get("circle"));k.appendChild(l);var n,p,q,t,l=document.createElement("div");n=document.createElement("button");p=document.createElement("button");l.appendChild(n);l.appendChild(p);q=document.createElement("i");t=document.createElement("i");n.appendChild(q);p.appendChild(t);l.className="cr-rotate-controls";l.style["float"]=
+"right";l.style.position="inherit";n.className="cr-rotate-l";p.className="cr-rotate-r";k.appendChild(l);n.addEventListener("click",function(){m.rotate(-90)});p.addEventListener("click",function(){m.rotate(90)});mxEvent.addListener(f,"change",function(){c(this.checked)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){m.result({type:"base64",size:"original"}).then(function(c){d(c);b.hideDialog()})});l.className=
+"geBtn gePrimaryBtn";n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(f),n.appendChild(l)):(n.appendChild(l),n.appendChild(f));k.appendChild(n);this.container=k},EditGeometryDialog=function(b,e){var d=b.editor.graph,c=1==e.length?d.getCellGeometry(e[0]):null,k=document.createElement("div"),g=document.createElement("table"),m=document.createElement("tbody"),f=document.createElement("tr"),l=document.createElement("td"),n=document.createElement("td");
+g.style.paddingLeft="6px";mxUtils.write(l,mxResources.get("relative")+":");var p=document.createElement("input");p.setAttribute("type","checkbox");null!=c&&c.relative&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);this.init=function(){p.focus()};n.appendChild(p);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("left")+":");var q=document.createElement("input");
+q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.x:"";n.appendChild(q);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("top")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.y:"";n.appendChild(t);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");
+n=document.createElement("td");mxUtils.write(l,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c&&null!=c.offset?c.offset.x:"";n.appendChild(u);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("dy")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";
+v.value=null!=c&&null!=c.offset?c.offset.y:"";n.appendChild(v);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("width")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=c?c.width:"";n.appendChild(x);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");n=
+document.createElement("td");mxUtils.write(l,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";n.appendChild(A);f.appendChild(l);f.appendChild(n);m.appendChild(f);f=document.createElement("tr");l=document.createElement("td");n=document.createElement("td");mxUtils.write(l,mxResources.get("rotation")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=
+1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";n.appendChild(z);f.appendChild(l);f.appendChild(n);m.appendChild(f);g.appendChild(m);k.appendChild(g);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<e.length;c++){var f=d.getCellGeometry(e[c]);null!=f&&(f=f.clone(),d.isCellMovable(e[c])&&(f.relative=p.checked,
0<mxUtils.trim(q.value).length&&(f.x=Number(q.value)),0<mxUtils.trim(t.value).length&&(f.y=Number(t.value)),0<mxUtils.trim(u.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.x=Number(u.value)),0<mxUtils.trim(v.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(v.value))),d.isCellResizable(e[c])&&(0<mxUtils.trim(x.value).length&&(f.width=Number(x.value)),0<mxUtils.trim(A.value).length&&(f.height=Number(A.value))),d.getModel().setGeometry(e[c],f));0<mxUtils.trim(z.value).length&&
-d.setCellStyles(mxConstants.STYLE_ROTATION,Number(z.value),[e[c]])}}finally{d.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(b){13==b.keyCode&&y.click()});k=document.createElement("div");k.style.marginTop="20px";k.style.textAlign="right";b.editor.cancelFirst?(k.appendChild(c),k.appendChild(y)):(k.appendChild(y),k.appendChild(c));g.appendChild(k);this.container=g},LibraryDialog=function(b,e,d,c,g,k){function n(b){for(b=document.elementFromPoint(b.clientX,
-b.clientY);null!=b&&b.parentNode!=u;)b=b.parentNode;var c=null;if(null!=b)for(var f=u.firstChild,c=0;null!=f&&f!=b;)f=f.nextSibling,c++;return c}function f(c,d,e,l,m,g,k,q,t){try{if(b.spinner.stop(),null==d||"image/"==d.substring(0,6))if(null==c&&null!=k||null==x[c]){var K=function(){E.innerHTML="";E.style.cursor="pointer";E.style.whiteSpace="nowrap";E.style.textOverflow="ellipsis";mxUtils.write(E,null!=H.title&&0<H.title.length?H.title:mxResources.get("untitled"));E.style.color=null==H.title||0==
-H.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var T=m,F=g;if(m>b.maxImageSize||g>b.maxImageSize){var O=Math.min(1,Math.min(b.maxImageSize/Math.max(1,m)),b.maxImageSize/Math.max(1,g));m*=O;g*=O}T>F?(F=Math.round(100*F/T),T=100):(T=Math.round(100*T/F),F=100);var z=document.createElement("div");z.setAttribute("draggable","true");z.style.display="inline-block";z.style.position="relative";z.style.padding="0 12px";z.style.cursor="move";mxUtils.setPrefixedStyle(z.style,"transition",
-"transform .1s ease-in-out");if(null!=c){var G=document.createElement("img");G.setAttribute("src",B.convert(c));G.style.width=T+"px";G.style.height=F+"px";G.style.margin="10px";G.style.paddingBottom=Math.floor((100-F)/2)+"px";G.style.paddingLeft=Math.floor((100-T)/2)+"px";z.appendChild(G)}else if(null!=k){var M=b.stringToCells(Graph.decompress(k.xml));0<M.length&&(b.sidebar.createThumb(M,100,100,z,null,!0,!1),z.firstChild.style.display="inline-block",z.firstChild.style.cursor="")}var D=document.createElement("img");
+d.setCellStyles(mxConstants.STYLE_ROTATION,Number(z.value),[e[c]])}}finally{d.getModel().endUpdate()}});y.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(b){13==b.keyCode&&y.click()});g=document.createElement("div");g.style.marginTop="20px";g.style.textAlign="right";b.editor.cancelFirst?(g.appendChild(c),g.appendChild(y)):(g.appendChild(y),g.appendChild(c));k.appendChild(g);this.container=k},LibraryDialog=function(b,e,d,c,k,g){function m(b){for(b=document.elementFromPoint(b.clientX,
+b.clientY);null!=b&&b.parentNode!=u;)b=b.parentNode;var c=null;if(null!=b)for(var f=u.firstChild,c=0;null!=f&&f!=b;)f=f.nextSibling,c++;return c}function f(c,d,e,l,n,k,g,q,t){try{if(b.spinner.stop(),null==d||"image/"==d.substring(0,6))if(null==c&&null!=g||null==x[c]){var K=function(){F.innerHTML="";F.style.cursor="pointer";F.style.whiteSpace="nowrap";F.style.textOverflow="ellipsis";mxUtils.write(F,null!=L.title&&0<L.title.length?L.title:mxResources.get("untitled"));F.style.color=null==L.title||0==
+L.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var T=n,E=k;if(n>b.maxImageSize||k>b.maxImageSize){var O=Math.min(1,Math.min(b.maxImageSize/Math.max(1,n)),b.maxImageSize/Math.max(1,k));n*=O;k*=O}T>E?(E=Math.round(100*E/T),T=100):(T=Math.round(100*T/E),E=100);var z=document.createElement("div");z.setAttribute("draggable","true");z.style.display="inline-block";z.style.position="relative";z.style.padding="0 12px";z.style.cursor="move";mxUtils.setPrefixedStyle(z.style,"transition",
+"transform .1s ease-in-out");if(null!=c){var H=document.createElement("img");H.setAttribute("src",B.convert(c));H.style.width=T+"px";H.style.height=E+"px";H.style.margin="10px";H.style.paddingBottom=Math.floor((100-E)/2)+"px";H.style.paddingLeft=Math.floor((100-T)/2)+"px";z.appendChild(H)}else if(null!=g){var M=b.stringToCells(Graph.decompress(g.xml));0<M.length&&(b.sidebar.createThumb(M,100,100,z,null,!0,!1),z.firstChild.style.display="inline-block",z.firstChild.style.cursor="")}var D=document.createElement("img");
D.setAttribute("src",Editor.closeBlackImage);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(b){mxEvent.consume(b)});(function(b,c,f){mxEvent.addListener(D,"click",function(d){x[c]=null;for(var e=0;e<p.length;e++)if(null!=p[e].data&&p[e].data==c||null!=p[e].xml&&null!=f&&p[e].xml==
-f.xml){p.splice(e,1);break}z.parentNode.removeChild(b);0==p.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(D,"dblclick",function(b){mxEvent.consume(b)})})(z,c,k);z.appendChild(D);z.style.marginBottom="30px";var E=document.createElement("div");E.style.position="absolute";E.style.boxSizing="border-box";E.style.bottom="-18px";E.style.left="10px";E.style.right="10px";E.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":
-"#ffffff";E.style.overflow="hidden";E.style.textAlign="center";var H=null;null!=c?(H={data:c,w:m,h:g,title:t},null!=q&&(H.aspect=q),x[c]=G,p.push(H)):null!=k&&(k.aspect="fixed",p.push(k),H=k);mxEvent.addListener(E,"keydown",function(b){13==b.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(b))});K();z.appendChild(E);mxEvent.addListener(E,"mousedown",function(b){"true"!=E.getAttribute("contentEditable")&&mxEvent.consume(b)});M=function(c){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||
-9<document.documentMode)){var f=new FilenameDialog(b,H.title||"",mxResources.get("ok"),function(b){null!=b&&(H.title=b,K())},mxResources.get("enterValue"));b.showDialog(f.container,300,80,!0,!0);f.init();mxEvent.consume(c)}else if("true"!=E.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==H.title||0==H.title.length)E.innerHTML="";E.style.textOverflow="";E.style.whiteSpace="";E.style.cursor="text";E.style.color="";E.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(E.style,
-"user-select","text");E.focus();document.execCommand("selectAll",!1,null);y=function(){E.removeAttribute("contentEditable");E.style.cursor="pointer";H.title=E.innerHTML;K()};mxEvent.consume(c)}};mxEvent.addListener(E,"click",M);mxEvent.addListener(z,"dblclick",M);u.appendChild(z);mxEvent.addListener(z,"dragstart",function(b){null==c&&null!=k&&(D.style.visibility="hidden",E.style.visibility="hidden");mxClient.IS_FF&&null!=k.xml&&b.dataTransfer.setData("Text",k.xml);A=n(b);mxClient.IS_GC&&(z.style.opacity=
-"0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(z.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(z,30);D.style.visibility="";E.style.visibility=""},0)});mxEvent.addListener(z,"dragend",function(b){"hidden"==D.style.visibility&&(D.style.visibility="",E.style.visibility="");A=null;mxUtils.setOpacity(z,100);mxUtils.setPrefixedStyle(z.style,"transform",null)})}else C||(C=!0,b.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(T=mxUtils.parseXml(c),"mxlibrary"==
-T.documentElement.nodeName){F=JSON.parse(mxUtils.getTextContent(T.documentElement));if(null!=F&&0<F.length)for(var L=0;L<F.length;L++)null!=F[L].xml?f(null,null,0,0,0,0,F[L]):f(F[L].data,null,0,0,F[L].w,F[L].h,null,"fixed",F[L].title);m=!0}else if("mxfile"==T.documentElement.nodeName){for(var J=T.documentElement.getElementsByTagName("diagram"),L=0;L<J.length;L++){var F=mxUtils.getTextContent(J[L]),M=b.stringToCells(Graph.decompress(F)),P=b.editor.graph.getBoundingBoxFromGeometry(M);f(null,null,0,
-0,0,0,{xml:F,w:P.width,h:P.height})}m=!0}}catch(N){}m||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(N){}return null}function l(b){b.dataTransfer.dropEffect=null!=A?"move":"copy";b.stopPropagation();b.preventDefault()}function m(c){c.stopPropagation();c.preventDefault();C=!1;z=n(c);if(null!=A)null!=z&&z<u.children.length?(p.splice(z>A?z-1:z,0,p.splice(A,1)[0]),u.insertBefore(u.children[A],u.children[z])):(p.push(p.splice(A,1)[0]),u.appendChild(u.children[A]));
+f.xml){p.splice(e,1);break}z.parentNode.removeChild(b);0==p.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(d)});mxEvent.addListener(D,"dblclick",function(b){mxEvent.consume(b)})})(z,c,g);z.appendChild(D);z.style.marginBottom="30px";var F=document.createElement("div");F.style.position="absolute";F.style.boxSizing="border-box";F.style.bottom="-18px";F.style.left="10px";F.style.right="10px";F.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":
+"#ffffff";F.style.overflow="hidden";F.style.textAlign="center";var L=null;null!=c?(L={data:c,w:n,h:k,title:t},null!=q&&(L.aspect=q),x[c]=H,p.push(L)):null!=g&&(g.aspect="fixed",p.push(g),L=g);mxEvent.addListener(F,"keydown",function(b){13==b.keyCode&&null!=y&&(y(),y=null,mxEvent.consume(b))});K();z.appendChild(F);mxEvent.addListener(F,"mousedown",function(b){"true"!=F.getAttribute("contentEditable")&&mxEvent.consume(b)});M=function(c){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||
+9<document.documentMode)){var f=new FilenameDialog(b,L.title||"",mxResources.get("ok"),function(b){null!=b&&(L.title=b,K())},mxResources.get("enterValue"));b.showDialog(f.container,300,80,!0,!0);f.init();mxEvent.consume(c)}else if("true"!=F.getAttribute("contentEditable")){null!=y&&(y(),y=null);if(null==L.title||0==L.title.length)F.innerHTML="";F.style.textOverflow="";F.style.whiteSpace="";F.style.cursor="text";F.style.color="";F.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(F.style,
+"user-select","text");F.focus();document.execCommand("selectAll",!1,null);y=function(){F.removeAttribute("contentEditable");F.style.cursor="pointer";L.title=F.innerHTML;K()};mxEvent.consume(c)}};mxEvent.addListener(F,"click",M);mxEvent.addListener(z,"dblclick",M);u.appendChild(z);mxEvent.addListener(z,"dragstart",function(b){null==c&&null!=g&&(D.style.visibility="hidden",F.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&b.dataTransfer.setData("Text",g.xml);A=m(b);mxClient.IS_GC&&(z.style.opacity=
+"0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(z.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(z,30);D.style.visibility="";F.style.visibility=""},0)});mxEvent.addListener(z,"dragend",function(b){"hidden"==D.style.visibility&&(D.style.visibility="",F.style.visibility="");A=null;mxUtils.setOpacity(z,100);mxUtils.setPrefixedStyle(z.style,"transform",null)})}else C||(C=!0,b.handleError({message:mxResources.get("fileExists")}));else{n=!1;try{if(T=mxUtils.parseXml(c),"mxlibrary"==
+T.documentElement.nodeName){E=JSON.parse(mxUtils.getTextContent(T.documentElement));if(null!=E&&0<E.length)for(var G=0;G<E.length;G++)null!=E[G].xml?f(null,null,0,0,0,0,E[G]):f(E[G].data,null,0,0,E[G].w,E[G].h,null,"fixed",E[G].title);n=!0}else if("mxfile"==T.documentElement.nodeName){for(var J=T.documentElement.getElementsByTagName("diagram"),G=0;G<J.length;G++){var E=mxUtils.getTextContent(J[G]),M=b.stringToCells(Graph.decompress(E)),P=b.editor.graph.getBoundingBoxFromGeometry(M);f(null,null,0,
+0,0,0,{xml:E,w:P.width,h:P.height})}n=!0}}catch(N){}n||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(N){}return null}function l(b){b.dataTransfer.dropEffect=null!=A?"move":"copy";b.stopPropagation();b.preventDefault()}function n(c){c.stopPropagation();c.preventDefault();C=!1;z=m(c);if(null!=A)null!=z&&z<u.children.length?(p.splice(z>A?z-1:z,0,p.splice(A,1)[0]),u.insertBefore(u.children[A],u.children[z])):(p.push(p.splice(A,1)[0]),u.appendChild(u.children[A]));
else if(0<c.dataTransfer.files.length)b.importFiles(c.dataTransfer.files,0,0,b.maxImageSize,D(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var d=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(d)||/(\.png)($|\?)/i.test(d)||/(\.gif)($|\?)/i.test(d)||/(\.svg)($|\?)/i.test(d))&&b.loadImage(d,function(b){f(d,null,0,0,b.width,b.height);u.scrollTop=u.scrollHeight})}c.stopPropagation();c.preventDefault()}var p=[];d=document.createElement("div");
-d.style.height="100%";var q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.height="40px";d.appendChild(q);mxUtils.write(q,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var t=document.createElement("input");t.setAttribute("value",e);t.style.marginRight="20px";t.style.marginLeft="10px";t.style.width="500px";null==g||g.isRenamable()||t.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())t.focus(),mxClient.IS_GC||mxClient.IS_FF||
+d.style.height="100%";var q=document.createElement("div");q.style.whiteSpace="nowrap";q.style.height="40px";d.appendChild(q);mxUtils.write(q,mxResources.get("filename")+":");null==e&&(e=b.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?t.select():document.execCommand("selectAll",!1,null)};q.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==p.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");
v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));d.appendChild(v);var x={},A=null,z=null,y=null;e=function(b){"true"!=mxEvent.getSource(b).getAttribute("contentEditable")&&null!=y&&(y(),y=null,mxEvent.consume(b))};mxEvent.addListener(u,"mousedown",e);mxEvent.addListener(u,"pointerdown",e);mxEvent.addListener(u,"touchstart",e);var B=new mxUrlConverter,C=
-!1;if(null!=c)for(e=0;e<c.length;e++)q=c[e],f(q.data,null,0,0,q.w,q.h,q,q.aspect,q.title);mxEvent.addListener(u,"dragleave",function(b){v.style.cursor="";for(var c=mxEvent.getSource(b);null!=c;){if(c==u||c==v){b.stopPropagation();b.preventDefault();break}c=c.parentNode}});var D=function(c){return function(d,e,l,m,g,k,p,q,n){null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name))?b.importVisio(n,mxUtils.bind(this,function(b){f(b,e,l,m,g,k,p,"fixed",mxEvent.isAltDown(c)?
-null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))})):null!=n&&!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(d,n.name)?b.parseFile(n,mxUtils.bind(this,function(d){4==d.readyState&&(b.spinner.stop(),200<=d.status&&299>=d.status&&(f(d.responseText,e,l,m,g,k,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(f(d,e,l,m,g,k,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g,
-" ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",l);mxEvent.addListener(u,"drop",m);mxEvent.addListener(v,"dragover",l);mxEvent.addListener(v,"drop",m);d.appendChild(u);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&c.appendChild(e);"draw.io"!=b.getServiceName()||null==g||g.constructor!=DriveLibrary&&
-g.constructor!=GitHubLibrary||(q=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&g.getPublicUrl(function(c){b.spinner.stop();if(null!=c){var f=b.getSearch("create title mode url drive splash state clibs ui".split(" ")),f=f+((0==f.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(c));c=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+f,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(c.container,
-440,240,!0);c.init()}else g.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(g.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),q.className="geBtn",c.appendChild(q));q=mxUtils.button(mxResources.get("export"),function(){var c=b.createLibraryDataFromImages(p),f=t.value;/(\.xml)$/i.test(f)||
-(f+=".xml");b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,"_blank")});q.setAttribute("id","btnDownload");q.className="geBtn";c.appendChild(q);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var E=document.createElement("input");E.setAttribute("multiple","multiple");E.setAttribute("type","file");mxEvent.addListener(E,"change",function(c){C=!1;
-b.importFiles(E.files,0,0,b.maxImageSize,function(b,f,d,e,l,m,g,k,p){null!=E.files&&(D(c)(b,f,d,e,l,m,g,k,p),E.type="",E.type="file",E.value="")});u.scrollTop=u.scrollHeight});E.style.display="none";document.body.appendChild(E);b.libDlgFileInputElt=E}q=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});q.setAttribute("id","btnAddImage");q.className="geBtn";c.appendChild(q)}q=mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),
+!1;if(null!=c)for(e=0;e<c.length;e++)q=c[e],f(q.data,null,0,0,q.w,q.h,q,q.aspect,q.title);mxEvent.addListener(u,"dragleave",function(b){v.style.cursor="";for(var c=mxEvent.getSource(b);null!=c;){if(c==u||c==v){b.stopPropagation();b.preventDefault();break}c=c.parentNode}});var D=function(c){return function(d,e,l,n,k,g,p,q,m){null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m.name)||/(\.vs(x|sx?))($|\?)/i.test(m.name))?b.importVisio(m,mxUtils.bind(this,function(b){f(b,e,l,n,k,g,p,"fixed",mxEvent.isAltDown(c)?
+null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," "))})):null!=m&&!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(d,m.name)?b.parseFile(m,mxUtils.bind(this,function(d){4==d.readyState&&(b.spinner.stop(),200<=d.status&&299>=d.status&&(f(d.responseText,e,l,n,k,g,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(f(d,e,l,n,k,g,p,"fixed",mxEvent.isAltDown(c)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g,
+" ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",l);mxEvent.addListener(u,"drop",n);mxEvent.addListener(v,"dragover",l);mxEvent.addListener(v,"drop",n);d.appendChild(u);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&c.appendChild(e);"draw.io"!=b.getServiceName()||null==k||k.constructor!=DriveLibrary&&
+k.constructor!=GitHubLibrary||(q=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&k.getPublicUrl(function(c){b.spinner.stop();if(null!=c){var f=b.getSearch("create title mode url drive splash state clibs ui".split(" ")),f=f+((0==f.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(c));c=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+f,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(c.container,
+440,240,!0);c.init()}else k.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(k.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),q.className="geBtn",c.appendChild(q));q=mxUtils.button(mxResources.get("export"),function(){var c=b.createLibraryDataFromImages(p),f=t.value;/(\.xml)$/i.test(f)||
+(f+=".xml");b.isLocalFileSave()?b.saveLocalFile(c,f,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(f)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,"_blank")});q.setAttribute("id","btnDownload");q.className="geBtn";c.appendChild(q);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var G=document.createElement("input");G.setAttribute("multiple","multiple");G.setAttribute("type","file");mxEvent.addListener(G,"change",function(c){C=!1;
+b.importFiles(G.files,0,0,b.maxImageSize,function(b,f,d,e,l,n,k,g,p){null!=G.files&&(D(c)(b,f,d,e,l,n,k,g,p),G.type="",G.type="file",G.value="")});u.scrollTop=u.scrollHeight});G.style.display="none";document.body.appendChild(G);b.libDlgFileInputElt=G}q=mxUtils.button(mxResources.get("import"),function(){null!=y&&(y(),y=null);b.libDlgFileInputElt.click()});q.setAttribute("id","btnAddImage");q.className="geBtn";c.appendChild(q)}q=mxUtils.button(mxResources.get("addImages"),function(){null!=y&&(y(),
y=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(b,c,d){C=!1;if(null!=b){if("data:image/"==b.substring(0,11)){var e=b.indexOf(",");0<e&&(b=b.substring(0,e)+";base64,"+b.substring(e+1))}f(b,null,0,0,c,d);u.scrollTop=u.scrollHeight}})});q.setAttribute("id","btnAddImageUrl");q.className="geBtn";c.appendChild(q);this.saveBtnClickHandler=function(c,f,d,e){b.saveLibrary(c,f,d,e)};q=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=y&&(y(),y=null);this.saveBtnClickHandler(t.value,
-p,g,k)}));q.setAttribute("id","btnSave");q.className="geBtn gePrimaryBtn";c.appendChild(q);b.editor.cancelFirst||c.appendChild(e);d.appendChild(c);this.container=d},EditShapeDialog=function(b,e,d,c,g){c=null!=c?c:300;g=null!=g?g:120;var k,n,f=document.createElement("table"),l=document.createElement("tbody");f.style.cellPadding="4px";k=document.createElement("tr");n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";mxUtils.write(n,d);k.appendChild(n);l.appendChild(k);
-k=document.createElement("tr");n=document.createElement("td");var m=document.createElement("textarea");m.style.outline="none";m.style.resize="none";m.style.width=c-200+"px";m.style.height=g+"px";this.textarea=m;this.init=function(){m.focus();m.scrollTop=0};n.appendChild(m);k.appendChild(n);n=document.createElement("td");d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=g+4+"px";d.style.overflow="hidden";
-d.style.marginBottom="16px";mxEvent.disableContextMenu(d);n.appendChild(d);var p=new Graph(d);p.setEnabled(!1);var q=b.editor.graph.cloneCell(e);p.addCells([q]);d=p.view.getState(q);var t="";null!=d.shape&&null!=d.shape.stencil&&(t=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(m,t||"");d=p.getGraphBounds();g=Math.min(160/d.width,(g-40)/d.height);p.view.scaleAndTranslate(g,20/g-d.x,20/g-d.y);k.appendChild(n);l.appendChild(k);k=document.createElement("tr");n=document.createElement("td");
-n.setAttribute("colspan","2");n.style.paddingTop="2px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");b.isOffline()||(g=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),g.className="geBtn",n.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";b.editor.cancelFirst&&n.appendChild(g);var u=function(c,f,d){var e=m.value,l=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(l.documentElement),
-l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&b.hideDialog(),l=!c.model.contains(f),!d||l||e!=t){e=Graph.compress(e);c.getModel().beginUpdate();try{if(l){var g=b.editor.graph.getFreeInsertPoint();f.geometry.x=g.x;f.geometry.y=g.y;c.addCell(f)}c.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[f])}catch(C){throw C;}finally{c.getModel().endUpdate()}l&&
-(c.setSelectionCell(f),c.scrollCellToVisible(f))}};d=mxUtils.button(mxResources.get("preview"),function(){u(p,q,!1)});d.className="geBtn";n.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){u(b.editor.graph,e,!0)});d.className="geBtn gePrimaryBtn";n.appendChild(d);b.editor.cancelFirst||n.appendChild(g);k.appendChild(n);l.appendChild(k);f.appendChild(l);this.container=f},CustomDialog=function(b,e,d,c,g,k,n,f,l,m){var p=document.createElement("div");p.appendChild(e);e=document.createElement("div");
-e.style.marginTop="30px";e.style.textAlign="center";null!=n&&e.appendChild(n);b.isOffline()||null==k||(n=mxUtils.button(mxResources.get("help"),function(){b.openLink(k)}),n.className="geBtn",e.appendChild(n));l=mxUtils.button(l||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});l.className="geBtn";f&&(l.style.display="none");b.editor.cancelFirst&&e.appendChild(l);g=mxUtils.button(g||mxResources.get("ok"),mxUtils.bind(this,function(){m||b.hideDialog(null,null,this.container);if(null!=
-d){var c=d();if("string"===typeof c){b.showError(mxResources.get("error"),c);return}}m&&b.hideDialog(null,null,this.container)}));e.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);p.appendChild(e);this.cancelBtn=l;this.okButton=g;this.container=p},TemplatesDialog=function(b,e,d,c,g,k,n,f,l,m,p,q,t,u,v){function x(b){ua.innerHTML=mxUtils.htmlEntities(b);ua.style.display="block";setTimeout(function(){ua.style.display="none"},4E3)}function A(){null!=R&&(R.style.fontWeight=
-"normal",R.style.textDecoration="none",O=R,R=null)}function z(b,c,f,d,e,l,m){if(-1<b.className.indexOf("geTempDlgRadioBtnActive"))return!1;b.className+=" geTempDlgRadioBtnActive";K.querySelector(".geTempDlgRadioBtn[data-id="+d+"]").className="geTempDlgRadioBtn "+(m?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");K.querySelector("."+c).src="/images/"+f+"-sel.svg";K.querySelector("."+e).src="/images/"+l+".svg";return!0}function y(c,f,d,e){function m(c,f){if(null==k){var d=c,d=/^https?:\/\//.test(d)&&
-!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(k=b.getText());f(k)}))}else f(k)}function g(d,e,l){if(null!=d&&mxUtils.isAncestorNode(document.body,f)&&(d=mxUtils.parseXml(d),d=Editor.extractGraphModel(d.documentElement,!0),null!=d)){"mxfile"==d.nodeName&&(d=Editor.parseDiagramNode(d.getElementsByTagName("diagram")[0]));var m=new mxCodec(d.ownerDocument),g=new mxGraphModel;
-m.decode(d,g);d=g.root.getChildAt(0).children||[];b.sidebar.createTooltip(f,d,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=c.title?mxResources.get(c.title,null,c.title):null,!0,new mxPoint(e,l),!0,null,!0);var k=document.createElement("div");k.className="geTempDlgDialogMask";K.appendChild(k);var p=b.sidebar.hideTooltip;b.sidebar.hideTooltip=
-function(){k&&(K.removeChild(k),k=null,p.apply(this,arguments),b.sidebar.hideTooltip=p)};mxEvent.addListener(k,"click",function(){b.sidebar.hideTooltip()})}}var k=null;if(ia||b.sidebar.currentElt==f)b.sidebar.hideTooltip();else{var p=function(c){ia&&b.sidebar.currentElt==f&&g(c,mxEvent.getClientX(e),mxEvent.getClientY(e));ia=!1;d.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=f;ia=!0;d.src="/images/aui-wait.gif";c.isExt?l(c,p,function(){x(mxResources.get("cantLoadPrev"));
-ia=!1;d.src="/images/icon-search.svg"}):m(c.url,p)}}function B(b,c,f){if(null!=Y){for(var d=Y.className.split(" "),e=0;e<d.length;e++)if(-1<d[e].indexOf("Active")){d.splice(e,1);break}Y.className=d.join(" ")}null!=b?(Y=b,Y.className+=" "+c,aa=f,ha.className="geTempDlgCreateBtn"):(aa=Y=null,ha.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function C(c,f){if(null!=aa){var d=function(c){n.isExternal?l(n,function(b){g(b,c)},k):n.url?mxUtils.get(TEMPLATE_PATH+"/"+n.url,mxUtils.bind(this,function(b){200<=
-b.getStatus()&&299>=b.getStatus()?g(b.getText(),c):k()})):g(b.emptyDiagramXml,c)},g=function(c,d){v||b.hideDialog(!0);e(c,d,n,f)},k=function(){x(mxResources.get("cannotLoad"));p()},p=function(){aa=n;ha.className="geTempDlgCreateBtn";f&&(U.className="geTempDlgOpenBtn")},n=aa;aa=null;"boolean"!==typeof f&&(f=n.isExternal&&q);if(1==c)m(n.url,n);else if(f)U.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",d();else{ha.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy";
+p,k,g)}));q.setAttribute("id","btnSave");q.className="geBtn gePrimaryBtn";c.appendChild(q);b.editor.cancelFirst||c.appendChild(e);d.appendChild(c);this.container=d},EditShapeDialog=function(b,e,d,c,k){c=null!=c?c:300;k=null!=k?k:120;var g,m,f=document.createElement("table"),l=document.createElement("tbody");f.style.cellPadding="4px";g=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,d);g.appendChild(m);l.appendChild(g);
+g=document.createElement("tr");m=document.createElement("td");var n=document.createElement("textarea");n.style.outline="none";n.style.resize="none";n.style.width=c-200+"px";n.style.height=k+"px";this.textarea=n;this.init=function(){n.focus();n.scrollTop=0};m.appendChild(n);g.appendChild(m);m=document.createElement("td");d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=k+4+"px";d.style.overflow="hidden";
+d.style.marginBottom="16px";mxEvent.disableContextMenu(d);m.appendChild(d);var p=new Graph(d);p.setEnabled(!1);var q=b.editor.graph.cloneCell(e);p.addCells([q]);d=p.view.getState(q);var t="";null!=d.shape&&null!=d.shape.stencil&&(t=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(n,t||"");d=p.getGraphBounds();k=Math.min(160/d.width,(k-40)/d.height);p.view.scaleAndTranslate(k,20/k-d.x,20/k-d.y);g.appendChild(m);l.appendChild(g);g=document.createElement("tr");m=document.createElement("td");
+m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");b.isOffline()||(k=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),k.className="geBtn",m.appendChild(k));k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";b.editor.cancelFirst&&m.appendChild(k);var u=function(c,f,d){var e=n.value,l=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(l.documentElement),
+l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&b.hideDialog(),l=!c.model.contains(f),!d||l||e!=t){e=Graph.compress(e);c.getModel().beginUpdate();try{if(l){var k=b.editor.graph.getFreeInsertPoint();f.geometry.x=k.x;f.geometry.y=k.y;c.addCell(f)}c.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[f])}catch(C){throw C;}finally{c.getModel().endUpdate()}l&&
+(c.setSelectionCell(f),c.scrollCellToVisible(f))}};d=mxUtils.button(mxResources.get("preview"),function(){u(p,q,!1)});d.className="geBtn";m.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){u(b.editor.graph,e,!0)});d.className="geBtn gePrimaryBtn";m.appendChild(d);b.editor.cancelFirst||m.appendChild(k);g.appendChild(m);l.appendChild(g);f.appendChild(l);this.container=f},CustomDialog=function(b,e,d,c,k,g,m,f,l,n){var p=document.createElement("div");p.appendChild(e);e=document.createElement("div");
+e.style.marginTop="30px";e.style.textAlign="center";null!=m&&e.appendChild(m);b.isOffline()||null==g||(m=mxUtils.button(mxResources.get("help"),function(){b.openLink(g)}),m.className="geBtn",e.appendChild(m));l=mxUtils.button(l||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});l.className="geBtn";f&&(l.style.display="none");b.editor.cancelFirst&&e.appendChild(l);k=mxUtils.button(k||mxResources.get("ok"),mxUtils.bind(this,function(){n||b.hideDialog(null,null,this.container);if(null!=
+d){var c=d();if("string"===typeof c){b.showError(mxResources.get("error"),c);return}}n&&b.hideDialog(null,null,this.container)}));e.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(l);p.appendChild(e);this.cancelBtn=l;this.okButton=k;this.container=p},TemplatesDialog=function(b,e,d,c,k,g,m,f,l,n,p,q,t,u,v){function x(b){ua.innerHTML=mxUtils.htmlEntities(b);ua.style.display="block";setTimeout(function(){ua.style.display="none"},4E3)}function A(){null!=R&&(R.style.fontWeight=
+"normal",R.style.textDecoration="none",O=R,R=null)}function z(b,c,f,d,e,l,n){if(-1<b.className.indexOf("geTempDlgRadioBtnActive"))return!1;b.className+=" geTempDlgRadioBtnActive";K.querySelector(".geTempDlgRadioBtn[data-id="+d+"]").className="geTempDlgRadioBtn "+(n?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");K.querySelector("."+c).src="/images/"+f+"-sel.svg";K.querySelector("."+e).src="/images/"+l+".svg";return!0}function y(c,f,d,e){function n(c,f){if(null==g){var d=c,d=/^https?:\/\//.test(d)&&
+!b.editor.isCorsEnabledForUrl(d)?PROXY_URL+"?url="+encodeURIComponent(d):TEMPLATE_PATH+"/"+d;mxUtils.get(d,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(g=b.getText());f(g)}))}else f(g)}function k(d,e,l){if(null!=d&&mxUtils.isAncestorNode(document.body,f)&&(d=mxUtils.parseXml(d),d=Editor.extractGraphModel(d.documentElement,!0),null!=d)){"mxfile"==d.nodeName&&(d=Editor.parseDiagramNode(d.getElementsByTagName("diagram")[0]));var n=new mxCodec(d.ownerDocument),k=new mxGraphModel;
+n.decode(d,k);d=k.root.getChildAt(0).children||[];b.sidebar.createTooltip(f,d,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=c.title?mxResources.get(c.title,null,c.title):null,!0,new mxPoint(e,l),!0,null,!0);var g=document.createElement("div");g.className="geTempDlgDialogMask";K.appendChild(g);var p=b.sidebar.hideTooltip;b.sidebar.hideTooltip=
+function(){g&&(K.removeChild(g),g=null,p.apply(this,arguments),b.sidebar.hideTooltip=p)};mxEvent.addListener(g,"click",function(){b.sidebar.hideTooltip()})}}var g=null;if(ia||b.sidebar.currentElt==f)b.sidebar.hideTooltip();else{var p=function(c){ia&&b.sidebar.currentElt==f&&k(c,mxEvent.getClientX(e),mxEvent.getClientY(e));ia=!1;d.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=f;ia=!0;d.src="/images/aui-wait.gif";c.isExt?l(c,p,function(){x(mxResources.get("cantLoadPrev"));
+ia=!1;d.src="/images/icon-search.svg"}):n(c.url,p)}}function B(b,c,f){if(null!=Y){for(var d=Y.className.split(" "),e=0;e<d.length;e++)if(-1<d[e].indexOf("Active")){d.splice(e,1);break}Y.className=d.join(" ")}null!=b?(Y=b,Y.className+=" "+c,aa=f,ha.className="geTempDlgCreateBtn"):(aa=Y=null,ha.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function C(c,f){if(null!=aa){var d=function(c){m.isExternal?l(m,function(b){k(b,c)},g):m.url?mxUtils.get(TEMPLATE_PATH+"/"+m.url,mxUtils.bind(this,function(b){200<=
+b.getStatus()&&299>=b.getStatus()?k(b.getText(),c):g()})):k(b.emptyDiagramXml,c)},k=function(c,d){v||b.hideDialog(!0);e(c,d,m,f)},g=function(){x(mxResources.get("cannotLoad"));p()},p=function(){aa=m;ha.className="geTempDlgCreateBtn";f&&(U.className="geTempDlgOpenBtn")},m=aa;aa=null;"boolean"!==typeof f&&(f=m.isExternal&&q);if(1==c)n(m.url,m);else if(f)U.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",d();else{ha.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy";
var t=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),t=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),d,t,function(b){var c=null!=b&&0<b.length;return c&&v?(d(b),!1):c},null,null,null,p,u?null:[]);b.showDialog(t.container,350,80,!0,!0);t.init()}}}function D(b){ha.innerHTML=mxUtils.htmlEntities(mxResources.get(N||b?"create":"copy"));b=b?"none":"";q&&(U.style.display=b);for(var c=K.querySelectorAll(".geTempDlgLinkToDiagram"),
-f=0;f<c.length;f++)c[f].style.display=b}function E(c,f,d,e,l){l||(Q.innerHTML="",B(),la=c,W=e);var m=null;if(d){m=document.createElement("table");m.className="geTempDlgDiagramsListGrid";var g=document.createElement("tr"),k=document.createElement("th");k.style.width="50%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));g.appendChild(k);k=document.createElement("th");k.style.width="25%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));g.appendChild(k);k=document.createElement("th");
-k.style.width="25%";k.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));g.appendChild(k);m.appendChild(g);Q.appendChild(m)}for(g=0;g<c.length;g++){c[g].isExternal=!f;var p=c[g].url,q=(k=mxUtils.htmlEntities(f?mxResources.get(c[g].title,null,c[g].title):c[g].title))||c[g].url,n=c[g].imgUrl,t=mxUtils.htmlEntities(c[g].changedBy||""),K="";c[g].lastModifiedOn&&(K=b.timeSince(new Date(c[g].lastModifiedOn)),null==K&&(K=mxResources.get("lessThanAMinute")),K=mxUtils.htmlEntities(mxResources.get("timeAgo",
-[K],"{1} ago")));n||(n=TEMPLATE_PATH+"/"+p.substring(0,p.length-4)+".png");p=d?50:15;null!=k&&k.length>p&&(k=k.substring(0,p)+"&hellip;");if(d){var u=document.createElement("tr"),n=document.createElement("td"),v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramListPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||n.appendChild(v);q=document.createElement("span");q.className="geTempDlgDiagramTitle";q.innerHTML=k;n.appendChild(q);u.appendChild(n);
-n=document.createElement("td");n.innerHTML=t;u.appendChild(n);n=document.createElement("td");n.innerHTML=K;u.appendChild(n);m.appendChild(u);null==Y&&(D(f),B(u,"geTempDlgDiagramsListGridActive",c[g]));(function(b,c,d){mxEvent.addListener(u,"click",function(){Y!=c&&(D(f),B(c,"geTempDlgDiagramsListGridActive",b))});mxEvent.addListener(u,"dblclick",C);mxEvent.addListener(v,"click",function(f){y(b,c,d,f)})})(c[g],u,v)}else{var A=document.createElement("div");A.className="geTempDlgDiagramTile";A.setAttribute("title",
-q);null==Y&&(D(f),B(A,"geTempDlgDiagramTileActive",c[g]));t=document.createElement("div");t.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var I=document.createElement("img");I.style.display="none";(function(b,c,f){I.onload=function(){c.className="geTempDlgDiagramTileImg";b.style.display=""};I.onerror=function(){this.src!=f?this.src=f:c.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(I,t,n?n.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):
-"");I.src=n;t.appendChild(I);A.appendChild(t);t=document.createElement("div");t.className="geTempDlgDiagramTileLbl";t.innerHTML=null!=k?k:"";A.appendChild(t);v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||A.appendChild(v);(function(b,c,d){mxEvent.addListener(A,"click",function(){Y!=c&&(D(f),B(c,"geTempDlgDiagramTileActive",b))});mxEvent.addListener(A,"dblclick",C);mxEvent.addListener(v,
-"click",function(f){y(b,c,d,f)})})(c[g],A,v);Q.appendChild(A)}}for(var x in e)c=e[x],0<c.length&&(l=document.createElement("div"),l.className="geTempDlgImportCat",l.innerHTML=mxResources.get(x,null,x),Q.appendChild(l),E(c,f,d,null,!0))}function G(b,c){Z.innerHTML="";B();for(var f=Math.floor(Z.offsetWidth/150)-1,d=!c&&b.length>f?f:b.length,e=0;e<d;e++){var l=b[e];l.isCategory=!0;var m=document.createElement("div"),g=mxResources.get(l.title);null==g&&(g=l.title.substring(0,1).toUpperCase()+l.title.substring(1));
-m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",g);g=mxUtils.htmlEntities(g);15<g.length&&(g=g.substring(0,15)+"&hellip;");null==Y&&(D(!0),B(m,"geTempDlgNewDiagramCatItemActive",l));var k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemImg";var p=document.createElement("img");p.src=NEW_DIAGRAM_CATS_PATH+"/"+l.img;k.appendChild(p);m.appendChild(k);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemLbl";k.innerHTML=g;m.appendChild(k);Z.appendChild(m);
-(function(b,c){mxEvent.addListener(m,"click",function(){Y!=c&&(D(!0),B(c,"geTempDlgNewDiagramCatItemActive",b))});mxEvent.addListener(m,"dblclick",C)})(l,m)}m=document.createElement("div");m.className="geTempDlgNewDiagramCatItem";g=mxResources.get("showAllTemps");m.setAttribute("title",g);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemImg";k.innerHTML="...";k.style.fontSize="32px";m.appendChild(k);k=document.createElement("div");k.className="geTempDlgNewDiagramCatItemLbl";
-k.innerHTML=g;m.appendChild(k);Z.appendChild(m);mxEvent.addListener(m,"click",function(){function b(){var f=c.querySelector(".geTemplateDrawioCatLink");null!=f?f.click():setTimeout(b,200)}N=!0;var c=K.querySelector(".geTemplatesList");c.style.display="block";ka.style.width="";da.style.display="";da.value="";fa=null;b()});ma.style.display=b.length<=f?"none":""}function F(b,c,f){function d(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));var d=f+" ("+c.length+
-")",e=f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");return{lbl:f+" ("+c.length+")",fullLbl:d,lblOnly:e}}function e(f,d,e,l,m){mxEvent.addListener(e,"click",function(){R!=e&&(null!=R?(R.style.fontWeight="normal",R.style.textDecoration="none"):(na.style.display="none",V.style.minHeight="100%"),R=e,R.style.fontWeight="bold",R.style.textDecoration="underline",ka.scrollTop=0,I&&(T=!0),ba.innerHTML=d,oa.style.display="none",E(m?c[f]:l?qa[f][l]:b[f],m?!1:!0))})}var l=K.querySelector(".geTemplatesList");
-if(0<f){f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(f,mxResources.get("custom"));l.appendChild(f);for(var m in c){f=document.createElement("div");var g=c[m],g=d(m,g);f.className="geTemplateCatLink";f.setAttribute("title",g.fullLbl);f.innerHTML=g.lbl;l.appendChild(f);e(m,g.lblOnly,f,null,!0)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";
-mxUtils.write(f,"draw.io");l.appendChild(f)}for(m in b){var k=qa[m],p=f=document.createElement(k?"ul":"div"),g=b[m],g=d(m,g);if(null!=k){var q=document.createElement("li"),n=document.createElement("div");n.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";n.style.padding="0";n.setAttribute("title",g.fullLbl);n.innerHTML=g.lbl;p=n;q.appendChild(n);var t=document.createElement("ul");t.className="geTempTreeNested";t.style.visibility="hidden";for(var y in k){var u=document.createElement("li"),
-v=d(y,k[y]);u.setAttribute("title",v.fullLbl);u.innerHTML=v.lbl;u.className="geTemplateCatLink";u.style.padding="0";u.style.margin="0";e(m,v.lblOnly,u,y);t.appendChild(u)}q.appendChild(t);f.className="geTempTree";f.appendChild(q);(function(b,c){mxEvent.addListener(c,"click",function(){for(var f=b.querySelectorAll("li"),d=0;d<f.length;d++)f[d].style.margin="";b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var c=
-0;c<f.length;c++)f[c].style.margin="0";b.style.visibility="hidden"},250);c.classList.toggle("geTempTreeCaret-down")})})(t,n)}else f.className="geTemplateCatLink geTemplateDrawioCatLink",f.setAttribute("title",g.fullLbl),f.innerHTML=g.lbl;l.appendChild(f);e(m,g.lblOnly,p)}}function J(){mxUtils.get(c,function(b){if(!pa){pa=!0;b=b.getXml().documentElement.firstChild;for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),
-e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var m=e.indexOf("/",l+1);-1<m&&(f=e.substring(l+1,m))}l=ra[d];null==l&&(za++,l=[],ra[d]=l);e=b.getAttribute("clibs");null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title")||
-b.getAttribute("name"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=qa[d],null==l&&(l={},qa[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}F(ra,ya,xa)}})}function L(b){n&&(ka.scrollTop=0,Q.innerHTML="",ja.spin(Q),T=!1,I=!0,ba.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),fa=null,n(sa,function(){x(mxResources.get("cannotLoad"));sa([])},b?null:k))}function H(b){if(""==b)null!=O&&(O.click(),O=null);else{if(null==TemplatesDialog.tagsList[c]){var f=
-{},d;for(d in ra)for(var e=ra[d],l=0;l<e.length;l++){var m=e[l];if(null!=m.tags)for(var g=m.tags.toLowerCase().split(";"),k=0;k<g.length;k++)null==f[g[k]]&&(f[g[k]]=[]),f[g[k]].push(m)}TemplatesDialog.tagsList[c]=f}var p=b.toLowerCase().split(" "),f=TemplatesDialog.tagsList[c];if(0<xa&&null==f.__tagsList__){for(d in ya)for(e=ya[d],l=0;l<e.length;l++)for(m=e[l],g=m.title.split(" "),g.push(d),k=0;k<g.length;k++){var q=g[k].toLowerCase();null==f[q]&&(f[q]=[]);f[q].push(m)}f.__tagsList__=!0}d=[];e={};
-for(l=g=0;l<p.length;l++)if(0<p[l].length){var q=f[p[l]],n={};d=[];if(null!=q)for(k=0;k<q.length;k++)m=q[k],0==g==(null==e[m.url])&&(n[m.url]=!0,d.push(m));e=n;g++}0==d.length?ba.innerHTML=mxResources.get("noResultsFor",[b]):E(d,!0)}}function M(b){if(fa!=b||ca!=X)A(),ka.scrollTop=0,Q.innerHTML="",ba.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(b)+'"',ta=null,N?H(b):f&&(b?(ja.spin(Q),T=!1,I=!0,f(b,sa,function(){x(mxResources.get("searchFailed"));sa([])},
-ca?null:k)):L(ca)),fa=b,X=ca}function P(b){null!=ta&&clearTimeout(ta);13==b.keyCode?M(da.value):ta=setTimeout(function(){M(da.value)},1E3)}var S='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(f?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
+f=0;f<c.length;f++)c[f].style.display=b}function G(c,f,d,e,l){l||(Q.innerHTML="",B(),la=c,W=e);var n=null;if(d){n=document.createElement("table");n.className="geTempDlgDiagramsListGrid";var k=document.createElement("tr"),g=document.createElement("th");g.style.width="50%";g.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));k.appendChild(g);g=document.createElement("th");g.style.width="25%";g.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));k.appendChild(g);g=document.createElement("th");
+g.style.width="25%";g.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));k.appendChild(g);n.appendChild(k);Q.appendChild(n)}for(k=0;k<c.length;k++){c[k].isExternal=!f;var p=c[k].url,q=(g=mxUtils.htmlEntities(f?mxResources.get(c[k].title,null,c[k].title):c[k].title))||c[k].url,m=c[k].imgUrl,t=mxUtils.htmlEntities(c[k].changedBy||""),K="";c[k].lastModifiedOn&&(K=b.timeSince(new Date(c[k].lastModifiedOn)),null==K&&(K=mxResources.get("lessThanAMinute")),K=mxUtils.htmlEntities(mxResources.get("timeAgo",
+[K],"{1} ago")));m||(m=TEMPLATE_PATH+"/"+p.substring(0,p.length-4)+".png");p=d?50:15;null!=g&&g.length>p&&(g=g.substring(0,p)+"&hellip;");if(d){var u=document.createElement("tr"),m=document.createElement("td"),v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramListPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||m.appendChild(v);q=document.createElement("span");q.className="geTempDlgDiagramTitle";q.innerHTML=g;m.appendChild(q);u.appendChild(m);
+m=document.createElement("td");m.innerHTML=t;u.appendChild(m);m=document.createElement("td");m.innerHTML=K;u.appendChild(m);n.appendChild(u);null==Y&&(D(f),B(u,"geTempDlgDiagramsListGridActive",c[k]));(function(b,c,d){mxEvent.addListener(u,"click",function(){Y!=c&&(D(f),B(c,"geTempDlgDiagramsListGridActive",b))});mxEvent.addListener(u,"dblclick",C);mxEvent.addListener(v,"click",function(f){y(b,c,d,f)})})(c[k],u,v)}else{var A=document.createElement("div");A.className="geTempDlgDiagramTile";A.setAttribute("title",
+q);null==Y&&(D(f),B(A,"geTempDlgDiagramTileActive",c[k]));t=document.createElement("div");t.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var I=document.createElement("img");I.style.display="none";(function(b,c,f){I.onload=function(){c.className="geTempDlgDiagramTileImg";b.style.display=""};I.onerror=function(){this.src!=f?this.src=f:c.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(I,t,m?m.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):
+"");I.src=m;t.appendChild(I);A.appendChild(t);t=document.createElement("div");t.className="geTempDlgDiagramTileLbl";t.innerHTML=null!=g?g:"";A.appendChild(t);v=document.createElement("img");v.src="/images/icon-search.svg";v.className="geTempDlgDiagramPreviewBtn";v.setAttribute("title",mxResources.get("preview"));l||A.appendChild(v);(function(b,c,d){mxEvent.addListener(A,"click",function(){Y!=c&&(D(f),B(c,"geTempDlgDiagramTileActive",b))});mxEvent.addListener(A,"dblclick",C);mxEvent.addListener(v,
+"click",function(f){y(b,c,d,f)})})(c[k],A,v);Q.appendChild(A)}}for(var x in e)c=e[x],0<c.length&&(l=document.createElement("div"),l.className="geTempDlgImportCat",l.innerHTML=mxResources.get(x,null,x),Q.appendChild(l),G(c,f,d,null,!0))}function H(b,c){Z.innerHTML="";B();for(var f=Math.floor(Z.offsetWidth/150)-1,d=!c&&b.length>f?f:b.length,e=0;e<d;e++){var l=b[e];l.isCategory=!0;var n=document.createElement("div"),k=mxResources.get(l.title);null==k&&(k=l.title.substring(0,1).toUpperCase()+l.title.substring(1));
+n.className="geTempDlgNewDiagramCatItem";n.setAttribute("title",k);k=mxUtils.htmlEntities(k);15<k.length&&(k=k.substring(0,15)+"&hellip;");null==Y&&(D(!0),B(n,"geTempDlgNewDiagramCatItemActive",l));var g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemImg";var p=document.createElement("img");p.src=NEW_DIAGRAM_CATS_PATH+"/"+l.img;g.appendChild(p);n.appendChild(g);g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemLbl";g.innerHTML=k;n.appendChild(g);Z.appendChild(n);
+(function(b,c){mxEvent.addListener(n,"click",function(){Y!=c&&(D(!0),B(c,"geTempDlgNewDiagramCatItemActive",b))});mxEvent.addListener(n,"dblclick",C)})(l,n)}n=document.createElement("div");n.className="geTempDlgNewDiagramCatItem";k=mxResources.get("showAllTemps");n.setAttribute("title",k);g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemImg";g.innerHTML="...";g.style.fontSize="32px";n.appendChild(g);g=document.createElement("div");g.className="geTempDlgNewDiagramCatItemLbl";
+g.innerHTML=k;n.appendChild(g);Z.appendChild(n);mxEvent.addListener(n,"click",function(){function b(){var f=c.querySelector(".geTemplateDrawioCatLink");null!=f?f.click():setTimeout(b,200)}N=!0;var c=K.querySelector(".geTemplatesList");c.style.display="block";ka.style.width="";da.style.display="";da.value="";fa=null;b()});ma.style.display=b.length<=f?"none":""}function E(b,c,f){function d(b,c){var f=mxResources.get(b);null==f&&(f=b.substring(0,1).toUpperCase()+b.substring(1));var d=f+" ("+c.length+
+")",e=f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");return{lbl:f+" ("+c.length+")",fullLbl:d,lblOnly:e}}function e(f,d,e,l,n){mxEvent.addListener(e,"click",function(){R!=e&&(null!=R?(R.style.fontWeight="normal",R.style.textDecoration="none"):(na.style.display="none",V.style.minHeight="100%"),R=e,R.style.fontWeight="bold",R.style.textDecoration="underline",ka.scrollTop=0,I&&(T=!0),ba.innerHTML=d,oa.style.display="none",G(n?c[f]:l?qa[f][l]:b[f],n?!1:!0))})}var l=K.querySelector(".geTemplatesList");
+if(0<f){f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(f,mxResources.get("custom"));l.appendChild(f);for(var n in c){f=document.createElement("div");var g=c[n],g=d(n,g);f.className="geTemplateCatLink";f.setAttribute("title",g.fullLbl);f.innerHTML=g.lbl;l.appendChild(f);e(n,g.lblOnly,f,null,!0)}f=document.createElement("div");f.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";
+mxUtils.write(f,"draw.io");l.appendChild(f)}for(n in b){var k=qa[n],p=f=document.createElement(k?"ul":"div"),g=b[n],g=d(n,g);if(null!=k){var q=document.createElement("li"),m=document.createElement("div");m.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";m.style.padding="0";m.setAttribute("title",g.fullLbl);m.innerHTML=g.lbl;p=m;q.appendChild(m);var t=document.createElement("ul");t.className="geTempTreeNested";t.style.visibility="hidden";for(var y in k){var u=document.createElement("li"),
+v=d(y,k[y]);u.setAttribute("title",v.fullLbl);u.innerHTML=v.lbl;u.className="geTemplateCatLink";u.style.padding="0";u.style.margin="0";e(n,v.lblOnly,u,y);t.appendChild(u)}q.appendChild(t);f.className="geTempTree";f.appendChild(q);(function(b,c){mxEvent.addListener(c,"click",function(){for(var f=b.querySelectorAll("li"),d=0;d<f.length;d++)f[d].style.margin="";b.style.visibility="visible";b.classList.toggle("geTempTreeActive");b.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var c=
+0;c<f.length;c++)f[c].style.margin="0";b.style.visibility="hidden"},250);c.classList.toggle("geTempTreeCaret-down")})})(t,m)}else f.className="geTemplateCatLink geTemplateDrawioCatLink",f.setAttribute("title",g.fullLbl),f.innerHTML=g.lbl;l.appendChild(f);e(n,g.lblOnly,p)}}function J(){mxUtils.get(c,function(b){if(!pa){pa=!0;b=b.getXml().documentElement.firstChild;for(var c={};null!=b;){if("undefined"!==typeof b.getAttribute)if("clibs"==b.nodeName){for(var f=b.getAttribute("name"),d=b.getElementsByTagName("add"),
+e=[],l=0;l<d.length;l++)e.push(encodeURIComponent(mxUtils.getTextContent(d[l])));null!=f&&0<e.length&&(c[f]=e.join(";"))}else if(e=b.getAttribute("url"),null!=e){d=b.getAttribute("section");f=b.getAttribute("subsection");if(null==d&&(l=e.indexOf("/"),d=e.substring(0,l),null==f)){var n=e.indexOf("/",l+1);-1<n&&(f=e.substring(l+1,n))}l=ra[d];null==l&&(za++,l=[],ra[d]=l);e=b.getAttribute("clibs");null!=c[e]&&(e=c[e]);e={url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title")||
+b.getAttribute("name"),preview:b.getAttribute("preview"),clibs:e,tags:b.getAttribute("tags")};l.push(e);null!=f&&(l=qa[d],null==l&&(l={},qa[d]=l),d=l[f],null==d&&(d=[],l[f]=d),d.push(e))}b=b.nextSibling}E(ra,ya,xa)}})}function L(b){m&&(ka.scrollTop=0,Q.innerHTML="",ja.spin(Q),T=!1,I=!0,ba.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),fa=null,m(sa,function(){x(mxResources.get("cannotLoad"));sa([])},b?null:g))}function F(b){if(""==b)null!=O&&(O.click(),O=null);else{if(null==TemplatesDialog.tagsList[c]){var f=
+{},d;for(d in ra)for(var e=ra[d],l=0;l<e.length;l++){var n=e[l];if(null!=n.tags)for(var g=n.tags.toLowerCase().split(";"),k=0;k<g.length;k++)null==f[g[k]]&&(f[g[k]]=[]),f[g[k]].push(n)}TemplatesDialog.tagsList[c]=f}var p=b.toLowerCase().split(" "),f=TemplatesDialog.tagsList[c];if(0<xa&&null==f.__tagsList__){for(d in ya)for(e=ya[d],l=0;l<e.length;l++)for(n=e[l],g=n.title.split(" "),g.push(d),k=0;k<g.length;k++){var q=g[k].toLowerCase();null==f[q]&&(f[q]=[]);f[q].push(n)}f.__tagsList__=!0}d=[];e={};
+for(l=g=0;l<p.length;l++)if(0<p[l].length){var q=f[p[l]],m={};d=[];if(null!=q)for(k=0;k<q.length;k++)n=q[k],0==g==(null==e[n.url])&&(m[n.url]=!0,d.push(n));e=m;g++}0==d.length?ba.innerHTML=mxResources.get("noResultsFor",[b]):G(d,!0)}}function M(b){if(fa!=b||ca!=X)A(),ka.scrollTop=0,Q.innerHTML="",ba.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(b)+'"',ta=null,N?F(b):f&&(b?(ja.spin(Q),T=!1,I=!0,f(b,sa,function(){x(mxResources.get("searchFailed"));sa([])},
+ca?null:g)):L(ca)),fa=b,X=ca}function P(b){null!=ta&&clearTimeout(ta);13==b.keyCode?M(da.value):ta=setTimeout(function(){M(da.value)},1E3)}var S='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(f?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
(t?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(q?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",K=document.createElement("div");K.innerHTML=S;K.className=
-"geTemplateDlg";this.container=K;c=null!=c?c:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var I=!1,T=!1,R=null,O=null,Y=null,aa=null,ga=!1,ca=!0,ea=!1,la=[],W=null,fa,X,N=!1,ma=K.querySelector(".geTempDlgShowAllBtn"),Q=K.querySelector(".geTempDlgDiagramsTiles"),ba=K.querySelector(".geTempDlgDiagramsListTitle"),oa=K.querySelector(".geTempDlgDiagramsListBtns"),ka=K.querySelector(".geTempDlgContent"),V=K.querySelector(".geTempDlgDiagramsList"),na=K.querySelector(".geTempDlgNewDiagramCat"),
+"geTemplateDlg";this.container=K;c=null!=c?c:TEMPLATE_PATH+"/index.xml";k=null!=k?k:NEW_DIAGRAM_CATS_PATH+"/index.xml";var I=!1,T=!1,R=null,O=null,Y=null,aa=null,ga=!1,ca=!0,ea=!1,la=[],W=null,fa,X,N=!1,ma=K.querySelector(".geTempDlgShowAllBtn"),Q=K.querySelector(".geTempDlgDiagramsTiles"),ba=K.querySelector(".geTempDlgDiagramsListTitle"),oa=K.querySelector(".geTempDlgDiagramsListBtns"),ka=K.querySelector(".geTempDlgContent"),V=K.querySelector(".geTempDlgDiagramsList"),na=K.querySelector(".geTempDlgNewDiagramCat"),
Z=K.querySelector(".geTempDlgNewDiagramCatList"),ha=K.querySelector(".geTempDlgCreateBtn"),U=K.querySelector(".geTempDlgOpenBtn"),da=K.querySelector(".geTempDlgSearchBox"),ua=K.querySelector(".geTempDlgErrMsg"),ja=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(K.querySelector(".geTempDlgBack"),"click",function(){A();N=!1;K.querySelector(".geTemplatesList").style.display="none";ka.style.width=
"100%";na.style.display="";V.style.minHeight="calc(100% - 280px)";da.style.display=f?"":"none";da.value="";fa=null;L(ca)});mxEvent.addListener(K.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){z(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(ca=!0,null==fa?L(ca):M(fa))});mxEvent.addListener(K.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){z(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(ca=!1,null==fa?L(ca):M(fa))});mxEvent.addListener(K.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){z(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(ea=!0,E(la,!1,ea,W))});mxEvent.addListener(K.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){z(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(ea=!1,E(la,
-!1,ea,W))});var ia=!1;mxEvent.addListener(ma,"click",function(){ga?(na.style.height="280px",Z.style.height="190px",ma.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),G(va)):(na.style.height="440px",Z.style.height="355px",ma.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),G(va,!0));ga=!ga});var pa=!1,wa=!1,ra={},qa={},ya={},va=[],za=1,xa=0;null!=p?p(function(b,c){ya=b;xa=c;J()},J):J();mxUtils.get(g,function(b){if(!wa){wa=!0;for(b=b.getXml().documentElement.firstChild;null!=
-b;)"undefined"!==typeof b.getAttribute&&null!=b.getAttribute("title")&&va.push({img:b.getAttribute("img"),libs:b.getAttribute("libs"),clibs:b.getAttribute("clibs"),title:b.getAttribute("title")}),b=b.nextSibling;G(va)}});var sa=function(b,c,f){oa.style.display="";ja.stop();I=!1;if(T)T=!1;else if(c)Q.innerHTML=c;else{f=f||{};c=0;for(var d in f)c+=f[d].length;0==b.length&&0==c?Q.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):E(b,!1,ea,0==c?null:f)}};L(ca);var ta=null;mxEvent.addListener(da,
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(ca=!1,null==fa?L(ca):M(fa))});mxEvent.addListener(K.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){z(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(ea=!0,G(la,!1,ea,W))});mxEvent.addListener(K.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){z(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(ea=!1,G(la,
+!1,ea,W))});var ia=!1;mxEvent.addListener(ma,"click",function(){ga?(na.style.height="280px",Z.style.height="190px",ma.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),H(va)):(na.style.height="440px",Z.style.height="355px",ma.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),H(va,!0));ga=!ga});var pa=!1,wa=!1,ra={},qa={},ya={},va=[],za=1,xa=0;null!=p?p(function(b,c){ya=b;xa=c;J()},J):J();mxUtils.get(k,function(b){if(!wa){wa=!0;for(b=b.getXml().documentElement.firstChild;null!=
+b;)"undefined"!==typeof b.getAttribute&&null!=b.getAttribute("title")&&va.push({img:b.getAttribute("img"),libs:b.getAttribute("libs"),clibs:b.getAttribute("clibs"),title:b.getAttribute("title")}),b=b.nextSibling;H(va)}});var sa=function(b,c,f){oa.style.display="";ja.stop();I=!1;if(T)T=!1;else if(c)Q.innerHTML=c;else{f=f||{};c=0;for(var d in f)c+=f[d].length;0==b.length&&0==c?Q.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):G(b,!1,ea,0==c?null:f)}};L(ca);var ta=null;mxEvent.addListener(da,
"keyup",P);mxEvent.addListener(da,"search",P);mxEvent.addListener(da,"input",P);mxEvent.addListener(ha,"click",function(b){C(!1,!1)});q&&mxEvent.addListener(U,"click",function(b){C(!1,!0)});t&&mxEvent.addListener(K.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(b){C(!0)});mxEvent.addListener(K.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=d&&d();v||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
-var BtnDialog=function(b,e,d,c){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("done"));var n="Unknown",f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.marginRight="10px";e==b.drive?(n=mxResources.get("googleDrive"),f.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
-(n=mxResources.get("dropbox"),f.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(n=mxResources.get("oneDrive"),f.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(n=mxResources.get("github"),f.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(n=mxResources.get("gitlab"),f.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.notion?(n=mxResources.get("notion"),f.src=IMAGE_PATH+"/notion-logo.svg"):e==b.trello&&(n=mxResources.get("trello"),f.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");
-mxUtils.write(b,mxResources.get("authorizedIn",[n],"You are now authorized in {1}"));d=mxUtils.button(d,c);d.insertBefore(f,d.firstChild);d.style.marginTop="6px";d.className="geBigButton";d.style.fontSize="18px";d.style.padding="14px";g.appendChild(k);g.appendChild(b);g.appendChild(d);this.container=g},FontDialog=function(b,e,d,c,g){function k(b){this.style.border="";13==b.keyCode&&y.click()}var n,f,l,m=document.createElement("table"),p=document.createElement("tbody");m.style.marginTop="8px";n=document.createElement("tr");
+var BtnDialog=function(b,e,d,c){var k=document.createElement("div");k.style.textAlign="center";var g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("done"));var m="Unknown",f=document.createElement("img");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.marginRight="10px";e==b.drive?(m=mxResources.get("googleDrive"),f.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
+(m=mxResources.get("dropbox"),f.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(m=mxResources.get("oneDrive"),f.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(m=mxResources.get("github"),f.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(m=mxResources.get("gitlab"),f.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.notion?(m=mxResources.get("notion"),f.src=IMAGE_PATH+"/notion-logo.svg"):e==b.trello&&(m=mxResources.get("trello"),f.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");
+mxUtils.write(b,mxResources.get("authorizedIn",[m],"You are now authorized in {1}"));d=mxUtils.button(d,c);d.insertBefore(f,d.firstChild);d.style.marginTop="6px";d.className="geBigButton";d.style.fontSize="18px";d.style.padding="14px";k.appendChild(g);k.appendChild(b);k.appendChild(d);this.container=k},FontDialog=function(b,e,d,c,k){function g(b){this.style.border="";13==b.keyCode&&y.click()}var m,f,l,n=document.createElement("table"),p=document.createElement("tbody");n.style.marginTop="8px";m=document.createElement("tr");
f=document.createElement("td");f.colSpan=2;f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.fontWeight="bold";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","sysfonts");q.setAttribute("type","radio");q.setAttribute("name","current-fontdialog");q.setAttribute("id","fontdialog-sysfonts");f.appendChild(q);l=document.createElement("label");l.setAttribute("for","fontdialog-sysfonts");mxUtils.write(l,mxResources.get("sysFonts",
-null,"System Fonts"));f.appendChild(l);n.appendChild(f);p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");n.appendChild(f);var t=document.createElement("input");"s"==c&&t.setAttribute("value",e);t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_s";f=document.createElement("td");f.appendChild(t);
-n.appendChild(f);p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.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");f.appendChild(u);l=document.createElement("label");l.setAttribute("for",
-"fontdialog-googlefonts");mxUtils.write(l,mxResources.get("googleFonts",null,"Google Fonts"));f.appendChild(l);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(l=b.menus.createHelpLink("https://fonts.google.com/"),l.getElementsByTagName("img")[0].setAttribute("valign","middle"),f.appendChild(l));n.appendChild(f);p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft=
-"15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");n.appendChild(f);var v=document.createElement("input");"g"==c&&v.setAttribute("value",e);v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_g";f=document.createElement("td");f.appendChild(v);n.appendChild(f);p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.fontWeight="bold";var x=document.createElement("input");
-x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","webfonts");x.setAttribute("type","radio");x.setAttribute("name","current-fontdialog");x.setAttribute("id","fontdialog-webfonts");f.appendChild(x);l=document.createElement("label");l.setAttribute("for","fontdialog-webfonts");mxUtils.write(l,mxResources.get("webfonts",null,"Web Fonts"));f.appendChild(l);n.appendChild(f);Editor.enableWebFonts&&p.appendChild(n);n=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace=
-"nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");n.appendChild(f);var A=document.createElement("input");"w"==c&&(Editor.enableWebFonts?A.setAttribute("value",e):t.setAttribute("value",e));A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontName_w";f=document.createElement("td");f.appendChild(A);n.appendChild(f);Editor.enableWebFonts&&p.appendChild(n);n=document.createElement("tr");f=
-document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontUrl",null,"Font URL")+":");n.appendChild(f);var z=document.createElement("input");z.setAttribute("value",d||"");z.style.marginLeft="4px";z.style.width="250px";z.className="dlg_fontUrl";f=document.createElement("td");f.appendChild(z);n.appendChild(f);Editor.enableWebFonts&&p.appendChild(n);this.init=function(){var b=t;"g"==c?b=v:"w"==
-c&&Editor.enableWebFonts&&(b=A);b.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?b.select():document.execCommand("selectAll",!1,null)};n=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="20px";f.style.whiteSpace="nowrap";f.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",f.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog();g()});e.className="geBtn";b.editor.cancelFirst&&f.appendChild(e);var y=mxUtils.button(mxResources.get("apply"),function(){var c,f,d;q.checked?(c=t.value,d="s"):u.checked?(c=v.value,f=Editor.GOOGLE_FONTS+encodeURIComponent(c).replace(/%20/g,"+"),d="g"):x.checked&&(c=A.value,f=z.value,d="w");var e;e=f;var l=d,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==c||0==c.length?(m.querySelector(".dlg_fontName_"+l).style.border="1px solid red",
-e=!1):"w"!=l||k.test(e)?e=!0:(m.querySelector(".dlg_fontUrl").style.border="1px solid red",e=!1);e&&(g(c,f,d),b.hideDialog())});y.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",k);mxEvent.addListener(v,"keypress",k);mxEvent.addListener(A,"keypress",k);mxEvent.addListener(z,"keypress",k);mxEvent.addListener(t,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(v,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(A,
-"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(z,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});f.appendChild(y);b.editor.cancelFirst||f.appendChild(e);n.appendChild(f);p.appendChild(n);m.appendChild(p);this.container=m};
-function AspectDialog(b,e,d,c,g){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:d||[]};e=document.createElement("div");var k=document.createElement("h5");k.style.margin="0 0 10px";mxUtils.write(k,mxResources.get("pages"));e.appendChild(k);d=document.createElement("div");d.className="geAspectDlgList";e.appendChild(d);k=document.createElement("h5");k.style.margin="0 0 10px";mxUtils.write(k,mxResources.get("layers"));e.appendChild(k);k=document.createElement("div");k.className="geAspectDlgList";
-e.appendChild(k);this.pagesContainer=d;this.layersContainer=k;this.ui=b;d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="center";k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});k.className="geBtn";b.editor.cancelFirst&&d.appendChild(k);var n=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));d.appendChild(n);n.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||d.appendChild(k);n.setAttribute("disabled","disabled");this.okBtn=n;e.appendChild(d);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
-AspectDialog.prototype.createViewer=function(b,e,d,c){mxEvent.disableContextMenu(b);b.style.userSelect="none";var g=new Graph(b);g.setTooltips(!1);g.setEnabled(!1);g.setPanning(!1);g.minFitScale=null;g.maxFitScale=null;g.centerZoom=!0;e="mxGraphModel"==e.nodeName?e:Editor.parseDiagramNode(e);if(null!=e){var k=e.getAttribute("background");if(null==k||""==k||k==mxConstants.NONE)k=null!=c?c:"#ffffff";b.style.backgroundColor=k;c=new mxCodec(e.ownerDocument);b=g.getModel();c.decode(e,b);e=b.getChildCount(b.root);
-c=null==d;for(k=0;k<e;k++){var n=b.getChildAt(b.root,k);b.setVisible(n,c||d==n.id)}g.maxFitScale=1;g.fit(0);g.center()}return g};
-AspectDialog.prototype.createPageItem=function(b,e,d){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.pagesContainer.appendChild(c);var g=this.createViewer(c.childNodes[0],d);e=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;
-this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");for(var e=g.model,e=e.getChildCells(e.getRoot()),n=0;n<e.length;n++)this.createLayerItem(e[n],b,g,d)});mxEvent.addListener(c,"click",e);this.aspect.pageId==b&&e()};
-AspectDialog.prototype.createLayerItem=function(b,e,d,c){e=d.convertValueToString(b)||mxResources.get("background")||"Background";var g=document.createElement("div");g.setAttribute("data-layer-id",b.id);g.className="geAspectDlgListItem";g.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.layersContainer.appendChild(g);this.createViewer(g.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=g.className.indexOf("geAspectDlgListItemSelected")?
-(g.className="geAspectDlgListItem",delete this.selectedLayers[b.id],0==Object.keys(this.selectedLayers).length&&this.okBtn.setAttribute("disabled","disabled")):(g.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(g,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};
-var FilePropertiesDialog=function(b){var e,d,c=document.createElement("table"),g=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";var k=b.getCurrentFile();e=null!=k&&null!=k.getTitle()?k.getTitle():this.editorUi.defaultFilename;d=null;if(/(\.png)$/i.test(e)){var n=1,f=0;e=b.fileNode;null!=e&&(e.hasAttribute("scale")&&(n=parseFloat(e.getAttribute("scale"))),e.hasAttribute("border")&&(f=parseInt(e.getAttribute("border"))));e=document.createElement("tr");d=document.createElement("td");
-d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";mxUtils.write(d,mxResources.get("zoom")+":");e.appendChild(d);var l=document.createElement("input");l.setAttribute("value",100*n+"%");l.style.marginLeft="4px";l.style.width="180px";d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(l);e.appendChild(d);g.appendChild(e);e=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";
-mxUtils.write(d,mxResources.get("borderWidth")+":");e.appendChild(d);var m=document.createElement("input");m.setAttribute("value",f);m.style.marginLeft="4px";m.style.width="180px";d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(m);e.appendChild(d);g.appendChild(e);this.init=function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null)};d=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
-parseInt(l.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(m.value))),null!=k&&k.fileChanged());b.hideDialog()}}else{n=null!=k?k.isCompressed():Editor.compressXml;e=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";mxUtils.write(d,mxResources.get("compressed")+":");e.appendChild(d);var p=document.createElement("input");p.setAttribute("type","checkbox");n&&(p.setAttribute("checked","checked"),p.defaultChecked=
-!0);d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(p);e.appendChild(d);g.appendChild(e);this.init=function(){p.focus()};d=function(){null!=b.fileNode&&(b.fileNode.setAttribute("compressed",p.checked?"true":"false"),null!=k&&k.fileChanged());b.hideDialog()}}n=mxUtils.button(mxResources.get("apply"),d);n.className="geBtn gePrimaryBtn";e=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align",
-"right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);d.appendChild(n);b.editor.cancelFirst||d.appendChild(f);e.appendChild(d);g.appendChild(e);c.appendChild(g);this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+null,"System Fonts"));f.appendChild(l);m.appendChild(f);p.appendChild(m);m=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");m.appendChild(f);var t=document.createElement("input");"s"==c&&t.setAttribute("value",e);t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_s";f=document.createElement("td");f.appendChild(t);
+m.appendChild(f);p.appendChild(m);m=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.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");f.appendChild(u);l=document.createElement("label");l.setAttribute("for",
+"fontdialog-googlefonts");mxUtils.write(l,mxResources.get("googleFonts",null,"Google Fonts"));f.appendChild(l);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(l=b.menus.createHelpLink("https://fonts.google.com/"),l.getElementsByTagName("img")[0].setAttribute("valign","middle"),f.appendChild(l));m.appendChild(f);p.appendChild(m);m=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft=
+"15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");m.appendChild(f);var v=document.createElement("input");"g"==c&&v.setAttribute("value",e);v.style.marginLeft="4px";v.style.width="250px";v.className="dlg_fontName_g";f=document.createElement("td");f.appendChild(v);m.appendChild(f);p.appendChild(m);m=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.fontWeight="bold";var x=document.createElement("input");
+x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","webfonts");x.setAttribute("type","radio");x.setAttribute("name","current-fontdialog");x.setAttribute("id","fontdialog-webfonts");f.appendChild(x);l=document.createElement("label");l.setAttribute("for","fontdialog-webfonts");mxUtils.write(l,mxResources.get("webfonts",null,"Web Fonts"));f.appendChild(l);m.appendChild(f);Editor.enableWebFonts&&p.appendChild(m);m=document.createElement("tr");f=document.createElement("td");f.style.whiteSpace=
+"nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontname",null,"Font Name")+":");m.appendChild(f);var A=document.createElement("input");"w"==c&&(Editor.enableWebFonts?A.setAttribute("value",e):t.setAttribute("value",e));A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontName_w";f=document.createElement("td");f.appendChild(A);m.appendChild(f);Editor.enableWebFonts&&p.appendChild(m);m=document.createElement("tr");f=
+document.createElement("td");f.style.whiteSpace="nowrap";f.style.fontSize="10pt";f.style.width="120px";f.style.paddingLeft="15px";mxUtils.write(f,mxResources.get("fontUrl",null,"Font URL")+":");m.appendChild(f);var z=document.createElement("input");z.setAttribute("value",d||"");z.style.marginLeft="4px";z.style.width="250px";z.className="dlg_fontUrl";f=document.createElement("td");f.appendChild(z);m.appendChild(f);Editor.enableWebFonts&&p.appendChild(m);this.init=function(){var b=t;"g"==c?b=v:"w"==
+c&&Editor.enableWebFonts&&(b=A);b.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?b.select():document.execCommand("selectAll",!1,null)};m=document.createElement("tr");f=document.createElement("td");f.colSpan=2;f.style.paddingTop="20px";f.style.whiteSpace="nowrap";f.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",f.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog();k()});e.className="geBtn";b.editor.cancelFirst&&f.appendChild(e);var y=mxUtils.button(mxResources.get("apply"),function(){var c,f,d;q.checked?(c=t.value,d="s"):u.checked?(c=v.value,f=Editor.GOOGLE_FONTS+encodeURIComponent(c).replace(/%20/g,"+"),d="g"):x.checked&&(c=A.value,f=z.value,d="w");var e;e=f;var l=d,g=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==c||0==c.length?(n.querySelector(".dlg_fontName_"+l).style.border="1px solid red",
+e=!1):"w"!=l||g.test(e)?e=!0:(n.querySelector(".dlg_fontUrl").style.border="1px solid red",e=!1);e&&(k(c,f,d),b.hideDialog())});y.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",g);mxEvent.addListener(v,"keypress",g);mxEvent.addListener(A,"keypress",g);mxEvent.addListener(z,"keypress",g);mxEvent.addListener(t,"focus",function(){q.setAttribute("checked","checked");q.checked=!0});mxEvent.addListener(v,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(A,
+"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(z,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});f.appendChild(y);b.editor.cancelFirst||f.appendChild(e);m.appendChild(f);p.appendChild(m);n.appendChild(p);this.container=n};
+function AspectDialog(b,e,d,c,k){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:d||[]};e=document.createElement("div");var g=document.createElement("h5");g.style.margin="0 0 10px";mxUtils.write(g,mxResources.get("pages"));e.appendChild(g);d=document.createElement("div");d.className="geAspectDlgList";e.appendChild(d);g=document.createElement("h5");g.style.margin="0 0 10px";mxUtils.write(g,mxResources.get("layers"));e.appendChild(g);g=document.createElement("div");g.className="geAspectDlgList";
+e.appendChild(g);this.pagesContainer=d;this.layersContainer=g;this.ui=b;d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="center";g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k()});g.className="geBtn";b.editor.cancelFirst&&d.appendChild(g);var m=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));d.appendChild(m);m.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||d.appendChild(g);m.setAttribute("disabled","disabled");this.okBtn=m;e.appendChild(d);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+AspectDialog.prototype.createViewer=function(b,e,d,c){mxEvent.disableContextMenu(b);b.style.userSelect="none";var k=new Graph(b);k.setTooltips(!1);k.setEnabled(!1);k.setPanning(!1);k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;e="mxGraphModel"==e.nodeName?e:Editor.parseDiagramNode(e);if(null!=e){var g=e.getAttribute("background");if(null==g||""==g||g==mxConstants.NONE)g=null!=c?c:"#ffffff";b.style.backgroundColor=g;c=new mxCodec(e.ownerDocument);b=k.getModel();c.decode(e,b);e=b.getChildCount(b.root);
+c=null==d;for(g=0;g<e;g++){var m=b.getChildAt(b.root,g);b.setVisible(m,c||d==m.id)}k.maxFitScale=1;k.fit(0);k.center()}return k};
+AspectDialog.prototype.createPageItem=function(b,e,d){var c=document.createElement("div");c.className="geAspectDlgListItem";c.setAttribute("data-page-id",b);c.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.pagesContainer.appendChild(c);var k=this.createViewer(c.childNodes[0],d);e=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=c;
+this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");for(var e=k.model,e=e.getChildCells(e.getRoot()),m=0;m<e.length;m++)this.createLayerItem(e[m],b,k,d)});mxEvent.addListener(c,"click",e);this.aspect.pageId==b&&e()};
+AspectDialog.prototype.createLayerItem=function(b,e,d,c){e=d.convertValueToString(b)||mxResources.get("background")||"Background";var k=document.createElement("div");k.setAttribute("data-layer-id",b.id);k.className="geAspectDlgListItem";k.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.layersContainer.appendChild(k);this.createViewer(k.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=k.className.indexOf("geAspectDlgListItemSelected")?
+(k.className="geAspectDlgListItem",delete this.selectedLayers[b.id],0==Object.keys(this.selectedLayers).length&&this.okBtn.setAttribute("disabled","disabled")):(k.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(k,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};
+var FilePropertiesDialog=function(b){var e,d,c=document.createElement("table"),k=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";var g=b.getCurrentFile();e=null!=g&&null!=g.getTitle()?g.getTitle():this.editorUi.defaultFilename;d=null;if(/(\.png)$/i.test(e)){var m=1,f=0;e=b.fileNode;null!=e&&(e.hasAttribute("scale")&&(m=parseFloat(e.getAttribute("scale"))),e.hasAttribute("border")&&(f=parseInt(e.getAttribute("border"))));e=document.createElement("tr");d=document.createElement("td");
+d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";mxUtils.write(d,mxResources.get("zoom")+":");e.appendChild(d);var l=document.createElement("input");l.setAttribute("value",100*m+"%");l.style.marginLeft="4px";l.style.width="180px";d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(l);e.appendChild(d);k.appendChild(e);e=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";
+mxUtils.write(d,mxResources.get("borderWidth")+":");e.appendChild(d);var n=document.createElement("input");n.setAttribute("value",f);n.style.marginLeft="4px";n.style.width="180px";d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(n);e.appendChild(d);k.appendChild(e);this.init=function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null)};d=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
+parseInt(l.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(n.value))),null!=g&&g.fileChanged());b.hideDialog()}}else{m=null!=g?g.isCompressed():Editor.compressXml;e=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";d.style.width="120px";mxUtils.write(d,mxResources.get("compressed")+":");e.appendChild(d);var p=document.createElement("input");p.setAttribute("type","checkbox");m&&(p.setAttribute("checked","checked"),p.defaultChecked=
+!0);d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(p);e.appendChild(d);k.appendChild(e);this.init=function(){p.focus()};d=function(){null!=b.fileNode&&(b.fileNode.setAttribute("compressed",p.checked?"true":"false"),null!=g&&g.fileChanged());b.hideDialog()}}m=mxUtils.button(mxResources.get("apply"),d);m.className="geBtn gePrimaryBtn";e=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align",
+"right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);d.appendChild(m);b.editor.cancelFirst||d.appendChild(f);e.appendChild(d);k.appendChild(e);c.appendChild(k);this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/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",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
@@ -10307,21 +10311,21 @@ c){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}}]
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(b){return"orthogonalEdgeStyle"==mxUtils.getValue(b.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:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",
-defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(b,c){var f=c.editorUi.editor.graph;return"1"==urlParams.test&&1==b.vertices.length&&0==b.edges.length&&f.isTableCell(b.vertices[0])}},{type:"separator"},
-{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(b,c){var f=c.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(f,"resizeLastRow","0")},isVisible:function(b,c){var f=c.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&f.isTable(b.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(b,c){var f=c.editorUi.editor.graph.getCellStyle(1==
-b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(f,"resizeLast","0")},isVisible:function(b,c){var f=c.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&f.isTable(b.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:"block",dispName:"Block"},{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(b,c){return c.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,c){return 1==b.vertices.length&&
-0==b.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"},{val:"centerPerimeter",dispName:"Center"}]},{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(b,c){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,c){var f=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,d=c.editorUi.editor.graph;return null!=f&&(d.isSwimlane(f)||0<d.model.getChildCount(f))},isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,c){var f=1==b.vertices.length&&
-0==b.edges.length?b.vertices[0]:null,d=c.editorUi.editor.graph;return null!=f&&(d.isContainer(f)&&"0"!=b.style.collapsible||!d.isContainer(f)&&"1"==b.style.collapsible)},isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length&&!c.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",
-dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,c){var f=c.editorUi.editor.graph.model;return 0<b.vertices.length?f.isVertex(f.getParent(b.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(b,c){var f=0<b.vertices.length?c.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=f&&!f.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(b,c){var f=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return c.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==f||f==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
-type:"bool",defVal:!1,isVisible:function(b,c){return 0<b.vertices.length&&c.editorUi.editor.graph.isContainer(b.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## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\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## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\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## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\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\nTessa 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-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa 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\nAlison Donovan,System Admin,rdo,Office 3,Tessa 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\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(b){var c=rough.canvas({getContext:function(){return b}});c.draw=function(c){var f=c.sets||[];c=c.options||this.getDefaultOptions();for(var d=0;d<f.length;d++){var e=f[d];switch(e.type){case "path":null!=c.stroke&&this._drawToContext(b,e,c);break;case "fillPath":this._drawToContext(b,e,c);break;case "fillSketch":this.fillSketch(b,e,c)}}};c.fillSketch=function(c,f,d){var e=b.state.strokeColor,l=b.state.strokeWidth,m=b.state.strokeAlpha,g=b.state.dashed,k=d.fillWeight;
-0>k&&(k=d.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(d.fill||"");b.setStrokeWidth(k);b.setDashed(!1);this._drawToContext(c,f,d);b.setDashed(g);b.setStrokeWidth(l);b.setStrokeColor(e);b.setStrokeAlpha(m)};c._drawToContext=function(b,c,f){b.begin();for(var d=0;d<c.ops.length;d++){var e=c.ops[d],l=e.data;switch(e.op){case "move":b.moveTo(l[0],l[1]);break;case "bcurveTo":b.curveTo(l[0],l[1],l[2],l[3],l[4],l[5]);break;case "lineTo":b.lineTo(l[0],l[1])}}b.end();"fillPath"===c.type&&
+defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(b,c){var f=c.editorUi.editor.graph;return"1"==urlParams.test&&1==b.vertices.length&&0==b.edges.length&&f.isTableCell(b.vertices[0])}},{name:"rowspan",
+dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(b,c){var f=c.editorUi.editor.graph;return"1"==urlParams.test&&1==b.vertices.length&&0==b.edges.length&&f.isTableCell(b.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(b,c){var f=c.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(f,"resizeLastRow","0")},isVisible:function(b,c){var f=c.editorUi.editor.graph;
+return 1==b.vertices.length&&0==b.edges.length&&f.isTable(b.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(b,c){var f=c.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(f,"resizeLast","0")},isVisible:function(b,c){var f=c.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&f.isTable(b.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:"block",dispName:"Block"},{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(b,c){return c.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,c){return 1==b.vertices.length&&0==b.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"},{val:"centerPerimeter",dispName:"Center"}]},{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(b,c){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,c){var f=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,d=c.editorUi.editor.graph;return null!=
+f&&(d.isSwimlane(f)||0<d.model.getChildCount(f))},isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,c){var f=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,d=c.editorUi.editor.graph;return null!=f&&(d.isContainer(f)&&"0"!=b.style.collapsible||!d.isContainer(f)&&"1"==b.style.collapsible)},isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",
+dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,c){return 1==b.vertices.length&&0==b.edges.length&&!c.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,c){var f=c.editorUi.editor.graph.model;return 0<b.vertices.length?f.isVertex(f.getParent(b.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(b,c){var f=0<b.vertices.length?c.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=f&&!f.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(b,c){var f=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return c.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==f||f==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(b,c){return 0<b.vertices.length&&c.editorUi.editor.graph.isContainer(b.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## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\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## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\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## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\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\nTessa 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-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa 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\nAlison Donovan,System Admin,rdo,Office 3,Tessa 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\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(b){var c=rough.canvas({getContext:function(){return b}});c.draw=function(c){var f=c.sets||[];c=c.options||this.getDefaultOptions();for(var d=0;d<f.length;d++){var e=f[d];switch(e.type){case "path":null!=c.stroke&&this._drawToContext(b,e,c);break;case "fillPath":this._drawToContext(b,e,c);break;case "fillSketch":this.fillSketch(b,e,c)}}};c.fillSketch=function(c,f,d){var e=b.state.strokeColor,l=b.state.strokeWidth,n=b.state.strokeAlpha,g=b.state.dashed,k=d.fillWeight;
+0>k&&(k=d.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(d.fill||"");b.setStrokeWidth(k);b.setDashed(!1);this._drawToContext(c,f,d);b.setDashed(g);b.setStrokeWidth(l);b.setStrokeColor(e);b.setStrokeAlpha(n)};c._drawToContext=function(b,c,f){b.begin();for(var d=0;d<c.ops.length;d++){var e=c.ops[d],l=e.data;switch(e.op){case "move":b.moveTo(l[0],l[1]);break;case "bcurveTo":b.curveTo(l[0],l[1],l[2],l[3],l[4],l[5]);break;case "lineTo":b.lineTo(l[0],l[1])}}b.end();"fillPath"===c.type&&
f.filled?b.fill():b.stroke()};return c};(function(){function b(c,f,d){this.canvas=c;this.rc=f;this.shape=d;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,b.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,b.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,b.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,b.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,b.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,b.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,b.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,b.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
b.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,b.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,b.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,b.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,b.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,b.prototype.fillAndStroke);
@@ -10331,20 +10335,20 @@ mxUtils.getValue(this.shape.style,"simplification",d.simplification);f.disableMu
"zigzagOffset",l);l=mxUtils.getValue(this.shape.style,"fillWeight",-1);f.fillWeight="auto"==l?-1:l;l=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==l&&(l=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",l=null!=f.fill&&(null!=e||null!=l&&f.fill.toLowerCase()==l.toLowerCase())?"solid":d.fillStyle);f.fillStyle=l;return f};b.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&
this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};b.prototype.lineTo=function(b,c){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,b,c),this.lastX=b,this.lastY=c)};b.prototype.moveTo=
function(b,c){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,c),this.lastX=b,this.lastY=c,this.firstX=b,this.firstY=c)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,c,f,d){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,c,f,d),this.lastX=f,this.lastY=d)};b.prototype.curveTo=function(b,c,f,d,e,l){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,c,f,d,e,l),this.lastX=e,this.lastY=l)};b.prototype.arcTo=function(b,c,f,d,e,l,m){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var g=mxUtils.arcToCurves(this.lastX,this.lastY,b,c,f,d,e,l,m);if(null!=g)for(var k=0;k<g.length;k+=6)this.curveTo(g[k],g[k+1],g[k+2],g[k+3],g[k+4],g[k+5]);this.lastX=l;this.lastY=m}};b.prototype.rect=function(b,c,f,d){this.passThrough?this.originalRect.apply(this.canvas,
+this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,c,f,d,e,l),this.lastX=e,this.lastY=l)};b.prototype.arcTo=function(b,c,f,d,e,l,n){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var g=mxUtils.arcToCurves(this.lastX,this.lastY,b,c,f,d,e,l,n);if(null!=g)for(var k=0;k<g.length;k+=6)this.curveTo(g[k],g[k+1],g[k+2],g[k+3],g[k+4],g[k+5]);this.lastX=l;this.lastY=n}};b.prototype.rect=function(b,c,f,d){this.passThrough?this.originalRect.apply(this.canvas,
arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,c,f,d,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,c,f,d){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+f/2,c+d/2,f,d,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,c,f,d,e,l){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,c),this.lineTo(b+f-e,c),this.quadTo(b+f,c,b+f,c+l),this.lineTo(b+
f,c+d-l),this.quadTo(b+f,c+d,b+f-e,c+d),this.lineTo(b+e,c+d),this.quadTo(b,c+d,b,c+d-l),this.lineTo(b,c+l),this.quadTo(b,c,b+e,c))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var c in b)this.nextShape.options[c]=b[c];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};b.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;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(c){return new b(c,Editor.createRoughCanvas(c),this)};var c=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?c.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):this.createRoughCanvas(b)};var f=mxShape.prototype.paint;
-mxShape.prototype.paint=function(c){var d=c.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=c.handJiggle&&c.handJiggle.constructor==b&&!this.outline){c.save();var l=this.fill,m=this.stroke;this.stroke=this.fill=null;var g=this.configurePointerEvents,k=c.setStrokeColor;c.setStrokeColor=function(){};var p=c.setFillColor;c.setFillColor=function(){};e||null==l||(this.configurePointerEvents=function(){});c.handJiggle.passThrough=!0;
-f.apply(this,arguments);c.handJiggle.passThrough=!1;c.setFillColor=p;c.setStrokeColor=k;this.configurePointerEvents=g;this.stroke=m;this.fill=l;c.restore();e&&null!=l&&(c.addTolerance=function(){})}f.apply(this,arguments);c.addTolerance=d};var d=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(c,f,e,l,m,g){null!=c.handJiggle&&c.handJiggle.constructor==b?(c.handJiggle.passThrough=!0,d.apply(this,arguments),c.handJiggle.passThrough=!1):d.apply(this,arguments)}})();Editor.fastCompress=
+mxShape.prototype.paint=function(c){var d=c.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=c.handJiggle&&c.handJiggle.constructor==b&&!this.outline){c.save();var l=this.fill,n=this.stroke;this.stroke=this.fill=null;var g=this.configurePointerEvents,k=c.setStrokeColor;c.setStrokeColor=function(){};var p=c.setFillColor;c.setFillColor=function(){};e||null==l||(this.configurePointerEvents=function(){});c.handJiggle.passThrough=!0;
+f.apply(this,arguments);c.handJiggle.passThrough=!1;c.setFillColor=p;c.setStrokeColor=k;this.configurePointerEvents=g;this.stroke=n;this.fill=l;c.restore();e&&null!=l&&(c.addTolerance=function(){})}f.apply(this,arguments);c.addTolerance=d};var d=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(c,f,e,l,n,g){null!=c.handJiggle&&c.handJiggle.constructor==b?(c.handJiggle.passThrough=!0,d.apply(this,arguments),c.handJiggle.passThrough=!1):d.apply(this,arguments)}})();Editor.fastCompress=
function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,c,f){if(null!=b&&"undefined"!==typeof pako){var d=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=d&&0<d.length)for(var l=0;l<d.length;l++)if("mxgraph"==d[l].getAttribute("class")){e.push(d[l]);
break}0<e.length&&(d=e[0].getAttribute("data-mxgraph"),null!=d?(e=JSON.parse(d),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(d=mxUtils.getTextContent(e[0]),d=Graph.decompress(d,null,f),0<d.length&&(b=mxUtils.parseXml(d),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(d=b.getAttribute("content"),null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&
(d=decodeURIComponent(d)),null!=d&&0<d.length)b=mxUtils.parseXml(d).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||c||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(d=b.getElementsByTagName("diagram"),0<d.length&&(e=d[Math.max(0,Math.min(d.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,f)));null==b||"mxGraphModel"==b.nodeName||c&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,c){var f=mxUtils.trim(mxUtils.getTextContent(b)),
d=null;0<f.length?(f=Graph.decompress(f,null,c),null!=f&&0<f.length&&(d=mxUtils.parseXml(f).documentElement)):(f=mxUtils.getChildNodes(b),0<f.length&&(d=mxUtils.createXmlDocument(),d.appendChild(d.importNode(f[0],!0)),d=d.documentElement));return d};Editor.getDiagramNodeXml=function(b){var c=mxUtils.getTextContent(b),f=null;0<c.length?f=Graph.decompress(c):null!=b.firstChild&&(f=mxUtils.getXml(b.firstChild));return f};Editor.extractGraphModelFromPdf=function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&
-!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var c=b.indexOf("EmbeddedFile");if(-1<c){var f=b.indexOf("stream",c)+9;if(0<b.substring(c,f).indexOf("application#2Fvnd.jgraph.mxfile"))return c=b.indexOf("endstream",f-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(f,c)),{to:"string"})}return null}for(var f=null,c="",d=0,e=0,l=[],m=null;e<b.length;){var g=b.charCodeAt(e),e=e+1;10!=g&&(c+=String.fromCharCode(g));g=="/Subject (%3Cmxfile".charCodeAt(d)?d++:d=0;if(19==
-d){var k=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(k>e){f=b.substring(e,k);break}}10==g&&("endobj"==c?m=null:"obj"==c.substring(c.length-3,c.length)||"xref"==c||"trailer"==c?(m=[],l[c.split(" ")[0]]=m):null!=m&&m.push(c),c="")}null==f&&(f=Editor.extractGraphModelFromXref(l));null!=f&&(f=decodeURIComponent(f.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return f};Editor.extractGraphModelFromXref=function(b){var c=b.trailer,f=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<
+!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var c=b.indexOf("EmbeddedFile");if(-1<c){var f=b.indexOf("stream",c)+9;if(0<b.substring(c,f).indexOf("application#2Fvnd.jgraph.mxfile"))return c=b.indexOf("endstream",f-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(f,c)),{to:"string"})}return null}for(var f=null,c="",d=0,e=0,l=[],n=null;e<b.length;){var g=b.charCodeAt(e),e=e+1;10!=g&&(c+=String.fromCharCode(g));g=="/Subject (%3Cmxfile".charCodeAt(d)?d++:d=0;if(19==
+d){var k=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(k>e){f=b.substring(e,k);break}}10==g&&("endobj"==c?n=null:"obj"==c.substring(c.length-3,c.length)||"xref"==c||"trailer"==c?(n=[],l[c.split(" ")[0]]=n):null!=n&&n.push(c),c="")}null==f&&(f=Editor.extractGraphModelFromXref(l));null!=f&&(f=decodeURIComponent(f.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return f};Editor.extractGraphModelFromXref=function(b){var c=b.trailer,f=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<
c.length&&(c=b[c[1]],null!=c&&(c=/.* \/Subject (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&(b=b[c[1]],null!=b&&(b=b.join("\n"),f=b.substring(1,b.length-1))))));return f};Editor.extractGraphModelFromPng=function(b){var c=null;try{var f=b.substring(b.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(b,f,e){b=d.substring(b+8,b+8+e);"zTXt"==f?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(c=b))):"tEXt"==f&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(c=b[1]));if(null!=c||"IDAT"==f)return!0}))}catch(O){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(b,c){var f=null,d=null!=b?b.getElementsByTagName("parsererror"):null;null!=d&&0<d.length&&(f=c||mxResources.get("invalidChars"),d=d[0].getElementsByTagName("div"),
0<d.length&&(f=mxUtils.getTextContent(d[0])));return null!=f?mxUtils.trim(f):f};Editor.addRetryToError=function(b,c){if(null!=b){var f=null!=b.error?b.error:b;null==f.retry&&(f.retry=c)}};Editor.configure=function(b,c){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
@@ -10373,27 +10377,27 @@ function(b,f,d,e){void 0!==f?c.push(f.replace(/\\'/g,"'")):void 0!==d?c.push(d.r
"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var c=b.convert,f=this;b.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=Editor.svgBrokenImage.src:!e||d.substring(0,b.baseUrl.length)==b.baseUrl||f.crossOriginImages&&f.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=c.apply(this,arguments)):
d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,c){try{var f=!0,d=window.setTimeout(mxUtils.bind(this,function(){f=!1;c(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){window.clearTimeout(d);f&&c(Editor.createSvgDataUri(b.getText()))}),function(){window.clearTimeout(d);
f&&c(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(f)try{var b=document.createElement("canvas"),l=b.getContext("2d");b.height=e.height;b.width=e.width;l.drawImage(e,0,0);c(b.toDataURL())}catch(ga){c(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);f&&c(Editor.svgBrokenImage.src)};e.src=b}}catch(Y){c(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(b,c,f,
-d){null==d&&(d=this.createImageUrlConverter());var e=0,l=f||{};f=mxUtils.bind(this,function(f,m){for(var g=b.getElementsByTagName(f),k=0;k<g.length;k++)mxUtils.bind(this,function(f){try{if(null!=f){var g=d.convert(f.getAttribute(m));if(null!=g&&"data:"!=g.substring(0,5)){var k=l[g];null==k?(e++,this.convertImageToDataUri(g,function(d){null!=d&&(l[g]=d,f.setAttribute(m,d));e--;0==e&&c(b)})):f.setAttribute(m,k)}else null!=g&&f.setAttribute(m,g)}}catch(X){}})(g[k])});f("image","xlink:href");f("img",
-"src");0==e&&c(b)};Editor.base64Encode=function(b){for(var c="",f=0,d=b.length,e,l,m;f<d;){e=b.charCodeAt(f++)&255;if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}l=b.charCodeAt(f++);if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<
-4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);c+="=";break}m=b.charCodeAt(f++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(m&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m&63)}return c};
-Editor.prototype.loadUrl=function(b,c,f,d,e,l,m,g){try{var k=!m&&(d||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=c){var d=b.getText();if(k){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
+d){null==d&&(d=this.createImageUrlConverter());var e=0,l=f||{};f=mxUtils.bind(this,function(f,n){for(var g=b.getElementsByTagName(f),k=0;k<g.length;k++)mxUtils.bind(this,function(f){try{if(null!=f){var g=d.convert(f.getAttribute(n));if(null!=g&&"data:"!=g.substring(0,5)){var k=l[g];null==k?(e++,this.convertImageToDataUri(g,function(d){null!=d&&(l[g]=d,f.setAttribute(n,d));e--;0==e&&c(b)})):f.setAttribute(n,k)}else null!=g&&f.setAttribute(n,g)}}catch(X){}})(g[k])});f("image","xlink:href");f("img",
+"src");0==e&&c(b)};Editor.base64Encode=function(b){for(var c="",f=0,d=b.length,e,l,n;f<d;){e=b.charCodeAt(f++)&255;if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}l=b.charCodeAt(f++);if(f==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<
+4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);c+="=";break}n=b.charCodeAt(f++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2|(n&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n&63)}return c};
+Editor.prototype.loadUrl=function(b,c,f,d,e,l,n,g){try{var k=!n&&(d||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=c){var d=b.getText();if(k){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
for(var d=Array(b.length),e=0;e<b.length;e++)d[e]=String.fromCharCode(b[e]);d=d.join("")}l=null!=l?l:"data:image/png;base64,";d=l+Editor.base64Encode(d)}c(d)}}else null!=f&&(0==b.getStatus()?f({message:mxResources.get("accessDenied")},b):f({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=f&&f({message:mxResources.get("error")+" "+b.getStatus()})},k,this.timeout,function(){e&&null!=f&&f({code:App.ERROR_TIMEOUT,retry:p})},g)});p()}catch(la){null!=f&&f(la)}};Editor.prototype.absoluteCssFonts=
-function(b){var c=null;if(null!=b){var f=b.split("url(");if(0<f.length){c=[f[0]];b=window.location.pathname;var d=null!=b?b.lastIndexOf("/"):-1;0<=d&&(b=b.substring(0,d+1));var d=document.getElementsByTagName("base"),e=null;null!=d&&0<d.length&&(e=d[0].getAttribute("href"));for(var l=1;l<f.length;l++)if(d=f[l].indexOf(")"),0<d){var m=Editor.trimCssUrl(f[l].substring(0,d));this.graph.isRelativeUrl(m)&&(m=null!=e?e+m:window.location.protocol+"//"+window.location.hostname+("/"==m.charAt(0)?"":b)+m);
-c.push('url("'+m+'"'+f[l].substring(d))}else c.push(f[l])}else c=[b]}return null!=c?c.join(""):null};Editor.prototype.embedCssFonts=function(b,c){var f=b.split("url("),d=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==d){for(var b=[f[0]],e=1;e<f.length;e++){var l=f[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(f[e].substring(0,l))]);b.push('"'+f[e].substring(l))}c(b.join(""))}});if(0<f.length){for(var l=1;l<f.length;l++){var m=f[l].indexOf(")"),
-g=null,k=f[l].indexOf("format(",m);0<k&&(g=Editor.trimCssUrl(f[l].substring(k+7,f[l].indexOf(")",k))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;d++;var c="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(b))c="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(b))c="application/x-font-opentype";else if("woff"==g||/(\.woff)($|\?)/i.test(b))c="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(b))c="application/font-woff2";
-else if("eot"==g||/(\.eot)($|\?)/i.test(b))c="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(b))c="application/font-sfnt";var f=b;/^https?:\/\//.test(f)&&!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(f,mxUtils.bind(this,function(c){this.cachedFonts[b]=c;d--;e()}),mxUtils.bind(this,function(b){d--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(f[l].substring(0,m)),g)}e()}else c(b)};Editor.prototype.loadFonts=
+function(b){var c=null;if(null!=b){var f=b.split("url(");if(0<f.length){c=[f[0]];b=window.location.pathname;var d=null!=b?b.lastIndexOf("/"):-1;0<=d&&(b=b.substring(0,d+1));var d=document.getElementsByTagName("base"),e=null;null!=d&&0<d.length&&(e=d[0].getAttribute("href"));for(var l=1;l<f.length;l++)if(d=f[l].indexOf(")"),0<d){var n=Editor.trimCssUrl(f[l].substring(0,d));this.graph.isRelativeUrl(n)&&(n=null!=e?e+n:window.location.protocol+"//"+window.location.hostname+("/"==n.charAt(0)?"":b)+n);
+c.push('url("'+n+'"'+f[l].substring(d))}else c.push(f[l])}else c=[b]}return null!=c?c.join(""):null};Editor.prototype.embedCssFonts=function(b,c){var f=b.split("url("),d=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==d){for(var b=[f[0]],e=1;e<f.length;e++){var l=f[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(f[e].substring(0,l))]);b.push('"'+f[e].substring(l))}c(b.join(""))}});if(0<f.length){for(var l=1;l<f.length;l++){var n=f[l].indexOf(")"),
+g=null,k=f[l].indexOf("format(",n);0<k&&(g=Editor.trimCssUrl(f[l].substring(k+7,f[l].indexOf(")",k))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;d++;var c="application/x-font-ttf";if("svg"==g||/(\.svg)($|\?)/i.test(b))c="image/svg+xml";else if("otf"==g||"embedded-opentype"==g||/(\.otf)($|\?)/i.test(b))c="application/x-font-opentype";else if("woff"==g||/(\.woff)($|\?)/i.test(b))c="application/font-woff";else if("woff2"==g||/(\.woff2)($|\?)/i.test(b))c="application/font-woff2";
+else if("eot"==g||/(\.eot)($|\?)/i.test(b))c="application/vnd.ms-fontobject";else if("sfnt"==g||/(\.sfnt)($|\?)/i.test(b))c="application/font-sfnt";var f=b;/^https?:\/\//.test(f)&&!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(f,mxUtils.bind(this,function(c){this.cachedFonts[b]=c;d--;e()}),mxUtils.bind(this,function(b){d--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(Editor.trimCssUrl(f[l].substring(0,n)),g)}e()}else c(b)};Editor.prototype.loadFonts=
function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(c){this.resolvedFontCss=c;b()})):b()};Editor.prototype.embedExtFonts=function(b){var c=this.graph.getCustomFonts();if(0<c.length){var f="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(f,b)}),l=0;l<c.length;l++)mxUtils.bind(this,function(b,c){Graph.isCssFontUrl(c)?null==this.cachedGoogleFonts[c]?(d++,this.loadUrl(c,
mxUtils.bind(this,function(b){this.cachedGoogleFonts[c]=b;f+=b;d--;e()}),mxUtils.bind(this,function(b){d--;f+="@import url("+c+");";e()}))):f+=this.cachedGoogleFonts[c]:f+='@font-face {font-family: "'+b+'";src: url("'+c+'")}'})(c[l].name,c[l].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var c=document.getElementsByTagName("style"),f=0;f<c.length;f++)0<mxUtils.getTextContent(c[f]).indexOf("MathJax")&&b[0].appendChild(c[f].cloneNode(!0))};
Editor.prototype.addFontCss=function(b,c){c=null!=c?c:this.absoluteCssFonts(this.fontCss);if(null!=c){var f=b.getElementsByTagName("defs"),d=b.ownerDocument;0==f.length?(f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"),null!=b.firstChild?b.insertBefore(f,b.firstChild):b.appendChild(f)):f=f[0];d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,c);f.appendChild(d)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,c,f){var d=mxClient.IS_FF?8192:16384;return Math.min(f,Math.min(d/b,d/c))};Editor.prototype.exportToCanvas=function(b,c,f,d,e,l,m,g,k,p,q,n,t,y,u,v,B,A){try{l=null!=l?l:!0;m=null!=m?m:!0;n=null!=n?n:this.graph;t=null!=t?t:0;var x=k?null:n.background;x==mxConstants.NONE&&(x=null);null==x&&(x=d);null==x&&0==k&&(x=v?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(n.getSvg(null,null,t,y,null,m,null,null,null,p,null,v,B,A),mxUtils.bind(this,function(f){try{var d=new Image;d.onload=mxUtils.bind(this,function(){try{var m=function(){mxClient.IS_SF?window.setTimeout(function(){y.drawImage(d,0,0);b(k,f)},0):(y.drawImage(d,0,0),b(k,f))},k=document.createElement("canvas"),p=parseInt(f.getAttribute("width")),q=parseInt(f.getAttribute("height"));g=null!=g?g:1;null!=c&&(g=l?Math.min(1,Math.min(3*c/(4*q),c/p)):c/p);g=this.getMaxCanvasScale(p,q,g);p=
-Math.ceil(g*p);q=Math.ceil(g*q);k.setAttribute("width",p);k.setAttribute("height",q);var y=k.getContext("2d");null!=x&&(y.beginPath(),y.rect(0,0,p,q),y.fillStyle=x,y.fill());1!=g&&y.scale(g,g);if(u){var v=n.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,C=n.gridSize*v.gridSteps*g,K=n.getGraphBounds(),F=v.translate.x*B,z=v.translate.y*B,I=F+(K.x-F)/B-t,M=z+(K.y-z)/B-t,D=new Image;D.onload=function(){try{for(var b=
--Math.round(C-mxUtils.mod((F-I)*g,C)),c=-Math.round(C-mxUtils.mod((z-M)*g,C));b<p;b+=C)for(var f=c;f<q;f+=C)y.drawImage(D,b/g,f/g);m()}catch(Aa){null!=e&&e(Aa)}};D.onerror=function(b){null!=e&&e(b)};D.src=A}else m()}catch(sa){null!=e&&e(sa)}});d.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(f);this.graph.mathEnabled&&this.addMathCss(f);var m=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(f,this.resolvedFontCss),d.src=Editor.createSvgDataUri(mxUtils.getXml(f))}catch(Z){null!=
-e&&e(Z)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(f,b),this.loadFonts(m)}catch(ha){null!=e&&e(ha)}}))}catch(Z){null!=e&&e(Z)}}),f,q)}catch(ka){null!=e&&e(ka)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var k=g,n=0;8>n;n++)k=1==(k&1)?3988292384^k>>>1:k>>>1,Editor.crcTable[g]=k;Editor.updateCRC=function(b,c,f,d){for(var e=0;e<d;e++)b=Editor.crcTable[(b^c.charCodeAt(f+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var c=-1,f=0;f<b.length;f++)c=c>>>8^Editor.crcTable[(c^
-b.charCodeAt(f))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(b,c,f,d,e){function l(b,c){var f=k;k+=c;return b.substring(f,k)}function m(b){b=l(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function g(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var k=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(l(b,
-4),"IHDR"!=l(b,4))null!=e&&e();else{l(b,17);e=b.substring(0,k);do{var p=m(b);if("IDAT"==l(b,4)){e=b.substring(0,k-8);"pHYs"==c&&"dpi"==f?(f=Math.round(d/.0254),f=g(f)+g(f)+String.fromCharCode(1)):f=f+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+d;d=4294967295;d=Editor.updateCRC(d,c,0,4);d=Editor.updateCRC(d,f,0,f.length);e+=g(f.length)+c+f+g(d^4294967295);e+=b.substring(k-8,b.length);break}e+=b.substring(k-8,k-4+p);l(b,p);l(b,4)}while(p);return"data:image/png;base64,"+(window.btoa?
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,c,f){var d=mxClient.IS_FF?8192:16384;return Math.min(f,Math.min(d/b,d/c))};Editor.prototype.exportToCanvas=function(b,c,f,d,e,l,n,g,k,p,q,m,t,y,u,v,B,A){try{l=null!=l?l:!0;n=null!=n?n:!0;m=null!=m?m:this.graph;t=null!=t?t:0;var x=k?null:m.background;x==mxConstants.NONE&&(x=null);null==x&&(x=d);null==x&&0==k&&(x=v?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(m.getSvg(null,null,t,y,null,n,null,null,null,p,null,v,B,A),mxUtils.bind(this,function(f){try{var d=new Image;d.onload=mxUtils.bind(this,function(){try{var n=function(){mxClient.IS_SF?window.setTimeout(function(){y.drawImage(d,0,0);b(k,f)},0):(y.drawImage(d,0,0),b(k,f))},k=document.createElement("canvas"),p=parseInt(f.getAttribute("width")),q=parseInt(f.getAttribute("height"));g=null!=g?g:1;null!=c&&(g=l?Math.min(1,Math.min(3*c/(4*q),c/p)):c/p);g=this.getMaxCanvasScale(p,q,g);p=
+Math.ceil(g*p);q=Math.ceil(g*q);k.setAttribute("width",p);k.setAttribute("height",q);var y=k.getContext("2d");null!=x&&(y.beginPath(),y.rect(0,0,p,q),y.fillStyle=x,y.fill());1!=g&&y.scale(g,g);if(u){var v=m.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,C=m.gridSize*v.gridSteps*g,E=m.getGraphBounds(),K=v.translate.x*B,z=v.translate.y*B,I=K+(E.x-K)/B-t,M=z+(E.y-z)/B-t,D=new Image;D.onload=function(){try{for(var b=
+-Math.round(C-mxUtils.mod((K-I)*g,C)),c=-Math.round(C-mxUtils.mod((z-M)*g,C));b<p;b+=C)for(var f=c;f<q;f+=C)y.drawImage(D,b/g,f/g);n()}catch(Aa){null!=e&&e(Aa)}};D.onerror=function(b){null!=e&&e(b)};D.src=A}else n()}catch(sa){null!=e&&e(sa)}});d.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(f);this.graph.mathEnabled&&this.addMathCss(f);var n=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(f,this.resolvedFontCss),d.src=Editor.createSvgDataUri(mxUtils.getXml(f))}catch(Z){null!=
+e&&e(Z)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(f,b),this.loadFonts(n)}catch(ha){null!=e&&e(ha)}}))}catch(Z){null!=e&&e(Z)}}),f,q)}catch(ka){null!=e&&e(ka)}};Editor.crcTable=[];for(var k=0;256>k;k++)for(var g=k,m=0;8>m;m++)g=1==(g&1)?3988292384^g>>>1:g>>>1,Editor.crcTable[k]=g;Editor.updateCRC=function(b,c,f,d){for(var e=0;e<d;e++)b=Editor.crcTable[(b^c.charCodeAt(f+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var c=-1,f=0;f<b.length;f++)c=c>>>8^Editor.crcTable[(c^
+b.charCodeAt(f))&255];return(c^-1)>>>0};Editor.writeGraphModelToPng=function(b,c,f,d,e){function l(b,c){var f=k;k+=c;return b.substring(f,k)}function n(b){b=l(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function g(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var k=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(l(b,
+4),"IHDR"!=l(b,4))null!=e&&e();else{l(b,17);e=b.substring(0,k);do{var p=n(b);if("IDAT"==l(b,4)){e=b.substring(0,k-8);"pHYs"==c&&"dpi"==f?(f=Math.round(d/.0254),f=g(f)+g(f)+String.fromCharCode(1)):f=f+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+d;d=4294967295;d=Editor.updateCRC(d,c,0,4);d=Editor.updateCRC(d,f,0,f.length);e+=g(f.length)+c+f+g(d^4294967295);e+=b.substring(k-8,b.length);break}e+=b.substring(k-8,k-4+p);l(b,p);l(b,4)}while(p);return"data:image/png;base64,"+(window.btoa?
btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var f=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
-(EditDataDialog.getDisplayIdForCell=function(b,c){var f=null;null!=b.editor.graph.getModel().getParent(c)?f=c.getId():null!=b.currentPage&&(f=b.currentPage.getId());return f});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 p=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+(EditDataDialog.getDisplayIdForCell=function(b,c){var f=null;null!=b.editor.graph.getModel().getParent(c)?f=c.getId():null!=b.currentPage&&(f=b.currentPage.getId());return f});if(null!=window.StyleFormatPanel){var n=Format.prototype.init;Format.prototype.init=function(){n.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var p=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
p.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,f=c.editor.graph,d=this.createOption(mxResources.get("shadow"),
function(){return f.shadowVisible},function(b){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=b;f.model.execute(d)},{install:function(b){this.listener=function(){b(f.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.enableShadowOption||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));b.appendChild(d)}return b};var t=DiagramFormatPanel.prototype.addOptions;
DiagramFormatPanel.prototype.addOptions=function(b){b=t.apply(this,arguments);var c=this.editorUi,f=c.editor.graph;if(f.isEnabled()){var d=c.getCurrentFile();if(null!=d&&d.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(b){c.editor.setAutosave(b);c.editor.autosave&&d.isModified()&&d.fileChanged()},{install:function(b){this.listener=function(){b(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});
@@ -10424,34 +10428,34 @@ gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill
d(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{d(JSON.parse(b))}catch(Y){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var c={},f=b.vertices,d=b.edges,e=0;e<f.length;e++)this.findCommonProperties(f[e],c,0==
e);for(e=0;e<d.length;e++)this.findCommonProperties(d[e],c,0==f.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(c).length&&this.container.appendChild(this.addProperties(this.createPanel(),c,b))}};var v=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var c=this.format.getSelectionState(),f=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));f.setAttribute("title",
mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");f.style.marginBottom="2px";f.style.width="104px";f.style.marginRight="2px";b.appendChild(f);0<c.cells.length?(f=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("pasteStyle").funct()})),f.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),f.style.marginBottom="2px",f.style.width="104px",b.appendChild(f)):
-f.style.width="210px";mxUtils.br(b);return v.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,c,f){function d(b,c,f,d){n.getModel().beginUpdate();try{var e=[],l=[];if(null!=f.index){for(var m=[],g=f.parentRow.nextSibling;g&&g.getAttribute("data-pName")==b;)m.push(g.getAttribute("data-pValue")),g=g.nextSibling;f.index<m.length?null!=d?m.splice(d,1):m[f.index]=c:m.push(c);null!=f.size&&m.length>f.size&&(m=m.slice(0,f.size));c=m.join(",");
-null!=f.countProperty&&(n.setCellStyles(f.countProperty,m.length,n.getSelectionCells()),e.push(f.countProperty),l.push(m.length))}n.setCellStyles(b,c,n.getSelectionCells());e.push(b);l.push(c);if(null!=f.dependentProps)for(b=0;b<f.dependentProps.length;b++){var k=f.dependentPropsDefVal[b],p=f.dependentPropsVals[b];if(p.length>c)p=p.slice(0,c);else for(var t=p.length;t<c;t++)p.push(k);p=p.join(",");n.setCellStyles(f.dependentProps[b],p,n.getSelectionCells());e.push(f.dependentProps[b]);l.push(p)}if("function"==
-typeof f.onChange)f.onChange(n,c);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",l,"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}}function e(c,f,d){var e=mxUtils.getOffset(b,!0),l=mxUtils.getOffset(c,!0);f.style.position="absolute";f.style.left=l.x-e.x+"px";f.style.top=l.y-e.y+"px";f.style.width=c.offsetWidth+"px";f.style.height=c.offsetHeight-(d?4:0)+"px";f.style.zIndex=5}function l(b,c,f){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=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(l){this.editorUi.pickColor(c,function(c){e.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(b,c,f)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function m(b,c,f,e,l,m,g){null!=c&&(c=c.split(","),t.push({name:b,
-values:c,type:f,defVal:e,countProperty:l,parentRow:m,isDeletable:!0,flipBkg:g}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var k=m,q=0;null!=k.nextSibling;)if(k.nextSibling.getAttribute("data-pName")==b)k=k.nextSibling,q++;else break;var n={type:f,parentRow:m,index:q,isDeletable:!0,defVal:e,countProperty:l},q=p(b,"",n,0==q%2,g);d(b,e,n);k.parentNode.insertBefore(q,k.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function g(b,c,f,d,e,l,m){if(0<e){var g=Array(e);c=null!=c?c.split(","):[];for(var k=0;k<e;k++)g[k]=null!=c[k]?c[k]:null!=d?d:"";t.push({name:b,values:g,type:f,defVal:d,parentRow:l,flipBkg:m,size:e})}return document.createElement("div")}function k(b,c,f){var e=document.createElement("input");e.type="checkbox";e.checked="1"==c;mxEvent.addListener(e,"change",function(){d(b,e.checked?"1":"0",f)});return e}function p(c,f,p,n,t){var y=p.dispName,u=p.type,v=document.createElement("tr");v.className="gePropRow"+
-(t?"Dark":"")+(n?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",c);v.setAttribute("data-pValue",f);n=!1;null!=p.index&&(v.setAttribute("data-index",p.index),y=(null!=y?y:"")+"["+p.index+"]",n=!0);var B=document.createElement("td");B.className="gePropRowCell";y=mxResources.get(y,null,y);mxUtils.write(B,y);B.setAttribute("title",y);n&&(B.style.textAlign="right");v.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==u)B.appendChild(l(c,f,p));else if("bool"==
-u||"boolean"==u)B.appendChild(k(c,f,p));else if("enum"==u){var A=p.enumList;for(t=0;t<A.length;t++)if(y=A[t],y.val==f){mxUtils.write(B,mxResources.get(y.dispName,null,y.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(q,function(){var l=document.createElement("select");e(B,l);for(var m=0;m<A.length;m++){var g=A[m],k=document.createElement("option");k.value=mxUtils.htmlEntities(g.val);mxUtils.write(k,mxResources.get(g.dispName,null,g.dispName));l.appendChild(k)}l.value=f;b.appendChild(l);
-mxEvent.addListener(l,"change",function(){var b=mxUtils.htmlEntities(l.value);d(c,b,p)});l.focus();mxEvent.addListener(l,"blur",function(){b.removeChild(l)})}))}else"dynamicArr"==u?B.appendChild(m(c,f,p.subType,p.subDefVal,p.countProperty,v,t)):"staticArr"==u?B.appendChild(g(c,f,p.subType,p.subDefVal,p.size,v,t)):"readOnly"==u?(t=document.createElement("input"),t.setAttribute("readonly",""),t.value=f,t.style.width="96px",t.style.borderWidth="0px",B.appendChild(t)):(B.innerHTML=f,mxEvent.addListener(B,
-"click",mxUtils.bind(q,function(){function l(){var b=m.value,b=0==b.length&&"string"!=u?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",u="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==u?parseInt(b):b)+"");d(c,b,p)}var m=document.createElement("input");e(B,m,!0);m.value=f;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)));b.appendChild(m);mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&l()});m.focus();mxEvent.addListener(m,"blur",function(){l()})})));p.isDeletable&&(t=mxUtils.button("-",mxUtils.bind(q,function(b){d(c,"",p,p.index);mxEvent.consume(b)})),t.style.height="16px",t.style.width="25px",t.style["float"]="right",t.className="geColorBtn",B.appendChild(t));v.appendChild(B);return v}var q=this,n=this.editorUi.editor.graph,t=[];b.style.position=
+f.style.width="210px";mxUtils.br(b);return v.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,c,f){function d(b,c,f,d){m.getModel().beginUpdate();try{var e=[],l=[];if(null!=f.index){for(var n=[],g=f.parentRow.nextSibling;g&&g.getAttribute("data-pName")==b;)n.push(g.getAttribute("data-pValue")),g=g.nextSibling;f.index<n.length?null!=d?n.splice(d,1):n[f.index]=c:n.push(c);null!=f.size&&n.length>f.size&&(n=n.slice(0,f.size));c=n.join(",");
+null!=f.countProperty&&(m.setCellStyles(f.countProperty,n.length,m.getSelectionCells()),e.push(f.countProperty),l.push(n.length))}m.setCellStyles(b,c,m.getSelectionCells());e.push(b);l.push(c);if(null!=f.dependentProps)for(b=0;b<f.dependentProps.length;b++){var k=f.dependentPropsDefVal[b],p=f.dependentPropsVals[b];if(p.length>c)p=p.slice(0,c);else for(var t=p.length;t<c;t++)p.push(k);p=p.join(",");m.setCellStyles(f.dependentProps[b],p,m.getSelectionCells());e.push(f.dependentProps[b]);l.push(p)}if("function"==
+typeof f.onChange)f.onChange(m,c);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",l,"cells",m.getSelectionCells()))}finally{m.getModel().endUpdate()}}function e(c,f,d){var e=mxUtils.getOffset(b,!0),l=mxUtils.getOffset(c,!0);f.style.position="absolute";f.style.left=l.x-e.x+"px";f.style.top=l.y-e.y+"px";f.style.width=c.offsetWidth+"px";f.style.height=c.offsetHeight-(d?4:0)+"px";f.style.zIndex=5}function l(b,c,f){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=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(q,function(l){this.editorUi.pickColor(c,function(c){e.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(b,c,f)});mxEvent.consume(l)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function n(b,c,f,e,l,n,g){null!=c&&(c=c.split(","),t.push({name:b,
+values:c,type:f,defVal:e,countProperty:l,parentRow:n,isDeletable:!0,flipBkg:g}));btn=mxUtils.button("+",mxUtils.bind(q,function(c){for(var k=n,q=0;null!=k.nextSibling;)if(k.nextSibling.getAttribute("data-pName")==b)k=k.nextSibling,q++;else break;var m={type:f,parentRow:n,index:q,isDeletable:!0,defVal:e,countProperty:l},q=p(b,"",m,0==q%2,g);d(b,e,m);k.parentNode.insertBefore(q,k.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function g(b,c,f,d,e,l,n){if(0<e){var g=Array(e);c=null!=c?c.split(","):[];for(var k=0;k<e;k++)g[k]=null!=c[k]?c[k]:null!=d?d:"";t.push({name:b,values:g,type:f,defVal:d,parentRow:l,flipBkg:n,size:e})}return document.createElement("div")}function k(b,c,f){var e=document.createElement("input");e.type="checkbox";e.checked="1"==c;mxEvent.addListener(e,"change",function(){d(b,e.checked?"1":"0",f)});return e}function p(c,f,p,m,t){var y=p.dispName,u=p.type,v=document.createElement("tr");v.className="gePropRow"+
+(t?"Dark":"")+(m?"Alt":"")+" gePropNonHeaderRow";v.setAttribute("data-pName",c);v.setAttribute("data-pValue",f);m=!1;null!=p.index&&(v.setAttribute("data-index",p.index),y=(null!=y?y:"")+"["+p.index+"]",m=!0);var B=document.createElement("td");B.className="gePropRowCell";y=mxResources.get(y,null,y);mxUtils.write(B,y);B.setAttribute("title",y);m&&(B.style.textAlign="right");v.appendChild(B);B=document.createElement("td");B.className="gePropRowCell";if("color"==u)B.appendChild(l(c,f,p));else if("bool"==
+u||"boolean"==u)B.appendChild(k(c,f,p));else if("enum"==u){var A=p.enumList;for(t=0;t<A.length;t++)if(y=A[t],y.val==f){mxUtils.write(B,mxResources.get(y.dispName,null,y.dispName));break}mxEvent.addListener(B,"click",mxUtils.bind(q,function(){var l=document.createElement("select");e(B,l);for(var n=0;n<A.length;n++){var g=A[n],k=document.createElement("option");k.value=mxUtils.htmlEntities(g.val);mxUtils.write(k,mxResources.get(g.dispName,null,g.dispName));l.appendChild(k)}l.value=f;b.appendChild(l);
+mxEvent.addListener(l,"change",function(){var b=mxUtils.htmlEntities(l.value);d(c,b,p)});l.focus();mxEvent.addListener(l,"blur",function(){b.removeChild(l)})}))}else"dynamicArr"==u?B.appendChild(n(c,f,p.subType,p.subDefVal,p.countProperty,v,t)):"staticArr"==u?B.appendChild(g(c,f,p.subType,p.subDefVal,p.size,v,t)):"readOnly"==u?(t=document.createElement("input"),t.setAttribute("readonly",""),t.value=f,t.style.width="96px",t.style.borderWidth="0px",B.appendChild(t)):(B.innerHTML=f,mxEvent.addListener(B,
+"click",mxUtils.bind(q,function(){function l(){var b=n.value,b=0==b.length&&"string"!=u?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",u="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==u?parseInt(b):b)+"");d(c,b,p)}var n=document.createElement("input");e(B,n,!0);n.value=f;n.className="gePropEditor";"int"!=u&&"float"!=u||p.allowAuto||(n.type="number",n.step="int"==u?"1":"any",null!=p.min&&
+(n.min=parseFloat(p.min)),null!=p.max&&(n.max=parseFloat(p.max)));b.appendChild(n);mxEvent.addListener(n,"keypress",function(b){13==b.keyCode&&l()});n.focus();mxEvent.addListener(n,"blur",function(){l()})})));p.isDeletable&&(t=mxUtils.button("-",mxUtils.bind(q,function(b){d(c,"",p,p.index);mxEvent.consume(b)})),t.style.height="16px",t.style.width="25px",t.style["float"]="right",t.className="geColorBtn",B.appendChild(t));v.appendChild(B);return v}var q=this,m=this.editorUi.editor.graph,t=[];b.style.position=
"relative";b.style.padding="0";var y=document.createElement("table");y.className="geProperties";y.style.whiteSpace="nowrap";y.style.width="100%";var u=document.createElement("tr");u.className="gePropHeader";var v=document.createElement("th");v.className="gePropHeaderCell";var B=document.createElement("img");B.src=Sidebar.prototype.expandedImage;B.style.verticalAlign="middle";v.appendChild(B);mxUtils.write(v,mxResources.get("property"));u.style.cursor="pointer";var A=function(){var c=y.querySelectorAll(".gePropNonHeaderRow"),
f;if(q.editorUi.propertiesCollapsed){B.src=Sidebar.prototype.collapsedImage;f="none";for(var d=b.childNodes.length-1;0<=d;d--)try{var e=b.childNodes[d],l=e.nodeName.toUpperCase();"INPUT"!=l&&"SELECT"!=l||b.removeChild(e)}catch(ra){}}else B.src=Sidebar.prototype.expandedImage,f="";for(d=0;d<c.length;d++)c[d].style.display=f};mxEvent.addListener(u,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;A()});u.appendChild(v);v=document.createElement("th");v.className="gePropHeaderCell";
-v.innerHTML=mxResources.get("value");u.appendChild(v);y.appendChild(u);var x=!1,C=!1,u=null;1==f.vertices.length&&0==f.edges.length?u=f.vertices[0].id:0==f.vertices.length&&1==f.edges.length&&(u=f.edges[0].id);null!=u&&y.appendChild(p("id",mxUtils.htmlEntities(u),{dispName:"ID",type:"readOnly"},!0,!1));for(var F in c)if(u=c[F],"function"!=typeof u.isVisible||u.isVisible(f,this)){var z=null!=f.style[F]?mxUtils.htmlEntities(f.style[F]+""):null!=u.getDefaultValue?u.getDefaultValue(f,this):u.defVal;if("separator"==
-u.type)C=!C;else{if("staticArr"==u.type)u.size=parseInt(f.style[u.sizeProperty]||c[u.sizeProperty].defVal)||0;else if(null!=u.dependentProps){for(var K=u.dependentProps,M=[],D=[],v=0;v<K.length;v++){var E=f.style[K[v]];D.push(c[K[v]].subDefVal);M.push(null!=E?E.split(","):[])}u.dependentPropsDefVal=D;u.dependentPropsVals=M}y.appendChild(p(F,z,u,x,C));x=!x}}for(v=0;v<t.length;v++)for(u=t[v],c=u.parentRow,f=0;f<u.values.length;f++)F=p(u.name,u.values[f],{type:u.type,parentRow:u.parentRow,isDeletable:u.isDeletable,
-index:f,defVal:u.defVal,countProperty:u.countProperty,size:u.size},0==f%2,u.flipBkg),c.parentNode.insertBefore(F,c.nextSibling),c=F;b.appendChild(y);A();return b};StyleFormatPanel.prototype.addStyles=function(b){function c(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var f=this.editorUi,d=f.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight=
-"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var l="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";m.style.width="210px";for(var g=[],k=0;k<this.defaultColorSchemes.length;k++){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(b){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){q(b)}))})(k);g.push(p);m.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(g[this.format.currentScheme].style.background="transparent");
-this.format.currentScheme=b;n(this.defaultColorSchemes[this.format.currentScheme]);g[this.format.currentScheme].style.background="#84d7ff"}),n=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(b){var c=mxUtils.button("",mxUtils.bind(this,function(c){d.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,m=0;m<e.length;m++){for(var g=d.getModel().getStyle(e[m]),k=0;k<l.length;k++)g=mxUtils.removeStylename(g,l[k]);var p=d.getModel().isVertex(e[m])?f.initialDefaultVertexStyle:
+v.innerHTML=mxResources.get("value");u.appendChild(v);y.appendChild(u);var x=!1,C=!1,u=null;1==f.vertices.length&&0==f.edges.length?u=f.vertices[0].id:0==f.vertices.length&&1==f.edges.length&&(u=f.edges[0].id);null!=u&&y.appendChild(p("id",mxUtils.htmlEntities(u),{dispName:"ID",type:"readOnly"},!0,!1));for(var E in c)if(u=c[E],"function"!=typeof u.isVisible||u.isVisible(f,this)){var z=null!=f.style[E]?mxUtils.htmlEntities(f.style[E]+""):null!=u.getDefaultValue?u.getDefaultValue(f,this):u.defVal;if("separator"==
+u.type)C=!C;else{if("staticArr"==u.type)u.size=parseInt(f.style[u.sizeProperty]||c[u.sizeProperty].defVal)||0;else if(null!=u.dependentProps){for(var K=u.dependentProps,M=[],D=[],v=0;v<K.length;v++){var F=f.style[K[v]];D.push(c[K[v]].subDefVal);M.push(null!=F?F.split(","):[])}u.dependentPropsDefVal=D;u.dependentPropsVals=M}y.appendChild(p(E,z,u,x,C));x=!x}}for(v=0;v<t.length;v++)for(u=t[v],c=u.parentRow,f=0;f<u.values.length;f++)E=p(u.name,u.values[f],{type:u.type,parentRow:u.parentRow,isDeletable:u.isDeletable,
+index:f,defVal:u.defVal,countProperty:u.countProperty,size:u.size},0==f%2,u.flipBkg),c.parentNode.insertBefore(E,c.nextSibling),c=E;b.appendChild(y);A();return b};StyleFormatPanel.prototype.addStyles=function(b){function c(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var f=this.editorUi,d=f.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight=
+"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(e);var l="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(" "),n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.position="relative";n.style.textAlign="center";n.style.width="210px";for(var g=[],k=0;k<this.defaultColorSchemes.length;k++){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(b){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){q(b)}))})(k);g.push(p);n.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(g[this.format.currentScheme].style.background="transparent");
+this.format.currentScheme=b;m(this.defaultColorSchemes[this.format.currentScheme]);g[this.format.currentScheme].style.background="#84d7ff"}),m=mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(b){var c=mxUtils.button("",mxUtils.bind(this,function(c){d.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,n=0;n<e.length;n++){for(var g=d.getModel().getStyle(e[n]),k=0;k<l.length;k++)g=mxUtils.removeStylename(g,l[k]);var p=d.getModel().isVertex(e[n])?f.initialDefaultVertexStyle:
f.initialdefaultEdgeStyle;null!=b?(g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(c)||(g=""==b.fill?mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(c)||(g=""==b.stroke?mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,
-b.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!d.getModel().isVertex(e[m])||(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),g=mxUtils.setStyle(g,
-mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(e[m])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));d.getModel().setStyle(e[m],g)}}finally{d.getModel().endUpdate()}}));c.className="geStyleButton";c.style.width="36px";c.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=b){var m="1"==urlParams.sketch?"2px solid":"1px solid";
+b.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(c)||mxClient.IS_MAC&&mxEvent.isMetaDown(c)||!d.getModel().isVertex(e[n])||(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),g=mxUtils.setStyle(g,
+mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(e[n])&&(g=mxUtils.setStyle(g,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));d.getModel().setStyle(e[n],g)}}finally{d.getModel().endUpdate()}}));c.className="geStyleButton";c.style.width="36px";c.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";c.style.margin="0px 6px 6px 0px";if(null!=b){var n="1"==urlParams.sketch?"2px solid":"1px solid";
null!=b.gradient?mxClient.IS_IE&&10>document.documentMode?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==b.fill?mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff"):
-b.fill||mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");c.style.border=b.stroke==mxConstants.NONE?m+" transparent":""==b.stroke?m+" "+mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):m+" "+(b.stroke||mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=b.title&&c.setAttribute("title",b.title)}else{var m=
-mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=m;c.style.border="1px solid "+g}c.style.borderRadius="0";e.appendChild(c)});e.innerHTML="";for(var m=0;m<b.length;m++)0<m&&0==mxUtils.mod(m,4)&&mxUtils.br(e),c(b[m])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var k=10>=this.defaultColorSchemes.length?
+b.fill||mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");c.style.border=b.stroke==mxConstants.NONE?n+" transparent":""==b.stroke?n+" "+mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):n+" "+(b.stroke||mxUtils.getValue(f.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=b.title&&c.setAttribute("title",b.title)}else{var n=
+mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=n;c.style.border="1px solid "+g}c.style.borderRadius="0";e.appendChild(c)});e.innerHTML="";for(var n=0;n<b.length;n++)0<n&&0==mxUtils.mod(n,4)&&mxUtils.br(e),c(b[n])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var k=10>=this.defaultColorSchemes.length?
28:8,t=document.createElement("div");t.style.cssText="position:absolute;left:10px;top:8px;bottom:"+k+"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(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var y=document.createElement("div");y.style.cssText="position:absolute;left:202px;top:8px;bottom:"+k+"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&&(b.appendChild(t),b.appendChild(y));mxEvent.addListener(y,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));c(t);c(y);n(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(m);return b};StyleFormatPanel.prototype.addEditOps=function(b){var c=this.format.getSelectionState(),f=null;1==c.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,
+1<this.defaultColorSchemes.length&&(b.appendChild(t),b.appendChild(y));mxEvent.addListener(y,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));c(t);c(y);m(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(n);return b};StyleFormatPanel.prototype.addEditOps=function(b){var c=this.format.getSelectionState(),f=null;1==c.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,
function(b){this.editorUi.actions.get("editStyle").funct()})),f.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),f.style.width="210px",f.style.marginBottom="2px",b.appendChild(f));var d=this.editorUi.editor.graph,d=1==c.cells.length?d.view.getState(c.cells[0]):null;null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",
mxResources.get("editShape")),c.style.marginBottom="2px",null==f?c.style.width="210px":(f.style.width="104px",c.style.width="104px",c.style.marginLeft="2px"),b.appendChild(c)):c.image&&0<c.cells.length&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(b){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==f?c.style.width="210px":(f.style.width="104px",c.style.width="104px",c.style.marginLeft="2px"),
b.appendChild(c));return b}}Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(b){return b.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(b){return Graph.isGoogleFontUrl(b)};Graph.createFontElement=function(b,c){var f;Graph.isCssFontUrl(c)?(f=document.createElement("link"),f.setAttribute("rel","stylesheet"),f.setAttribute("type","text/css"),f.setAttribute("charset","UTF-8"),f.setAttribute("href",c)):(f=document.createElement("style"),
@@ -10462,41 +10466,41 @@ b[c].getAttribute("face"):b[c].style.fontFamily;null!=d&&Graph.addFont(d,f)}}};G
"mouseenter",b);mxEvent.addListener(this.container,"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){c=null});this.isMouseInsertPoint=function(){return null!=c};var f=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):f.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(b){var c=this.graph.getCellStyle(b);if(null!=c){if("rack"==c.childLayout){var f=new mxStackLayout(this.graph,!1);f.gridSize=
null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;f.marginLeft=c.marginLeft||0;f.marginRight=c.marginRight||0;f.marginTop=c.marginTop||0;f.marginBottom=c.marginBottom||0;f.allowGaps=c.allowGaps||0;f.horizontal="1"==mxUtils.getValue(c,"horizontalRack","0");f.resizeParent=!1;f.fill=!0;return f}if("undefined"!==typeof mxTableLayout&&"tableLayout"==c.childLayout)return f=new mxTableLayout(this.graph),f.rows=c.tableRows||2,f.columns=c.tableColumns||
2,f.colPercentages=c.colPercentages,f.rowPercentages=c.rowPercentages,f.equalColumns="1"==mxUtils.getValue(c,"equalColumns",f.colPercentages?"0":"1"),f.equalRows="1"==mxUtils.getValue(c,"equalRows",f.rowPercentages?"0":"1"),f.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),f.border=c.tableBorder||f.border,f.marginLeft=c.marginLeft||0,f.marginRight=c.marginRight||0,f.marginTop=c.marginTop||0,f.marginBottom=c.marginBottom||0,f.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),f.autoAddRow=
-"1"==mxUtils.getValue(c,"autoAddRow",f.autoAddCol?"0":"1"),f.colWidths=c.colWidths||"100",f.rowHeights=c.rowHeights||"50",f}return d.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(A.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,c,f,d,e,l,m,g,k,p,q){z.apply(this,arguments);Graph.processFontAttributes(q)};
-var y=mxText.prototype.redraw;mxText.prototype.redraw=function(){y.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,c,f){function d(){for(var b=m.getSelectionCells(),c=[],f=0;f<b.length;f++)m.isCellVisible(b[f])&&c.push(b[f]);m.setSelectionCells(c)}function e(b){m.hiddenTags=b?[]:g.slice();d();m.refresh()}function l(b,f){p.innerHTML="";if(0<b.length){var l=document.createElement("table");l.setAttribute("cellpadding",
-"2");l.style.boxSizing="border-box";l.style.tableLayout="fixed";l.style.width="100%";var k=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){var l=0>mxUtils.indexOf(m.hiddenTags,b),p=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var n=document.createElement("img");n.setAttribute("src",l?Editor.visibleImage:Editor.hiddenImage);n.setAttribute("title",mxResources.get(l?"hideIt":"show",[b]));mxUtils.setOpacity(n,
-l?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";if(c||Editor.isDarkMode())n.style.filter="invert(100%)";q.appendChild(n);mxEvent.addListener(n,"click",function(c){var f=mxUtils.indexOf(m.hiddenTags,b);mxEvent.isShiftDown(c)?e(0<=mxUtils.indexOf(m.hiddenTags,b)):(0>f?m.hiddenTags.push(b):0<=f&&m.hiddenTags.splice(f,1),d(),m.refresh());mxEvent.consume(c)});p.appendChild(q);q=document.createElement("td");q.style.overflow="hidden";q.style.whiteSpace="nowrap";q.style.textOverflow=
-"ellipsis";q.style.verticalAlign="middle";q.style.cursor="pointer";q.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,l?100:40);q.appendChild(a);mxEvent.addListener(q,"click",function(c){if(mxEvent.isShiftDown(c)){e(!0);var f=m.getCellsForTags([b],null,null,!0);m.isEnabled()?m.setSelectionCells(f):m.highlightCells(f)}else if(l&&0<m.hiddenTags.length)e(!0);else{var f=g.slice(),k=mxUtils.indexOf(f,
-b);f.splice(k,1);m.hiddenTags=f;d();m.refresh()}mxEvent.consume(c)});p.appendChild(q);if(m.isEnabled()){q=document.createElement("td");q.style.verticalAlign="middle";q.style.textAlign="center";q.style.width="18px";if(null==f){q.style.align="center";q.style.width="16px";n=document.createElement("img");n.setAttribute("src",Editor.crossImage);n.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(n,l?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";
-if(c||Editor.isDarkMode())n.style.filter="invert(100%)";mxEvent.addListener(n,"click",function(c){var f=mxUtils.indexOf(g,b);0<=f&&g.splice(f,1);m.removeTagsForCells(m.model.getDescendants(m.model.getRoot()),[b]);m.refresh();mxEvent.consume(c)});q.appendChild(n)}else{var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.margin="0px";t.defaultChecked=null!=f&&0<=mxUtils.indexOf(f,b);t.checked=t.defaultChecked;t.style.background="transparent";t.setAttribute("title",mxResources.get(t.defaultChecked?
-"removeIt":"add",[b]));mxEvent.addListener(t,"change",function(c){t.checked?m.addTagsForCells(m.getSelectionCells(),[b]):m.removeTagsForCells(m.getSelectionCells(),[b]);mxEvent.consume(c)});q.appendChild(t)}p.appendChild(q)}k.appendChild(p)})(b[q]);l.appendChild(k);p.appendChild(l)}}var m=this,g=m.hiddenTags.slice(),k=document.createElement("div");k.style.userSelect="none";k.style.overflow="hidden";k.style.padding="10px";k.style.height="100%";var p=document.createElement("div");p.style.boxSizing=
-"border-box";p.style.borderRadius="4px";p.style.userSelect="none";p.style.overflow="auto";p.style.position="absolute";p.style.left="10px";p.style.right="10px";p.style.top="10px";p.style.border=m.isEnabled()?"1px solid #808080":"none";p.style.bottom=m.isEnabled()?"48px":"10px";k.appendChild(p);var q=mxUtils.button(mxResources.get("reset"),function(b){m.hiddenTags=[];mxEvent.isShiftDown(b)||(g=m.hiddenTags.slice());d();m.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";
-q.style.margin="0 4px 0 0";var n=mxUtils.button(mxResources.get("add"),function(){null!=f&&f(g,function(b){g=b;t()})});n.setAttribute("title",mxResources.get("add"));n.className="geBtn";n.style.margin="0";m.addListener(mxEvent.ROOT,function(){g=m.hiddenTags.slice()});var t=mxUtils.bind(this,function(c,f){if(b()){for(var d=m.getAllTags(),e=0;e<d.length;e++)0>mxUtils.indexOf(g,d[e])&&g.push(d[e]);g.sort();m.isSelectionEmpty()?l(g):l(g,m.getCommonTagsForCells(m.getSelectionCells()))}});m.selectionModel.addListener(mxEvent.CHANGE,
-t);m.model.addListener(mxEvent.CHANGE,t);m.addListener(mxEvent.REFRESH,t);var y=document.createElement("div");y.style.boxSizing="border-box";y.style.whiteSpace="nowrap";y.style.position="absolute";y.style.overflow="hidden";y.style.bottom="0px";y.style.height="42px";y.style.right="10px";y.style.left="10px";m.isEnabled()&&(y.appendChild(q),y.appendChild(n),k.appendChild(y));return{div:k,refresh:t}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],c;for(c in Graph.customFontElements){var f=
+"1"==mxUtils.getValue(c,"autoAddRow",f.autoAddCol?"0":"1"),f.colWidths=c.colWidths||"100",f.rowHeights=c.rowHeights||"50",f}return d.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(A.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,c,f,d,e,l,n,g,k,p,q){z.apply(this,arguments);Graph.processFontAttributes(q)};
+var y=mxText.prototype.redraw;mxText.prototype.redraw=function(){y.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,c,f){function d(){for(var b=n.getSelectionCells(),c=[],f=0;f<b.length;f++)n.isCellVisible(b[f])&&c.push(b[f]);n.setSelectionCells(c)}function e(b){n.hiddenTags=b?[]:g.slice();d();n.refresh()}function l(b,f){p.innerHTML="";if(0<b.length){var l=document.createElement("table");l.setAttribute("cellpadding",
+"2");l.style.boxSizing="border-box";l.style.tableLayout="fixed";l.style.width="100%";var k=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){var l=0>mxUtils.indexOf(n.hiddenTags,b),p=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var m=document.createElement("img");m.setAttribute("src",l?Editor.visibleImage:Editor.hiddenImage);m.setAttribute("title",mxResources.get(l?"hideIt":"show",[b]));mxUtils.setOpacity(m,
+l?75:25);m.style.verticalAlign="middle";m.style.cursor="pointer";m.style.width="16px";if(c||Editor.isDarkMode())m.style.filter="invert(100%)";q.appendChild(m);mxEvent.addListener(m,"click",function(c){var f=mxUtils.indexOf(n.hiddenTags,b);mxEvent.isShiftDown(c)?e(0<=mxUtils.indexOf(n.hiddenTags,b)):(0>f?n.hiddenTags.push(b):0<=f&&n.hiddenTags.splice(f,1),d(),n.refresh());mxEvent.consume(c)});p.appendChild(q);q=document.createElement("td");q.style.overflow="hidden";q.style.whiteSpace="nowrap";q.style.textOverflow=
+"ellipsis";q.style.verticalAlign="middle";q.style.cursor="pointer";q.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,l?100:40);q.appendChild(a);mxEvent.addListener(q,"click",function(c){if(mxEvent.isShiftDown(c)){e(!0);var f=n.getCellsForTags([b],null,null,!0);n.isEnabled()?n.setSelectionCells(f):n.highlightCells(f)}else if(l&&0<n.hiddenTags.length)e(!0);else{var f=g.slice(),k=mxUtils.indexOf(f,
+b);f.splice(k,1);n.hiddenTags=f;d();n.refresh()}mxEvent.consume(c)});p.appendChild(q);if(n.isEnabled()){q=document.createElement("td");q.style.verticalAlign="middle";q.style.textAlign="center";q.style.width="18px";if(null==f){q.style.align="center";q.style.width="16px";m=document.createElement("img");m.setAttribute("src",Editor.crossImage);m.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(m,l?75:25);m.style.verticalAlign="middle";m.style.cursor="pointer";m.style.width="16px";
+if(c||Editor.isDarkMode())m.style.filter="invert(100%)";mxEvent.addListener(m,"click",function(c){var f=mxUtils.indexOf(g,b);0<=f&&g.splice(f,1);n.removeTagsForCells(n.model.getDescendants(n.model.getRoot()),[b]);n.refresh();mxEvent.consume(c)});q.appendChild(m)}else{var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.margin="0px";t.defaultChecked=null!=f&&0<=mxUtils.indexOf(f,b);t.checked=t.defaultChecked;t.style.background="transparent";t.setAttribute("title",mxResources.get(t.defaultChecked?
+"removeIt":"add",[b]));mxEvent.addListener(t,"change",function(c){t.checked?n.addTagsForCells(n.getSelectionCells(),[b]):n.removeTagsForCells(n.getSelectionCells(),[b]);mxEvent.consume(c)});q.appendChild(t)}p.appendChild(q)}k.appendChild(p)})(b[q]);l.appendChild(k);p.appendChild(l)}}var n=this,g=n.hiddenTags.slice(),k=document.createElement("div");k.style.userSelect="none";k.style.overflow="hidden";k.style.padding="10px";k.style.height="100%";var p=document.createElement("div");p.style.boxSizing=
+"border-box";p.style.borderRadius="4px";p.style.userSelect="none";p.style.overflow="auto";p.style.position="absolute";p.style.left="10px";p.style.right="10px";p.style.top="10px";p.style.border=n.isEnabled()?"1px solid #808080":"none";p.style.bottom=n.isEnabled()?"48px":"10px";k.appendChild(p);var q=mxUtils.button(mxResources.get("reset"),function(b){n.hiddenTags=[];mxEvent.isShiftDown(b)||(g=n.hiddenTags.slice());d();n.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";
+q.style.margin="0 4px 0 0";var m=mxUtils.button(mxResources.get("add"),function(){null!=f&&f(g,function(b){g=b;t()})});m.setAttribute("title",mxResources.get("add"));m.className="geBtn";m.style.margin="0";n.addListener(mxEvent.ROOT,function(){g=n.hiddenTags.slice()});var t=mxUtils.bind(this,function(c,f){if(b()){for(var d=n.getAllTags(),e=0;e<d.length;e++)0>mxUtils.indexOf(g,d[e])&&g.push(d[e]);g.sort();n.isSelectionEmpty()?l(g):l(g,n.getCommonTagsForCells(n.getSelectionCells()))}});n.selectionModel.addListener(mxEvent.CHANGE,
+t);n.model.addListener(mxEvent.CHANGE,t);n.addListener(mxEvent.REFRESH,t);var y=document.createElement("div");y.style.boxSizing="border-box";y.style.whiteSpace="nowrap";y.style.position="absolute";y.style.overflow="hidden";y.style.bottom="0px";y.style.height="42px";y.style.right="10px";y.style.left="10px";n.isEnabled()&&(y.appendChild(q),y.appendChild(m),k.appendChild(y));return{div:k,refresh:t}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],c;for(c in Graph.customFontElements){var f=
Graph.customFontElements[c];b.push({name:f.name,url:f.url})}return b};Graph.prototype.setFont=function(b,c){Graph.addFont(b,c);document.execCommand("fontname",!1,b);if(null!=c){var f=this.cellEditor.textarea.getElementsByTagName("font");c=Graph.getFontUrl(b,c);for(var d=0;d<f.length;d++)f[d].getAttribute("face")==b&&f[d].getAttribute("data-font-src")!=c&&f[d].setAttribute("data-font-src",c)}};var B=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return B.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 b=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var c in b)this.globalVars[c]=b[c]}catch(T){null!=window.console&&console.log("Error in vars URL parameter: "+T)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):
{}};var C=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var c=C.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[b]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=
-function(b,c,f,d,e,l,m,g,k,p,q,n,t,y){var u=null,v=null;n||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,v=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var B=D.apply(this,arguments),A=this.getCustomFonts();if(q&&0<A.length){var x=B.ownerDocument,C=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"style"):x.createElement("style");
-null!=x.setAttributeNS?C.setAttributeNS("type","text/css"):C.setAttribute("type","text/css");for(var F="",z="",M=0;M<A.length;M++){var E=A[M].name,K=A[M].url;Graph.isCssFontUrl(K)?F+="@import url("+K+");\n":z+='@font-face {\nfont-family: "'+E+'";\nsrc: url("'+K+'");\n}\n'}C.appendChild(x.createTextNode(F+z));B.getElementsByTagName("defs")[0].appendChild(C)}null!=u&&(this.defaultPageBackgroundColor=v,this.stylesheet=u,this.refresh());return B};var E=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
-function(){var b=E.apply(this,arguments);if(this.mathEnabled){var c=b.drawText;b.drawText=function(b,f){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var d=b.text.getContentNode();if(null!=d){d=d.cloneNode(!0);if(d.getElementsByTagNameNS)for(var e=d.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=d.innerHTML&&(e=b.text.value,b.text.value=
-d.innerHTML,c.apply(this,arguments),b.text.value=e)}}else c.apply(this,arguments)}}return b};var G=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){G.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=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||
+function(b,c,f,d,e,l,n,g,k,p,q,m,t,y){var u=null,v=null;m||null==this.themes||"darkTheme"!=this.defaultThemeName||(u=this.stylesheet,v=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var B=D.apply(this,arguments),A=this.getCustomFonts();if(q&&0<A.length){var x=B.ownerDocument,C=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"style"):x.createElement("style");
+null!=x.setAttributeNS?C.setAttributeNS("type","text/css"):C.setAttribute("type","text/css");for(var E="",z="",M=0;M<A.length;M++){var F=A[M].name,K=A[M].url;Graph.isCssFontUrl(K)?E+="@import url("+K+");\n":z+='@font-face {\nfont-family: "'+F+'";\nsrc: url("'+K+'");\n}\n'}C.appendChild(x.createTextNode(E+z));B.getElementsByTagName("defs")[0].appendChild(C)}null!=u&&(this.defaultPageBackgroundColor=v,this.stylesheet=u,this.refresh());return B};var G=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
+function(){var b=G.apply(this,arguments);if(this.mathEnabled){var c=b.drawText;b.drawText=function(b,f){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var d=b.text.getContentNode();if(null!=d){d=d.cloneNode(!0);if(d.getElementsByTagNameNS)for(var e=d.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=d.innerHTML&&(e=b.text.value,b.text.value=
+d.innerHTML,c.apply(this,arguments),b.text.value=e)}}else c.apply(this,arguments)}}return b};var H=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){H.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=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;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};
-var F=Graph.prototype.refresh;Graph.prototype.refresh=function(){F.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var J=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){J.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==
+var E=Graph.prototype.refresh;Graph.prototype.refresh=function(){E.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var J=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){J.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==
b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=function(b,c){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var f=!1,d=0,e=0,l=mxUtils.bind(this,function(){f||
-(f=!0,this.model.beginUpdate())}),m=mxUtils.bind(this,function(){f&&(f=!1,this.model.endUpdate())}),g=mxUtils.bind(this,function(){0<d&&d--;0==d&&k()}),k=mxUtils.bind(this,function(){if(e<b.length){var f=this.stoppingCustomActions,p=b[e++],q=[];if(null!=p.open)if(m(),this.isCustomLink(p.open)){if(!this.customLinkClicked(p.open))return}else this.openLink(p.open);null==p.wait||f||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;g()}),
-d++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=p.wait?parseInt(p.wait):1E3),m());null!=p.opacity&&null!=p.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(p.opacity,!0)),p.opacity.value);null!=p.fadeIn&&(d++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeIn,!0)),0,1,g,f?0:p.fadeIn.delay));null!=p.fadeOut&&(d++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeOut,!0)),1,0,g,f?0:p.fadeOut.delay));
-null!=p.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeIn,!0),!0)));null!=p.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeOut,!0),!1)));null!=p.toggle&&(l(),this.toggleCells(this.getCellsForAction(p.toggle,!0)));if(null!=p.show){l();var n=this.getCellsForAction(p.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(n),1);this.setCellsVisible(n,!0)}null!=p.hide&&(l(),n=this.getCellsForAction(p.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(n),
-0),this.setCellsVisible(n,!1));null!=p.toggleStyle&&null!=p.toggleStyle.key&&(l(),this.toggleCellStyles(p.toggleStyle.key,null!=p.toggleStyle.defaultValue?p.toggleStyle.defaultValue:"0",this.getCellsForAction(p.toggleStyle,!0)));null!=p.style&&null!=p.style.key&&(l(),this.setCellStyles(p.style.key,p.style.value,this.getCellsForAction(p.style,!0)));n=[];null!=p.select&&this.isEnabled()&&(n=this.getCellsForAction(p.select),this.setSelectionCells(n));null!=p.highlight&&(n=this.getCellsForAction(p.highlight),
-this.highlightCells(n,p.highlight.color,p.highlight.duration,p.highlight.opacity));null!=p.scroll&&(n=this.getCellsForAction(p.scroll));null!=p.viewbox&&this.fitWindow(p.viewbox,p.viewbox.border);0<n.length&&this.scrollCellToVisible(n[0]);if(null!=p.tags){n=[];null!=p.tags.hidden&&(n=n.concat(p.tags.hidden));if(null!=p.tags.visible)for(var t=this.getAllTags(),y=0;y<t.length;y++)0>mxUtils.indexOf(p.tags.visible,t[y])&&0>mxUtils.indexOf(n,t[y])&&n.push(t[y]);this.hiddenTags=n;this.refresh()}0<q.length&&
-(d++,this.executeAnimations(q,g,f?1:p.steps,f?0:p.delay));0==d?k():m()}else this.stoppingCustomActions=this.executingCustomActions=!1,m(),null!=c&&c()});k()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,c){var f=this.getLinkForCell(c);null!=f&&"data:action/json,"==f.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(b,f));if(this.isHtmlLabel(c)){var d=document.createElement("div");d.innerHTML=this.sanitizeHtml(this.getLabel(c));for(var e=d.getElementsByTagName("a"),l=!1,m=0;m<
-e.length;m++)f=e[m].getAttribute("href"),null!=f&&"data:action/json,"==f.substring(0,17)&&(e[m].setAttribute("href",this.updateCustomLink(b,f)),l=!0);l&&this.labelChanged(c,d.innerHTML)}};Graph.prototype.updateCustomLink=function(b,c){if("data:action/json,"==c.substring(0,17))try{var f=JSON.parse(c.substring(17));null!=f.actions&&(this.updateCustomLinkActions(b,f.actions),c="data:action/json,"+JSON.stringify(f))}catch(R){}return c};Graph.prototype.updateCustomLinkActions=function(b,c){for(var f=0;f<
+(f=!0,this.model.beginUpdate())}),n=mxUtils.bind(this,function(){f&&(f=!1,this.model.endUpdate())}),g=mxUtils.bind(this,function(){0<d&&d--;0==d&&k()}),k=mxUtils.bind(this,function(){if(e<b.length){var f=this.stoppingCustomActions,p=b[e++],q=[];if(null!=p.open)if(n(),this.isCustomLink(p.open)){if(!this.customLinkClicked(p.open))return}else this.openLink(p.open);null==p.wait||f||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;g()}),
+d++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=p.wait?parseInt(p.wait):1E3),n());null!=p.opacity&&null!=p.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(p.opacity,!0)),p.opacity.value);null!=p.fadeIn&&(d++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeIn,!0)),0,1,g,f?0:p.fadeIn.delay));null!=p.fadeOut&&(d++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeOut,!0)),1,0,g,f?0:p.fadeOut.delay));
+null!=p.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeIn,!0),!0)));null!=p.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeOut,!0),!1)));null!=p.toggle&&(l(),this.toggleCells(this.getCellsForAction(p.toggle,!0)));if(null!=p.show){l();var m=this.getCellsForAction(p.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(m),1);this.setCellsVisible(m,!0)}null!=p.hide&&(l(),m=this.getCellsForAction(p.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(m),
+0),this.setCellsVisible(m,!1));null!=p.toggleStyle&&null!=p.toggleStyle.key&&(l(),this.toggleCellStyles(p.toggleStyle.key,null!=p.toggleStyle.defaultValue?p.toggleStyle.defaultValue:"0",this.getCellsForAction(p.toggleStyle,!0)));null!=p.style&&null!=p.style.key&&(l(),this.setCellStyles(p.style.key,p.style.value,this.getCellsForAction(p.style,!0)));m=[];null!=p.select&&this.isEnabled()&&(m=this.getCellsForAction(p.select),this.setSelectionCells(m));null!=p.highlight&&(m=this.getCellsForAction(p.highlight),
+this.highlightCells(m,p.highlight.color,p.highlight.duration,p.highlight.opacity));null!=p.scroll&&(m=this.getCellsForAction(p.scroll));null!=p.viewbox&&this.fitWindow(p.viewbox,p.viewbox.border);0<m.length&&this.scrollCellToVisible(m[0]);if(null!=p.tags){m=[];null!=p.tags.hidden&&(m=m.concat(p.tags.hidden));if(null!=p.tags.visible)for(var t=this.getAllTags(),y=0;y<t.length;y++)0>mxUtils.indexOf(p.tags.visible,t[y])&&0>mxUtils.indexOf(m,t[y])&&m.push(t[y]);this.hiddenTags=m;this.refresh()}0<q.length&&
+(d++,this.executeAnimations(q,g,f?1:p.steps,f?0:p.delay));0==d?k():n()}else this.stoppingCustomActions=this.executingCustomActions=!1,n(),null!=c&&c()});k()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,c){var f=this.getLinkForCell(c);null!=f&&"data:action/json,"==f.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(b,f));if(this.isHtmlLabel(c)){var d=document.createElement("div");d.innerHTML=this.sanitizeHtml(this.getLabel(c));for(var e=d.getElementsByTagName("a"),l=!1,n=0;n<
+e.length;n++)f=e[n].getAttribute("href"),null!=f&&"data:action/json,"==f.substring(0,17)&&(e[n].setAttribute("href",this.updateCustomLink(b,f)),l=!0);l&&this.labelChanged(c,d.innerHTML)}};Graph.prototype.updateCustomLink=function(b,c){if("data:action/json,"==c.substring(0,17))try{var f=JSON.parse(c.substring(17));null!=f.actions&&(this.updateCustomLinkActions(b,f.actions),c="data:action/json,"+JSON.stringify(f))}catch(R){}return c};Graph.prototype.updateCustomLinkActions=function(b,c){for(var f=0;f<
c.length;f++){var d=c[f],e;for(e in d)this.updateCustomLinkAction(b,d[e],"cells"),this.updateCustomLinkAction(b,d[e],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(b,c,f){if(null!=c&&null!=c[f]){for(var d=[],e=0;e<c[f].length;e++)if("*"==c[f][e])d.push(c[f][e]);else{var l=b[c[f][e]];null!=l?""!=l&&d.push(l):d.push(c[f][e])}c[f]=d}};Graph.prototype.getCellsForAction=function(b,c){var f=this.getCellsById(b.cells).concat(this.getCellsForTags(b.tags,null,c));if(null!=b.excludeCells){for(var d=
[],e=0;e<f.length;e++)0>b.excludeCells.indexOf(f[e].id)&&d.push(f[e]);f=d}return f};Graph.prototype.getCellsById=function(b){var c=[];if(null!=b)for(var f=0;f<b.length;f++)if("*"==b[f])var d=this.model.getRoot(),c=c.concat(this.model.filterDescendants(function(b){return b!=d},d));else{var e=this.model.getCell(b[f]);null!=e&&c.push(e)}return c};var L=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return L.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};
-Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var c=0;c<b.length;c++)if(0>mxUtils.indexOf(this.hiddenTags,b[c]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,c,f,d){var e=[];if(null!=b){c=null!=c?c:this.model.getDescendants(this.model.getRoot());for(var l=0,m={},g=0;g<b.length;g++)0<b[g].length&&(m[b[g]]=!0,l++);for(g=0;g<c.length;g++)if(f&&this.model.getParent(c[g])==
-this.model.root||this.model.isVertex(c[g])||this.model.isEdge(c[g])){var k=this.getTagsForCell(c[g]),p=!1;if(0<k.length&&(k=k.split(" "),k.length>=b.length)){for(var q=p=0;q<k.length&&p<l;q++)null!=m[k[q]]&&p++;p=p==l}p&&(1!=d||this.isCellVisible(c[g]))&&e.push(c[g])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var c=null,f=[],d=0;d<b.length;d++){var e=this.getTagsForCell(b[d]),
-f=[];if(0<e.length){for(var e=e.split(" "),l={},m=0;m<e.length;m++)if(null==c||null!=c[e[m]])l[e[m]]=!0,f.push(e[m]);c=l}else return[]}return f};Graph.prototype.getTagsForCells=function(b){for(var c=[],f={},d=0;d<b.length;d++){var e=this.getTagsForCell(b[d]);if(0<e.length)for(var e=e.split(" "),l=0;l<e.length;l++)null==f[e[l]]&&(f[e[l]]=!0,c.push(e[l]))}return c};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,c){if(0<
-b.length&&0<c.length){this.model.beginUpdate();try{for(var f=0;f<b.length;f++){for(var d=this.getTagsForCell(b[f]),e=d.split(" "),l=!1,m=0;m<c.length;m++){var g=mxUtils.trim(c[m]);""!=g&&0>mxUtils.indexOf(e,g)&&(d=0<d.length?d+" "+g:g,l=!0)}l&&this.setAttributeForCell(b[f],"tags",d)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,c){if(0<b.length&&0<c.length){this.model.beginUpdate();try{for(var f=0;f<b.length;f++){var d=this.getTagsForCell(b[f]);if(0<d.length){for(var e=
-d.split(" "),l=!1,m=0;m<c.length;m++){var g=mxUtils.indexOf(e,c[m]);0<=g&&(e.splice(g,1),l=!0)}l&&this.setAttributeForCell(b[f],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],!this.model.isVisible(b[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,c){this.model.beginUpdate();try{for(var f=0;f<b.length;f++)this.model.setVisible(b[f],c)}finally{this.model.endUpdate()}};
+Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var c=0;c<b.length;c++)if(0>mxUtils.indexOf(this.hiddenTags,b[c]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,c,f,d){var e=[];if(null!=b){c=null!=c?c:this.model.getDescendants(this.model.getRoot());for(var l=0,n={},g=0;g<b.length;g++)0<b[g].length&&(n[b[g]]=!0,l++);for(g=0;g<c.length;g++)if(f&&this.model.getParent(c[g])==
+this.model.root||this.model.isVertex(c[g])||this.model.isEdge(c[g])){var k=this.getTagsForCell(c[g]),p=!1;if(0<k.length&&(k=k.split(" "),k.length>=b.length)){for(var q=p=0;q<k.length&&p<l;q++)null!=n[k[q]]&&p++;p=p==l}p&&(1!=d||this.isCellVisible(c[g]))&&e.push(c[g])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var c=null,f=[],d=0;d<b.length;d++){var e=this.getTagsForCell(b[d]),
+f=[];if(0<e.length){for(var e=e.split(" "),l={},n=0;n<e.length;n++)if(null==c||null!=c[e[n]])l[e[n]]=!0,f.push(e[n]);c=l}else return[]}return f};Graph.prototype.getTagsForCells=function(b){for(var c=[],f={},d=0;d<b.length;d++){var e=this.getTagsForCell(b[d]);if(0<e.length)for(var e=e.split(" "),l=0;l<e.length;l++)null==f[e[l]]&&(f[e[l]]=!0,c.push(e[l]))}return c};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,c){if(0<
+b.length&&0<c.length){this.model.beginUpdate();try{for(var f=0;f<b.length;f++){for(var d=this.getTagsForCell(b[f]),e=d.split(" "),l=!1,n=0;n<c.length;n++){var g=mxUtils.trim(c[n]);""!=g&&0>mxUtils.indexOf(e,g)&&(d=0<d.length?d+" "+g:g,l=!0)}l&&this.setAttributeForCell(b[f],"tags",d)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,c){if(0<b.length&&0<c.length){this.model.beginUpdate();try{for(var f=0;f<b.length;f++){var d=this.getTagsForCell(b[f]);if(0<d.length){for(var e=
+d.split(" "),l=!1,n=0;n<c.length;n++){var g=mxUtils.indexOf(e,c[n]);0<=g&&(e.splice(g,1),l=!0)}l&&this.setAttributeForCell(b[f],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],!this.model.isVisible(b[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,c){this.model.beginUpdate();try{for(var f=0;f<b.length;f++)this.model.setVisible(b[f],c)}finally{this.model.endUpdate()}};
Graph.prototype.highlightCells=function(b,c,f,d){for(var e=0;e<b.length;e++)this.highlightCell(b[e],c,f,d)};Graph.prototype.highlightCell=function(b,c,f,d){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;f=null!=f?f:1E3;b=this.view.getState(b);if(null!=b){var e=Math.max(5,mxUtils.getValue(b.style,mxConstants.STYLE_STROKEWIDTH,1)+4),l=new mxCellHighlight(this,c,e,!1);null!=d&&(l.opacity=d);l.highlight(b);window.setTimeout(function(){null!=l.shape&&(mxUtils.setPrefixedStyle(l.shape.node.style,"transition",
"all 1200ms ease-in-out"),l.shape.node.style.opacity=0);window.setTimeout(function(){l.destroy()},1200)},f)}};Graph.prototype.addSvgShadow=function(b,c,f){f=null!=f?f:!1;var d=b.ownerDocument,e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");e.setAttribute("id",this.shadowId);var l=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation",
this.svgShadowBlur);l.setAttribute("result","blur");e.appendChild(l);l=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset");l.setAttribute("in","blur");l.setAttribute("dx",this.svgShadowSize);l.setAttribute("dy",this.svgShadowSize);l.setAttribute("result","offsetBlur");e.appendChild(l);l=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");l.setAttribute("flood-color",this.svgShadowColor);l.setAttribute("flood-opacity",
@@ -10514,47 +10518,47 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",
STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];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(b){var c=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?c="mxgraph.er":"sysML"==b.substring(0,5)&&(c="mxgraph.sysml"));return c};var H=mxMarker.createMarker;mxMarker.createMarker=function(b,c,f,d,e,l,m,g,k,p){if(null!=f&&null==mxMarker.markers[f]){var q=this.getPackageForType(f);null!=q&&
-mxStencilRegistry.getStencil(q)}return H.apply(this,arguments)};PrintDialog.prototype.create=function(b,c){function f(){y.value=Math.max(1,Math.min(g,Math.max(parseInt(y.value),parseInt(t.value))));t.value=Math.max(1,Math.min(g,Math.min(parseInt(y.value),parseInt(t.value))))}function d(c){function f(c,f,l){var m=c.useCssTransforms,g=c.currentTranslate,k=c.currentScale,p=c.view.translate,q=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,
-c.view.translate=new mxPoint(0,0),c.view.scale=1);var n=c.getGraphBounds(),t=0,y=0,u=P.get(),v=1/c.pageScale,x=A.checked;if(x)var v=parseInt(L.value),C=parseInt(J.value),v=Math.min(u.height*C/(n.height/c.view.scale),u.width*v/(n.width/c.view.scale));else v=parseInt(B.value)/(100*c.pageScale),isNaN(v)&&(d=1/c.pageScale,B.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*d);u.height=Math.ceil(u.height*d);v*=d;!x&&c.pageVisible?(n=c.getPageLayout(),t-=n.x*u.width,y-=n.y*u.height):
-x=!0;if(null==f){f=PrintDialog.createPrintPreview(c,v,u,0,t,y,x);f.pageSelector=!1;f.mathEnabled=!1;t=b.getCurrentFile();null!=t&&(f.title=t.getTitle());var F=f.writeHead;f.writeHead=function(f){F.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)f.writeln('<style type="text/css">'),f.writeln(Editor.mathJaxWebkitCss),f.writeln("</style>");mxClient.IS_GC&&(f.writeln('<style type="text/css">'),f.writeln("@media print {"),f.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),f.writeln("}"),
-f.writeln("</style>"));null!=b.editor.fontCss&&(f.writeln('<style type="text/css">'),f.writeln(b.editor.fontCss),f.writeln("</style>"));for(var d=c.getCustomFonts(),e=0;e<d.length;e++){var l=d[e].name,m=d[e].url;Graph.isCssFontUrl(m)?f.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(m)+'" charset="UTF-8" type="text/css">'):(f.writeln('<style type="text/css">'),f.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(m)+'");\n}'),f.writeln("</style>"))}};
-if("undefined"!==typeof MathJax){var z=f.renderPage;f.renderPage=function(c,f,d,e,l,m){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var k=z.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:k.className="geDisableMathJax";return k}}t=null;y=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(t=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var c=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?c="mxgraph.er":"sysML"==b.substring(0,5)&&(c="mxgraph.sysml"));return c};var F=mxMarker.createMarker;mxMarker.createMarker=function(b,c,f,d,e,l,n,g,k,p){if(null!=f&&null==mxMarker.markers[f]){var q=this.getPackageForType(f);null!=q&&
+mxStencilRegistry.getStencil(q)}return F.apply(this,arguments)};PrintDialog.prototype.create=function(b,c){function f(){y.value=Math.max(1,Math.min(g,Math.max(parseInt(y.value),parseInt(t.value))));t.value=Math.max(1,Math.min(g,Math.min(parseInt(y.value),parseInt(t.value))))}function d(c){function f(c,f,l){var n=c.useCssTransforms,g=c.currentTranslate,k=c.currentScale,p=c.view.translate,q=c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,
+c.view.translate=new mxPoint(0,0),c.view.scale=1);var m=c.getGraphBounds(),t=0,y=0,u=P.get(),v=1/c.pageScale,x=A.checked;if(x)var v=parseInt(L.value),C=parseInt(J.value),v=Math.min(u.height*C/(m.height/c.view.scale),u.width*v/(m.width/c.view.scale));else v=parseInt(B.value)/(100*c.pageScale),isNaN(v)&&(d=1/c.pageScale,B.value="100 %");u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*d);u.height=Math.ceil(u.height*d);v*=d;!x&&c.pageVisible?(m=c.getPageLayout(),t-=m.x*u.width,y-=m.y*u.height):
+x=!0;if(null==f){f=PrintDialog.createPrintPreview(c,v,u,0,t,y,x);f.pageSelector=!1;f.mathEnabled=!1;t=b.getCurrentFile();null!=t&&(f.title=t.getTitle());var E=f.writeHead;f.writeHead=function(f){E.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)f.writeln('<style type="text/css">'),f.writeln(Editor.mathJaxWebkitCss),f.writeln("</style>");mxClient.IS_GC&&(f.writeln('<style type="text/css">'),f.writeln("@media print {"),f.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),f.writeln("}"),
+f.writeln("</style>"));null!=b.editor.fontCss&&(f.writeln('<style type="text/css">'),f.writeln(b.editor.fontCss),f.writeln("</style>"));for(var d=c.getCustomFonts(),e=0;e<d.length;e++){var l=d[e].name,n=d[e].url;Graph.isCssFontUrl(n)?f.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(n)+'" charset="UTF-8" type="text/css">'):(f.writeln('<style type="text/css">'),f.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(n)+'");\n}'),f.writeln("</style>"))}};
+if("undefined"!==typeof MathJax){var z=f.renderPage;f.renderPage=function(c,f,d,e,l,n){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var k=z.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:k.className="geDisableMathJax";return k}}t=null;y=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(t=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
e.refresh());f.open(null,null,l,!0);e.enableFlowAnimation=y;null!=t&&(e.stylesheet=t,e.refresh())}else{u=c.background;if(null==u||""==u||u==mxConstants.NONE)u="#ffffff";f.backgroundColor=u;f.autoOrigin=x;f.appendGraph(c,v,t,y,l,!0);l=c.getCustomFonts();if(null!=f.wnd)for(t=0;t<l.length;t++)y=l[t].name,x=l[t].url,Graph.isCssFontUrl(x)?f.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(x)+'" charset="UTF-8" type="text/css">'):(f.wnd.document.writeln('<style type="text/css">'),
-f.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(y)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),f.wnd.document.writeln("</style>"))}m&&(c.useCssTransforms=m,c.currentTranslate=g,c.currentScale=k,c.view.translate=p,c.view.scale=q);return f}var d=parseInt(K.value)/100;isNaN(d)&&(d=1,K.value="100 %");var d=.75*d,l=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(l=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var m=t.value,g=y.value,p=!q.checked,
-n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,m,g,A.checked,L.value,J.value,parseInt(B.value)/100,parseInt(K.value)/100,P.get());else{p&&(p=m==k&&g==k);if(!p&&null!=b.pages&&b.pages.length){var u=0,p=b.pages.length-1;q.checked||(u=parseInt(m)-1,p=parseInt(g)-1);for(var v=u;v<=p;v++){var x=b.pages[v],m=x==b.currentPage?e:null;if(null==m){var m=b.createTemporaryGraph(e.stylesheet),g=!0,u=!1,C=null,F=null;null==x.viewState&&null==x.root&&b.updatePageRoot(x);null!=x.viewState&&
-(g=x.viewState.pageVisible,u=x.viewState.mathEnabled,C=x.viewState.background,F=x.viewState.backgroundImage,m.extFonts=x.viewState.extFonts);m.background=C;m.backgroundImage=null!=F?new mxImage(F.src,F.width,F.height):null;m.pageVisible=g;m.mathEnabled=u;var z=m.getGlobalVariable;m.getGlobalVariable=function(c){return"page"==c?x.getName():"pagenumber"==c?v+1:"pagecount"==c?null!=b.pages?b.pages.length:1:z.apply(this,arguments)};document.body.appendChild(m.container);b.updatePageRoot(x);m.model.setRoot(x.root)}n=
-f(m,n,v!=p);m!=e&&m.container.parentNode.removeChild(m.container)}}else n=f(e);null==n?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(n.mathEnabled&&(p=n.wnd.document,c&&(n.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),n.closeDocument(),!n.mathEnabled&&c&&PrintDialog.printPreview(n));null!=l&&(e.stylesheet=l,e.refresh())}}var e=b.editor.graph,l=document.createElement("div"),m=document.createElement("h3");
-m.style.width="100%";m.style.textAlign="center";m.style.marginTop="0px";mxUtils.write(m,c||mxResources.get("print"));l.appendChild(m);var g=1,k=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);m=document.createElement("span");
-mxUtils.write(m,mxResources.get("printAllPages"));p.appendChild(m);mxUtils.br(p);var n=q.cloneNode(!0);q.setAttribute("checked","checked");n.setAttribute("value","range");p.appendChild(n);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 y=t.cloneNode(!0);p.appendChild(y);mxEvent.addListener(t,"focus",function(){n.checked=!0});mxEvent.addListener(y,"focus",function(){n.checked=!0});mxEvent.addListener(t,"change",f);mxEvent.addListener(y,"change",f);if(null!=b.pages&&(g=b.pages.length,null!=b.currentPage))for(m=0;m<b.pages.length;m++)if(b.currentPage==b.pages[m]){k=m+1;t.value=k;y.value=k;break}t.setAttribute("max",g);y.setAttribute("max",g);b.isPagesEnabled()?1<g&&(l.appendChild(p),
-n.checked=!0):n.checked=!0;var u=document.createElement("div");u.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");u.appendChild(v);m=document.createElement("span");mxUtils.write(m,mxResources.get("adjustTo"));u.appendChild(m);var B=document.createElement("input");B.style.cssText="margin:0 8px 0 8px;";B.setAttribute("value","100 %");B.style.width="50px";u.appendChild(B);
-mxEvent.addListener(B,"focus",function(){v.checked=!0});l.appendChild(u);var p=p.cloneNode(!1),A=v.cloneNode(!0);A.setAttribute("value","fit");v.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(A);p.appendChild(m);u=document.createElement("table");u.style.display="inline-block";var x=document.createElement("tbody"),C=document.createElement("tr"),F=C.cloneNode(!0),z=document.createElement("td"),
-M=z.cloneNode(!0),D=z.cloneNode(!0),E=z.cloneNode(!0),G=z.cloneNode(!0),H=z.cloneNode(!0);z.style.textAlign="right";E.style.textAlign="right";mxUtils.write(z,mxResources.get("fitTo"));var L=document.createElement("input");L.style.cssText="margin:0 8px 0 8px;";L.setAttribute("value","1");L.setAttribute("min","1");L.setAttribute("type","number");L.style.width="40px";M.appendChild(L);m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsAcross"));D.appendChild(m);mxUtils.write(E,
-mxResources.get("fitToBy"));var J=L.cloneNode(!0);G.appendChild(J);mxEvent.addListener(L,"focus",function(){A.checked=!0});mxEvent.addListener(J,"focus",function(){A.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));H.appendChild(m);C.appendChild(z);C.appendChild(M);C.appendChild(D);F.appendChild(E);F.appendChild(G);F.appendChild(H);x.appendChild(C);x.appendChild(F);u.appendChild(x);p.appendChild(u);l.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 P=PageSetupDialog.addPageFormatPanel(m,"printdialog",b.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 K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";
-K.setAttribute("value","100 %");K.style.width="60px";p.appendChild(K);l.appendChild(p);m=document.createElement("div");m.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&m.appendChild(p);b.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),u.className="geBtn",m.appendChild(u));PrintDialog.previewEnabled&&(u=
-mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();d(!1)}),u.className="geBtn",m.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();d(!0)});u.className="geBtn gePrimaryBtn";m.appendChild(u);b.editor.cancelFirst||m.appendChild(p);l.appendChild(m);this.container=l};var M=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
+f.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(y)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),f.wnd.document.writeln("</style>"))}n&&(c.useCssTransforms=n,c.currentTranslate=g,c.currentScale=k,c.view.translate=p,c.view.scale=q);return f}var d=parseInt(K.value)/100;isNaN(d)&&(d=1,K.value="100 %");var d=.75*d,l=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(l=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var n=t.value,g=y.value,p=!q.checked,
+m=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,n,g,A.checked,L.value,J.value,parseInt(B.value)/100,parseInt(K.value)/100,P.get());else{p&&(p=n==k&&g==k);if(!p&&null!=b.pages&&b.pages.length){var u=0,p=b.pages.length-1;q.checked||(u=parseInt(n)-1,p=parseInt(g)-1);for(var v=u;v<=p;v++){var x=b.pages[v],n=x==b.currentPage?e:null;if(null==n){var n=b.createTemporaryGraph(e.stylesheet),g=!0,u=!1,C=null,E=null;null==x.viewState&&null==x.root&&b.updatePageRoot(x);null!=x.viewState&&
+(g=x.viewState.pageVisible,u=x.viewState.mathEnabled,C=x.viewState.background,E=x.viewState.backgroundImage,n.extFonts=x.viewState.extFonts);n.background=C;n.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;n.pageVisible=g;n.mathEnabled=u;var z=n.getGlobalVariable;n.getGlobalVariable=function(c){return"page"==c?x.getName():"pagenumber"==c?v+1:"pagecount"==c?null!=b.pages?b.pages.length:1:z.apply(this,arguments)};document.body.appendChild(n.container);b.updatePageRoot(x);n.model.setRoot(x.root)}m=
+f(n,m,v!=p);n!=e&&n.container.parentNode.removeChild(n.container)}}else m=f(e);null==m?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(m.mathEnabled&&(p=m.wnd.document,c&&(m.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),m.closeDocument(),!m.mathEnabled&&c&&PrintDialog.printPreview(m));null!=l&&(e.stylesheet=l,e.refresh())}}var e=b.editor.graph,l=document.createElement("div"),n=document.createElement("h3");
+n.style.width="100%";n.style.textAlign="center";n.style.marginTop="0px";mxUtils.write(n,c||mxResources.get("print"));l.appendChild(n);var g=1,k=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);n=document.createElement("span");
+mxUtils.write(n,mxResources.get("printAllPages"));p.appendChild(n);mxUtils.br(p);var m=q.cloneNode(!0);q.setAttribute("checked","checked");m.setAttribute("value","range");p.appendChild(m);n=document.createElement("span");mxUtils.write(n,mxResources.get("pages")+":");p.appendChild(n);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);n=document.createElement("span");
+mxUtils.write(n,mxResources.get("to"));p.appendChild(n);var y=t.cloneNode(!0);p.appendChild(y);mxEvent.addListener(t,"focus",function(){m.checked=!0});mxEvent.addListener(y,"focus",function(){m.checked=!0});mxEvent.addListener(t,"change",f);mxEvent.addListener(y,"change",f);if(null!=b.pages&&(g=b.pages.length,null!=b.currentPage))for(n=0;n<b.pages.length;n++)if(b.currentPage==b.pages[n]){k=n+1;t.value=k;y.value=k;break}t.setAttribute("max",g);y.setAttribute("max",g);b.isPagesEnabled()?1<g&&(l.appendChild(p),
+m.checked=!0):m.checked=!0;var u=document.createElement("div");u.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");u.appendChild(v);n=document.createElement("span");mxUtils.write(n,mxResources.get("adjustTo"));u.appendChild(n);var B=document.createElement("input");B.style.cssText="margin:0 8px 0 8px;";B.setAttribute("value","100 %");B.style.width="50px";u.appendChild(B);
+mxEvent.addListener(B,"focus",function(){v.checked=!0});l.appendChild(u);var p=p.cloneNode(!1),A=v.cloneNode(!0);A.setAttribute("value","fit");v.setAttribute("checked","checked");n=document.createElement("div");n.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";n.appendChild(A);p.appendChild(n);u=document.createElement("table");u.style.display="inline-block";var x=document.createElement("tbody"),C=document.createElement("tr"),E=C.cloneNode(!0),z=document.createElement("td"),
+M=z.cloneNode(!0),D=z.cloneNode(!0),F=z.cloneNode(!0),H=z.cloneNode(!0),G=z.cloneNode(!0);z.style.textAlign="right";F.style.textAlign="right";mxUtils.write(z,mxResources.get("fitTo"));var L=document.createElement("input");L.style.cssText="margin:0 8px 0 8px;";L.setAttribute("value","1");L.setAttribute("min","1");L.setAttribute("type","number");L.style.width="40px";M.appendChild(L);n=document.createElement("span");mxUtils.write(n,mxResources.get("fitToSheetsAcross"));D.appendChild(n);mxUtils.write(F,
+mxResources.get("fitToBy"));var J=L.cloneNode(!0);H.appendChild(J);mxEvent.addListener(L,"focus",function(){A.checked=!0});mxEvent.addListener(J,"focus",function(){A.checked=!0});n=document.createElement("span");mxUtils.write(n,mxResources.get("fitToSheetsDown"));G.appendChild(n);C.appendChild(z);C.appendChild(M);C.appendChild(D);E.appendChild(F);E.appendChild(H);E.appendChild(G);x.appendChild(C);x.appendChild(E);u.appendChild(x);p.appendChild(u);l.appendChild(p);p=document.createElement("div");n=
+document.createElement("div");n.style.fontWeight="bold";n.style.marginBottom="12px";mxUtils.write(n,mxResources.get("paperSize"));p.appendChild(n);n=document.createElement("div");n.style.marginBottom="12px";var P=PageSetupDialog.addPageFormatPanel(n,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(n);n=document.createElement("span");mxUtils.write(n,mxResources.get("pageScale"));p.appendChild(n);var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";
+K.setAttribute("value","100 %");K.style.width="60px";p.appendChild(K);l.appendChild(p);n=document.createElement("div");n.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&n.appendChild(p);b.isOffline()||(u=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),u.className="geBtn",n.appendChild(u));PrintDialog.previewEnabled&&(u=
+mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();d(!1)}),u.className="geBtn",n.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();d(!0)});u.className="geBtn gePrimaryBtn";n.appendChild(u);b.editor.cancelFirst||n.appendChild(p);l.appendChild(n);this.container=l};var M=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}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)}}else M.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var P=document.createElement("canvas"),S=new Image;S.onload=function(){try{P.getContext("2d").drawImage(S,0,0);var b=P.toDataURL("image/png");Editor.prototype.useCanvasForExport=
null!=b&&6<b.length}catch(I){}};S.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(K){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};b.afterDecode=function(b,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.4.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.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=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.4.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.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.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";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(b,c,d,e,g,k,n){k=null!=k?k:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
+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(b,c,d,e,g,k,m){k=null!=k?k:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";g=null!=g?g:Error(b);(new Image).src=f+"/log?severity="+k+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
-encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=g&&null!=g.stack?"&stack="+encodeURIComponent(g.stack):"")}}catch(x){}try{n||null==window.console||console.error(k,b,c,d,e,g)}catch(x){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
-"")}catch(m){}};EditorUi.sendReport=function(b,c){if("1"==urlParams.dev)EditorUi.debug("sendReport",b);else if(EditorUi.enableLogging)try{c=null!=c?c:5E4,b.length>c&&(b=b.substring(0,c)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(b))}catch(m){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var b=[(new Date).toISOString()],c=0;c<arguments.length;c++)null!=
-arguments[c]&&b.push(arguments[c]);console.log.apply(console,b)}}catch(m){}};EditorUi.parsePng=function(b,c,d){function f(b,c){var f=l;l+=c;return b.substring(f,l)}function e(b){b=f(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var l=0;if(f(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(f(b,4),"IHDR"!=f(b,4))null!=d&&d();else{f(b,17);do{d=e(b);var m=f(b,4);if(null!=c&&c(l-8,m,d))break;value=f(b,d);f(b,4);if("IEND"==
-m)break}while(d)}};EditorUi.removeChildNodes=function(b){for(;null!=b.firstChild;)b.removeChild(b.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;";
+encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=g&&null!=g.stack?"&stack="+encodeURIComponent(g.stack):"")}}catch(x){}try{m||null==window.console||console.error(k,b,c,d,e,g)}catch(x){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
+"")}catch(n){}};EditorUi.sendReport=function(b,c){if("1"==urlParams.dev)EditorUi.debug("sendReport",b);else if(EditorUi.enableLogging)try{c=null!=c?c:5E4,b.length>c&&(b=b.substring(0,c)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(b))}catch(n){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var b=[(new Date).toISOString()],c=0;c<arguments.length;c++)null!=
+arguments[c]&&b.push(arguments[c]);console.log.apply(console,b)}}catch(n){}};EditorUi.parsePng=function(b,c,d){function f(b,c){var f=l;l+=c;return b.substring(f,l)}function e(b){b=f(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var l=0;if(f(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(f(b,4),"IHDR"!=f(b,4))null!=d&&d();else{f(b,17);do{d=e(b);var n=f(b,4);if(null!=c&&c(l-8,n,d))break;value=f(b,d);f(b,4);if("IEND"==
+n)break}while(d)}};EditorUi.removeChildNodes=function(b){for(;null!=b.firstChild;)b.removeChild(b.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 b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(q){}try{var c=document.createElement("canvas"),d=new Image;d.onload=function(){try{c.getContext("2d").drawImage(d,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(t){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}try{c=
document.createElement("canvas");c.width=c.height=1;var e=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(b,c,d){return this.editor.graph.openLink(b,c,d)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,d){localStorage.setItem(b,c);null!=d&&d()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
c()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(b){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(b){return this.isOfflineApp()||!navigator.onLine||!b&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};
-EditorUi.prototype.createSpinner=function(b,c,d){var f=null==b||null==c;d=null!=d?d:24;var e=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),l=e.spin;e.spin=function(d,m){var g=!1;this.active||(l.call(this,d),this.active=!0,null!=m&&(f&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),g=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(b,c,d){var f=null==b||null==c;d=null!=d?d:24;var e=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),l=e.spin;e.spin=function(d,n){var g=!1;this.active||(l.call(this,d),this.active=!0,null!=n&&(f&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),g=document.createElement("div"),
g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily=Editor.defaultHtmlFont,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,b)+"px",g.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(g.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=m.substring(m.length-3,m.length)&&"!"!=m.charAt(m.length-1)&&(m+="..."),g.innerHTML=m,d.appendChild(g),e.status=g),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(d,m)}));this.stop();return b}),g=!0);return g};var m=e.stop;e.stop=function(){m.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};e.pause=function(){return function(){}};
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=n.substring(n.length-3,n.length)&&"!"!=n.charAt(n.length-1)&&(n+="..."),g.innerHTML=n,d.appendChild(g),e.status=g),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(d,n)}));this.stop();return b}),g=!0);return g};var n=e.stop;e.stop=function(){n.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};e.pause=function(){return function(){}};
return e};EditorUi.prototype.isCompatibleString=function(b){try{var c=mxUtils.parseXml(b),f=this.editor.extractGraphModel(c.documentElement,!0);return null!=f&&0==f.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
3==b.charCodeAt(2)&&4==b.charCodeAt(3)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&3==b.charCodeAt(2)&&6==b.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||60==b.charCodeAt(0)&&63==b.charCodeAt(1)&&120==b.charCodeAt(2)&&109==b.charCodeAt(3)&&108==b.charCodeAt(3))};EditorUi.prototype.isPngData=
function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var d=f.getFunction,e=this.editor.graph,g=this;f.getFunction=function(b){if(e.isSelectionEmpty()&&null!=g.pages&&0<g.pages.length){var c=
@@ -10563,23 +10567,23 @@ c&&g.selectPage(g.pages[0])};if(39==b.keyCode)return function(){c<g.pages.length
15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var g=mxUtils.parseXml(b),k=this.editor.extractGraphModel(g.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),c=null!=k?mxUtils.getXml(k):""}catch(u){}return c};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var c=b.indexOf('<meta charset="utf-8">');0<=c&&(b=b.slice(0,c)+'<meta charset="utf-8"/>'+b.slice(c+23-1,b.length));b=Graph.zapGremlins(b)}return b};
EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var c=null!=b?this.editor.extractGraphModel(b,!0):null;null!=c&&(b=c);if(null!=b){c=this.editor.graph;c.model.beginUpdate();try{var f=null!=this.pages?this.pages.slice():null,d=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-
1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(d[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,g,0==e?g:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
-this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=f)for(e=0;e<f.length;e++)c.model.execute(new ChangePage(this,f[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,d,e,g,k,n,v,x,A,z){c=null!=c?c:this.editor.graph;g=null!=g?g:!1;x=null!=x?x:!0;var f,l=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?f="_blank":l=f=e;if(null==b)return"";var m=b;if("mxfile"!=m.nodeName.toLowerCase()){if(z){var p=
-b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(b)}else{p=Graph.zapGremlins(mxUtils.getXml(b));m=Graph.compress(p);if(Graph.decompress(m)!=p)return p;p=b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,m)}m=b.ownerDocument.createElement("mxfile");m.appendChild(p)}A?(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()),b=null!=d?d.getMode():this.mode,null!=b&&m.setAttribute("type",b),1<m.getElementsByTagName("diagram").length&&null!=this.pages&&m.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(m):mxUtils.getXml(m);if(!k&&!g&&(n||null!=d&&/(\.html)$/i.test(d.getTitle())))z=this.getHtml2(mxUtils.getXml(m),c,null!=d?d.getTitle():null,f,l);else if(k||!g&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
+this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=f)for(e=0;e<f.length;e++)c.model.execute(new ChangePage(this,f[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,d,e,g,k,m,v,x,A,z){c=null!=c?c:this.editor.graph;g=null!=g?g:!1;x=null!=x?x:!0;var f,l=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?f="_blank":l=f=e;if(null==b)return"";var n=b;if("mxfile"!=n.nodeName.toLowerCase()){if(z){var p=
+b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(b)}else{p=Graph.zapGremlins(mxUtils.getXml(b));n=Graph.compress(p);if(Graph.decompress(n)!=p)return p;p=b.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,n)}n=b.ownerDocument.createElement("mxfile");n.appendChild(p)}A?(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()),b=null!=d?d.getMode():this.mode,null!=b&&n.setAttribute("type",b),1<n.getElementsByTagName("diagram").length&&null!=this.pages&&n.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(n):mxUtils.getXml(n);if(!k&&!g&&(m||null!=d&&/(\.html)$/i.test(d.getTitle())))z=this.getHtml2(mxUtils.getXml(n),c,null!=d?d.getTitle():null,f,l);else if(k||!g&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
App.MODE_BROWSER||(e=null),z=this.getEmbeddedSvg(z,c,e,null,v,x,l);return z};EditorUi.prototype.getXmlFileData=function(b,c,d,e){b=null!=b?b:!0;c=null!=c?c:!1;d=null!=d?d:!Editor.compressXml;var f=this.editor.getGraphXml(b,e);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&d?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
-null==c||d?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));f.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(f)),f=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var l=this.pages[c],m=l.node;if(l!=this.currentPage)if(l.needsUpdate){var g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(l.root));this.editor.graph.saveViewState(l.viewState,
-g,null,e);EditorUi.removeChildNodes(m);mxUtils.setTextContent(m,Graph.compressNode(g));delete l.needsUpdate}else e&&(this.updatePageRoot(l),null!=l.viewState.backgroundImage&&(null!=l.viewState.backgroundImage.originalSrc?l.viewState.backgroundImage=this.createImageForPageLink(l.viewState.backgroundImage.originalSrc,l):Graph.isPageLink(l.viewState.backgroundImage.src)&&(l.viewState.backgroundImage=this.createImageForPageLink(l.viewState.backgroundImage.src,l))),null!=l.viewState.backgroundImage&&
-null!=l.viewState.backgroundImage.originalSrc&&(g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(l.root)),this.editor.graph.saveViewState(l.viewState,g,null,e),m=m.cloneNode(!1),mxUtils.setTextContent(m,Graph.compressNode(g))));b(m)}return f};EditorUi.prototype.anonymizeString=function(b,c){for(var f=[],d=0;d<b.length;d++){var e=b.charAt(d);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?f.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?f.push(String.fromCharCode(65+Math.round(25*
+null==c||d?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));f.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(f)),f=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var l=this.pages[c],n=l.node;if(l!=this.currentPage)if(l.needsUpdate){var g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(l.root));this.editor.graph.saveViewState(l.viewState,
+g,null,e);EditorUi.removeChildNodes(n);mxUtils.setTextContent(n,Graph.compressNode(g));delete l.needsUpdate}else e&&(this.updatePageRoot(l),null!=l.viewState.backgroundImage&&(null!=l.viewState.backgroundImage.originalSrc?l.viewState.backgroundImage=this.createImageForPageLink(l.viewState.backgroundImage.originalSrc,l):Graph.isPageLink(l.viewState.backgroundImage.src)&&(l.viewState.backgroundImage=this.createImageForPageLink(l.viewState.backgroundImage.src,l))),null!=l.viewState.backgroundImage&&
+null!=l.viewState.backgroundImage.originalSrc&&(g=new mxCodec(mxUtils.createXmlDocument()),g=g.encode(new mxGraphModel(l.root)),this.editor.graph.saveViewState(l.viewState,g,null,e),n=n.cloneNode(!1),mxUtils.setTextContent(n,Graph.compressNode(g))));b(n)}return f};EditorUi.prototype.anonymizeString=function(b,c){for(var f=[],d=0;d<b.length;d++){var e=b.charAt(d);0<=EditorUi.ignoredAnonymizedChars.indexOf(e)?f.push(e):isNaN(parseInt(e))?e.toLowerCase()!=e?f.push(String.fromCharCode(65+Math.round(25*
Math.random()))):e.toUpperCase()!=e?f.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(e)?f.push(" "):f.push("?"):f.push(c?"0":Math.round(9*Math.random()))}return f.join("")};EditorUi.prototype.anonymizePatch=function(b){if(null!=b[EditorUi.DIFF_INSERT])for(var c=0;c<b[EditorUi.DIFF_INSERT].length;c++)try{var f=mxUtils.parseXml(b[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=f.getAttribute("name")&&f.setAttribute("name",this.anonymizeString(f.getAttribute("name")));
b[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(f)}catch(t){b[EditorUi.DIFF_INSERT][c].data=t.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var d in b[EditorUi.DIFF_UPDATE]){var e=b[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(b){var c=e.cells[b];if(null!=c){for(var f in c)null!=c[f].value&&(c[f].value="["+c[f].value.length+"]"),null!=c[f].xmlValue&&(c[f].xmlValue="["+c[f].xmlValue.length+"]"),null!=c[f].style&&(c[f].style=
"["+c[f].style.length+"]"),0==Object.keys(c[f]).length&&delete c[f];0==Object.keys(c).length&&delete e.cells[b]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete b[EditorUi.DIFF_UPDATE][d]}0==Object.keys(b[EditorUi.DIFF_UPDATE]).length&&delete b[EditorUi.DIFF_UPDATE]}return b};EditorUi.prototype.anonymizeAttributes=function(b,c){if(null!=b.attributes)for(var f=0;f<b.attributes.length;f++)"as"!=b.attributes[f].name&&
b.setAttribute(b.attributes[f].name,this.anonymizeString(b.attributes[f].value,c));if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)this.anonymizeAttributes(b.childNodes[f],c)};EditorUi.prototype.anonymizeNode=function(b,c){for(var f=b.getElementsByTagName("mxCell"),d=0;d<f.length;d++)null!=f[d].getAttribute("value")&&f[d].setAttribute("value","["+f[d].getAttribute("value").length+"]"),null!=f[d].getAttribute("xmlValue")&&f[d].setAttribute("xmlValue","["+f[d].getAttribute("xmlValue").length+
"]"),null!=f[d].getAttribute("style")&&f[d].setAttribute("style","["+f[d].getAttribute("style").length+"]"),null!=f[d].parentNode&&"root"!=f[d].parentNode.nodeName&&null!=f[d].parentNode.parentNode&&(f[d].setAttribute("id",f[d].parentNode.getAttribute("id")),f[d].parentNode.parentNode.replaceChild(f[d],f[d].parentNode));return b};EditorUi.prototype.synchronizeCurrentFile=function(b){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!b&&c.invalidChecksum?
-c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),b?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){c.handleFileError(b,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){c.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,d,e,g,k,n,
-v,x,A,z){g=null!=g?g:!0;k=null!=k?k:!1;var f=this.editor.graph;if(c||!b&&null!=x&&/(\.svg)$/i.test(x.getTitle())){var l=null!=f.themes&&"darkTheme"==f.defaultThemeName;A=!1;if(l||null!=this.pages&&this.currentPage!=this.pages[0]){var m=f.getGlobalVariable,f=this.createTemporaryGraph(l?f.getDefaultStylesheet():f.getStylesheet());f.setBackgroundImage=this.editor.graph.setBackgroundImage;var p=this.pages[0];this.currentPage==p?f.setBackgroundImage(this.editor.graph.backgroundImage):null!=p.viewState&&
-null!=p.viewState&&f.setBackgroundImage(p.viewState.backgroundImage);f.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(p.root)}}n=null!=n?n:this.getXmlFileData(g,k,A,z);x=null!=x?x:this.getCurrentFile();b=this.createFileData(n,f,x,window.location.href,b,c,d,e,g,v,A);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return b};EditorUi.prototype.getHtml=function(b,c,d,e,g,
-k){k=null!=k?k:!0;var f=null,l=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var f=k?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),m=c.view.scale;k=Math.floor(f.x/m-c.view.translate.x);m=Math.floor(f.y/m-c.view.translate.y);f=c.background;null==g&&(c=this.getBasenames().join(";"),0<c.length&&(l=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",k);b.setAttribute("y0",m)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit",
+c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),b?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){c.handleFileError(b,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){c.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,d,e,g,k,m,
+v,x,A,z){g=null!=g?g:!0;k=null!=k?k:!1;var f=this.editor.graph;if(c||!b&&null!=x&&/(\.svg)$/i.test(x.getTitle())){var l=null!=f.themes&&"darkTheme"==f.defaultThemeName;A=!1;if(l||null!=this.pages&&this.currentPage!=this.pages[0]){var n=f.getGlobalVariable,f=this.createTemporaryGraph(l?f.getDefaultStylesheet():f.getStylesheet());f.setBackgroundImage=this.editor.graph.setBackgroundImage;var p=this.pages[0];this.currentPage==p?f.setBackgroundImage(this.editor.graph.backgroundImage):null!=p.viewState&&
+null!=p.viewState&&f.setBackgroundImage(p.viewState.backgroundImage);f.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:n.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(p.root)}}m=null!=m?m:this.getXmlFileData(g,k,A,z);x=null!=x?x:this.getCurrentFile();b=this.createFileData(m,f,x,window.location.href,b,c,d,e,g,v,A);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return b};EditorUi.prototype.getHtml=function(b,c,d,e,g,
+k){k=null!=k?k:!0;var f=null,l=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var f=k?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),n=c.view.scale;k=Math.floor(f.x/n-c.view.translate.x);n=Math.floor(f.y/n-c.view.translate.y);f=c.background;null==g&&(c=this.getBasenames().join(";"),0<c.length&&(l=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",k);b.setAttribute("y0",n)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit",
"0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=e&&b.setAttribute("edit",e));null!=g&&(g=g.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";e=Graph.compress(b);Graph.decompress(e)!=b&&(e=encodeURIComponent(b));return(null==g?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=g?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==g?null!=d?"<title>"+mxUtils.htmlEntities(d)+
"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=g?'<meta http-equiv="refresh" content="0;URL=\''+g+"'\"/>\n":"")+"</head>\n<body"+(null==g&&null!=f&&f!=mxConstants.NONE?' style="background-color:'+f+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==g?'<script type="text/javascript" src="'+l+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
g+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,d,e,g){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=g&&(g=g.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(b),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage));
@@ -10587,21 +10591,21 @@ return(null==g?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,
mxUtils.htmlEntities(JSON.stringify(b))+'"></div>\n'+(null==g?'<script type="text/javascript" src="'+c+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+g+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(b){b=this.validateFileData(b);this.pages=this.fileNode=this.currentPage=null;b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:
null;var c=Editor.extractParserError(b,mxResources.get("invalidOrMissingFile"));if(c)throw Error(mxResources.get("notADiagramFile")+" ("+c+")");c=null!=b?this.editor.extractGraphModel(b,!0):null;null!=c&&(b=c);if(null!=b&&"mxfile"==b.nodeName&&(c=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var f=null;this.fileNode=b;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttribute("id")&&c[d].setAttribute("id",d),b=new DiagramPage(c[d]),
null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(b),null!=urlParams["page-id"]&&b.getId()==urlParams["page-id"]&&(f=b);this.currentPage=null!=f?f:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");b={};for(d=0;d<e.length;d++)b[e[d]]=!0;for(var g=this.editor.graph.getModel(),k=g.getChildren(g.root),d=0;d<k.length;d++){var n=k[d];g.setVisible(n,b[n.id]||!1)}}catch(x){}};EditorUi.prototype.getBaseFilename=function(b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():
-this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));/(\.drawio)$/i.test(c)&&(c=c.substring(0,c.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(b,c,d,e,g,k,n,v,x,A,z,y){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();
-var f=this.getBaseFilename(!g),l=f+("xml"==b||"pdf"==b&&z?".drawio":"")+"."+b;if("xml"==b){var m=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,e,g,null,null,null,c);this.saveData(l,b,m,"text/xml")}else if("html"==b)m=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(l,b,m,"text/html");else if("svg"!=b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?l=f+".png":"jpeg"==b&&(l=f+".jpg"),this.saveRequest(l,b,mxUtils.bind(this,function(c,
-f){try{var d=this.editor.graph.pageVisible;null!=k&&(this.editor.graph.pageVisible=k);var l=this.createDownloadRequest(c,b,e,f,n,g,v,x,A,z,y);this.editor.graph.pageVisible=d;return l}catch(S){this.handleError(S)}}));else{var p=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==b){var t=this.editor.graph.background;
-if(n||t==mxConstants.NONE)t=null;var u=this.editor.graph.getSvg(t,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else l=f+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),e)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(b,c,d,e,g,k,n,v,x,
-A,z){var f=this.editor.graph,l=f.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==k?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var m="",p="";if(l.width*l.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==c&&(null!=z?p="&from="+z.from+"&to="+z.to:0==k&&(p="&allPages=1"));if("xmlpng"==c&&(A="1",c="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=
-f.background;"png"!=c&&"pdf"!=c||!g?g||null!=k&&k!=mxConstants.NONE||(k="#ffffff"):k=mxConstants.NONE;g={globalVars:f.getExportVariables()};x&&(g.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});Graph.translateDiagram&&(g.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+m+p+"&bg="+(null!=k?k:mxConstants.NONE)+"&base64="+e+"&embedXml="+A+"&xml="+encodeURIComponent(d)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(g))+
-(null!=n?"&scale="+n:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,d){var f=window.location.hash,e=mxUtils.bind(this,function(d){var e=null!=b.data?b.data:"";null!=d&&0<d.length&&(0<e.length&&(e+="\n"),e+=d);d=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return f};this.fileLoaded(d);"csv"==
-b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var l=null!=b.interval?parseInt(b.interval):6E4,m=null,g=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){c===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),k()):this.handleError({message:mxResources.get("error")+
-" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),k=mxUtils.bind(this,function(){window.clearTimeout(m);m=window.setTimeout(g,l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){k();g()}));k();g()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){e(b)}),mxUtils.bind(this,function(b){null!=d&&d(b)})):e("")};EditorUi.prototype.updateDiagram=function(b){function c(b){var c=new mxCellOverlay(b.image||e.warningImage,
-b.tooltip,b.align,b.valign,b.offset);c.addListener(mxEvent.CLICK,function(c,f){d.alert(b.tooltip)});return c}var f=null,d=this;if(null!=b&&0<b.length&&(f=mxUtils.parseXml(b),b=null!=f?f.documentElement:null,null!=b&&"updates"==b.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var k=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var n=g.getCell(b.getAttribute("id"));if(null!=n){try{var x=b.getAttribute("value");if(null!=x){var A=mxUtils.parseXml(x).documentElement;
-if(null!=A)if("1"==A.getAttribute("replace-value"))g.setValue(n,A);else for(var z=A.attributes,y=0;y<z.length;y++)e.setAttributeForCell(n,z[y].nodeName,0<z[y].nodeValue.length?z[y].nodeValue:null)}}catch(L){null!=window.console&&console.log("Error in value for "+n.id+": "+L)}try{var B=b.getAttribute("style");null!=B&&e.model.setStyle(n,B)}catch(L){null!=window.console&&console.log("Error in style for "+n.id+": "+L)}try{var C=b.getAttribute("icon");if(null!=C){var D=0<C.length?JSON.parse(C):null;null!=
-D&&D.append||e.removeCellOverlays(n);null!=D&&e.addCellOverlay(n,c(D))}}catch(L){null!=window.console&&console.log("Error in icon for "+n.id+": "+L)}try{var E=b.getAttribute("geometry");if(null!=E){var E=JSON.parse(E),G=e.getCellGeometry(n);if(null!=G){G=G.clone();for(key in E){var F=parseFloat(E[key]);"dx"==key?G.x+=F:"dy"==key?G.y+=F:"dw"==key?G.width+=F:"dh"==key?G.height+=F:G[key]=parseFloat(E[key])}e.model.setGeometry(n,G)}}}catch(L){null!=window.console&&console.log("Error in icon for "+n.id+
+[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");b={};for(d=0;d<e.length;d++)b[e[d]]=!0;for(var g=this.editor.graph.getModel(),k=g.getChildren(g.root),d=0;d<k.length;d++){var m=k[d];g.setVisible(m,b[m.id]||!1)}}catch(x){}};EditorUi.prototype.getBaseFilename=function(b){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():
+this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));/(\.drawio)$/i.test(c)&&(c=c.substring(0,c.lastIndexOf(".")));!b&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};EditorUi.prototype.downloadFile=function(b,c,d,e,g,k,m,v,x,A,z,y){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();
+var f=this.getBaseFilename(!g),l=f+("xml"==b||"pdf"==b&&z?".drawio":"")+"."+b;if("xml"==b){var n=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,e,g,null,null,null,c);this.saveData(l,b,n,"text/xml")}else if("html"==b)n=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(l,b,n,"text/html");else if("svg"!=b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?l=f+".png":"jpeg"==b&&(l=f+".jpg"),this.saveRequest(l,b,mxUtils.bind(this,function(c,
+f){try{var d=this.editor.graph.pageVisible;null!=k&&(this.editor.graph.pageVisible=k);var l=this.createDownloadRequest(c,b,e,f,m,g,v,x,A,z,y);this.editor.graph.pageVisible=d;return l}catch(S){this.handleError(S)}}));else{var p=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==b){var t=this.editor.graph.background;
+if(m||t==mxConstants.NONE)t=null;var u=this.editor.graph.getSvg(t,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(u);this.editor.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else l=f+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),e)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(b,c,d,e,g,k,m,v,x,
+A,z){var f=this.editor.graph,l=f.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==k?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var n="",p="";if(l.width*l.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==c&&(null!=z?p="&from="+z.from+"&to="+z.to:0==k&&(p="&allPages=1"));if("xmlpng"==c&&(A="1",c="png",null!=this.pages&&null!=this.currentPage))for(k=0;k<this.pages.length;k++)if(this.pages[k]==this.currentPage){n="&from="+k;break}k=
+f.background;"png"!=c&&"pdf"!=c||!g?g||null!=k&&k!=mxConstants.NONE||(k="#ffffff"):k=mxConstants.NONE;g={globalVars:f.getExportVariables()};x&&(g.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});Graph.translateDiagram&&(g.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+n+p+"&bg="+(null!=k?k:mxConstants.NONE)+"&base64="+e+"&embedXml="+A+"&xml="+encodeURIComponent(d)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(g))+
+(null!=m?"&scale="+m:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,d){var f=window.location.hash,e=mxUtils.bind(this,function(d){var e=null!=b.data?b.data:"";null!=d&&0<d.length&&(0<e.length&&(e+="\n"),e+=d);d=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return f};this.fileLoaded(d);"csv"==
+b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var l=null!=b.interval?parseInt(b.interval):6E4,n=null,g=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){c===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),k()):this.handleError({message:mxResources.get("error")+
+" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),k=mxUtils.bind(this,function(){window.clearTimeout(n);n=window.setTimeout(g,l)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){k();g()}));k();g()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){e(b)}),mxUtils.bind(this,function(b){null!=d&&d(b)})):e("")};EditorUi.prototype.updateDiagram=function(b){function c(b){var c=new mxCellOverlay(b.image||e.warningImage,
+b.tooltip,b.align,b.valign,b.offset);c.addListener(mxEvent.CLICK,function(c,f){d.alert(b.tooltip)});return c}var f=null,d=this;if(null!=b&&0<b.length&&(f=mxUtils.parseXml(b),b=null!=f?f.documentElement:null,null!=b&&"updates"==b.nodeName)){var e=this.editor.graph,g=e.getModel();g.beginUpdate();var k=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var m=g.getCell(b.getAttribute("id"));if(null!=m){try{var x=b.getAttribute("value");if(null!=x){var A=mxUtils.parseXml(x).documentElement;
+if(null!=A)if("1"==A.getAttribute("replace-value"))g.setValue(m,A);else for(var z=A.attributes,y=0;y<z.length;y++)e.setAttributeForCell(m,z[y].nodeName,0<z[y].nodeValue.length?z[y].nodeValue:null)}}catch(L){null!=window.console&&console.log("Error in value for "+m.id+": "+L)}try{var B=b.getAttribute("style");null!=B&&e.model.setStyle(m,B)}catch(L){null!=window.console&&console.log("Error in style for "+m.id+": "+L)}try{var C=b.getAttribute("icon");if(null!=C){var D=0<C.length?JSON.parse(C):null;null!=
+D&&D.append||e.removeCellOverlays(m);null!=D&&e.addCellOverlay(m,c(D))}}catch(L){null!=window.console&&console.log("Error in icon for "+m.id+": "+L)}try{var G=b.getAttribute("geometry");if(null!=G){var G=JSON.parse(G),H=e.getCellGeometry(m);if(null!=H){H=H.clone();for(key in G){var E=parseFloat(G[key]);"dx"==key?H.x+=E:"dy"==key?H.y+=E:"dw"==key?H.width+=E:"dh"==key?H.height+=E:H[key]=parseFloat(G[key])}e.model.setGeometry(m,H)}}}catch(L){null!=window.console&&console.log("Error in icon for "+m.id+
": "+L)}}}else if("model"==b.nodeName){for(var J=b.firstChild;null!=J&&J.nodeType!=mxConstants.NODETYPE_ELEMENT;)J=J.nextSibling;null!=J&&(new mxCodec(b.firstChild)).decode(J,g)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(e.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(k=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):
-1);b=b.nextSibling}}finally{g.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return f};EditorUi.prototype.getCopyFilename=function(b,c){var f=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,d="",e=f.lastIndexOf(".");0<=e&&(d=f.substring(e),f=f.substring(0,e));if(c)var l=new Date,e=l.getFullYear(),g=l.getMonth()+1,k=l.getDate(),n=l.getHours(),A=l.getMinutes(),l=l.getSeconds(),f=f+(" "+(e+"-"+g+"-"+k+"-"+n+"-"+A+"-"+l));return f=mxResources.get("copyOf",[f])+d};
+1);b=b.nextSibling}}finally{g.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return f};EditorUi.prototype.getCopyFilename=function(b,c){var f=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,d="",e=f.lastIndexOf(".");0<=e&&(d=f.substring(e),f=f.substring(0,e));if(c)var l=new Date,e=l.getFullYear(),g=l.getMonth()+1,k=l.getDate(),m=l.getHours(),A=l.getMinutes(),l=l.getSeconds(),f=f+(" "+(e+"-"+g+"-"+k+"-"+m+"-"+A+"-"+l));return f=mxResources.get("copyOf",[f])+d};
EditorUi.prototype.fileLoaded=function(b,c){var f=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=f&&(EditorUi.debug("File.closed",[f]),f.removeListener(this.descriptorChangedListener),f.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=f&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();
this.setBackgroundImage(null);!c&&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();c||this.showSplash()});if(null!=b)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);
b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();b.isEditable()?b.isModified()?(b.addUnsavedStatus(),null!=b.backupPatch&&b.patch([b.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");
@@ -10609,27 +10613,27 @@ b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete t
(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[b]);if(this.editor.editable&&this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.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!=b?b.getHash():"none"),action:"message_"+
u.message,label:"stack_"+u.stack})}catch(v){}var l=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=f?this.fileLoaded(f):e()});c?l():this.handleError(u,mxResources.get("errorLoadingFile"),l,!0,null,null,!0)}else e();return d};EditorUi.prototype.getHashValueForPages=function(b,c){var f=0,d=new mxGraphModel,e=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=
0);for(var l=0;l<b.length;l++){this.updatePageRoot(b[l]);var g=b[l].node.cloneNode(!1);g.removeAttribute("name");d.root=b[l].root;var k=e.encode(d);this.editor.graph.saveViewState(b[l].viewState,k,!0);k.removeAttribute("pageWidth");k.removeAttribute("pageHeight");g.appendChild(k);null!=c&&(c.eltCount+=g.getElementsByTagName("*").length,c.nodeCount+=g.getElementsByTagName("mxCell").length);f=(f<<5)-f+this.hashValue(g,function(b,c,f,d){return!d||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=
-c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==b.nodeName&&"previous"==c?null:f:Math.round(f)},c)<<0}return f};EditorUi.prototype.hashValue=function(b,c,d){var f=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(f^=this.hashValue(b.nodeName,c,d));if(null!=b.attributes){null!=d&&(d.attrCount+=b.attributes.length);for(var e=0;e<b.attributes.length;e++){var l=b.attributes[e].name,m=null!=c?c(b,l,b.attributes[e].value,
-!0):b.attributes[e].value;null!=m&&(f^=this.hashValue(l,c,d)+this.hashValue(m,c,d))}}if(null!=b.childNodes)for(e=0;e<b.childNodes.length;e++)f=(f<<5)-f+this.hashValue(b.childNodes[e],c,d)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=d&&(d.byteCount+=b.length);for(e=0;e<b.length;e++)c=(c<<5)-c+b.charCodeAt(e)<<0;f^=c}return f};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,d,e,g,k,n){};
+c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==b.nodeName&&"previous"==c?null:f:Math.round(f)},c)<<0}return f};EditorUi.prototype.hashValue=function(b,c,d){var f=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(f^=this.hashValue(b.nodeName,c,d));if(null!=b.attributes){null!=d&&(d.attrCount+=b.attributes.length);for(var e=0;e<b.attributes.length;e++){var l=b.attributes[e].name,n=null!=c?c(b,l,b.attributes[e].value,
+!0):b.attributes[e].value;null!=n&&(f^=this.hashValue(l,c,d)+this.hashValue(n,c,d))}}if(null!=b.childNodes)for(e=0;e<b.childNodes.length;e++)f=(f<<5)-f+this.hashValue(b.childNodes[e],c,d)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=d&&(d.byteCount+=b.length);for(e=0;e<b.length;e++)c=(c<<5)-c+b.charCodeAt(e)<<0;f^=c}return f};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,d,e,g,k,m){};
EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var c=mxUtils.createXmlDocument(),f=c.createElement("mxlibrary");
mxUtils.setTextContent(f,JSON.stringify(b));c.appendChild(f);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var c=this.sidebar.palettes[b];if(null!=c){for(var f=0;f<c.length;f++)c[f].parentNode.removeChild(c[f]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=
function(b){var c=this.sidebar.container;if(null==b){var f=this.sidebar.palettes["L.scratchpad"];null==f&&(f=this.sidebar.palettes.search);null!=f&&(b=f[f.length-1].nextSibling)}b=null!=b?b:c.firstChild.nextSibling.nextSibling;var f=c.lastChild,d=f.previousSibling;c.insertBefore(f,b);c.insertBefore(d,f)};EditorUi.prototype.loadLibrary=function(b,c){var f=mxUtils.parseXml(b.getData());if("mxlibrary"==f.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(f.documentElement));this.libraryLoaded(b,
-d,f.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,c,d,e){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var f=this.sidebar.palettes[b.getHash()],f=null!=f?f[f.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var l=null,m=mxUtils.bind(this,
-function(c,f){0==c.length&&b.isEditable()?(null==l&&(l=document.createElement("div"),l.className="geDropTarget",mxUtils.write(l,mxResources.get("dragElementsHere"))),f.appendChild(l)):this.addLibraryEntries(c,f)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);d=null!=d&&0<d.length?d:b.getTitle();var g=this.sidebar.addPalette(b.getHash(),d,null!=e?e:!0,mxUtils.bind(this,function(b){m(c,b)}));this.repositionLibrary(f);var k=g.parentNode.previousSibling;e=k.getAttribute("title");null!=e&&0<
-e.length&&".scratchpad"!=b.title&&k.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+e);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.style.backgroundColor="inherit";k.style.position="relative";var n=document.createElement("img");n.setAttribute("src",Editor.crossImage);n.setAttribute("title",mxResources.get("close"));n.setAttribute("valign","absmiddle");n.setAttribute("border","0");n.style.position="relative";n.style.top=
-"2px";n.style.width="14px";n.style.cursor="pointer";n.style.margin="0 3px";Editor.isDarkMode()&&(n.style.filter="invert(100%)");var y=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var f=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=y?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f();mxEvent.consume(c)}}));
-if(b.isEditable()){var B=this.editor.graph,C=null,D=mxUtils.bind(this,function(f){this.showLibraryDialog(b.getTitle(),g,c,b,b.getMode());mxEvent.consume(f)}),E=mxUtils.bind(this,function(f){b.setModified(!0);b.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=n.cloneNode(!1),C.setAttribute("src",Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",p.insertBefore(C,p.firstChild),k.style.paddingRight=
-18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),k.style.paddingRight=18*p.childNodes.length+"px")})):null==y&&(y=n.cloneNode(!1),y.setAttribute("src",Editor.saveImage),y.setAttribute("title",mxResources.get("save")),p.insertBefore(y,p.firstChild),mxEvent.addListener(y,"click",mxUtils.bind(this,function(f){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
-y||b.isModified()||(k.style.paddingRight=18*p.childNodes.length+"px",y.parentNode.removeChild(y),y=null)});mxEvent.consume(f)})),k.style.paddingRight=18*p.childNodes.length+"px")}),G=mxUtils.bind(this,function(b,f,d,e){b=B.cloneCells(mxUtils.sortCells(B.model.getTopmostCells(b)));for(var m=0;m<b.length;m++){var k=B.getCellGeometry(b[m]);null!=k&&k.translate(-f.x,-f.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(b,f.width,f.height,e||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
-w:f.width,h:f.height};null!=e&&(b.title=e);c.push(b);E(d);null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)}),F=mxUtils.bind(this,function(b){if(B.isSelectionEmpty())B.getRubberband().isActive()?(B.getRubberband().execute(b),B.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=B.getSelectionCells(),f=B.view.getBounds(c),d=B.view.scale;f.x/=d;f.y/=d;f.width/=d;f.height/=d;f.x-=B.view.translate.x;
-f.y-=B.view.translate.y;G(c,f)}mxEvent.consume(b)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.panningManager&&null!=B.graphHandler.first&&(B.graphHandler.suspend(),null!=B.graphHandler.hint&&(B.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",B.panningManager.stop(),B.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.panningManager&&null!=B.graphHandler&&
-(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,B.panningManager.stop(),B.graphHandler.reset(),B.isMouseDown=!1,B.autoScroll=!0,F(b),mxEvent.consume(b))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.graphHandler.first&&(B.graphHandler.resume(),null!=B.graphHandler.hint&&(B.graphHandler.hint.style.visibility="visible"),g.style.backgroundColor="",g.style.cursor="",B.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(g,
-"dragover",mxUtils.bind(this,function(b){g.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(b){g.style.cursor="";g.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(f,d,e,k,p,n,q,t,y){if(null!=f&&"image/"==d.substring(0,6))f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(f),f=[new mxCell("",new mxGeometry(0,0,p,n),f)],f[0].vertex=!0,G(f,new mxRectangle(0,0,p,n),b,mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null);else{var u=!1,B=mxUtils.bind(this,function(f,d){if(null!=f&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(f);null!=e&&0<e.length&&(f=e)}if(null!=f)if(e=mxUtils.parseXml(f),"mxlibrary"==e.documentElement.nodeName)try{var k=
-JSON.parse(mxUtils.getTextContent(e.documentElement));m(k,g);c=c.concat(k);E(b);this.spinner.stop();u=!0}catch(X){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),k=0;k<p.length;k++){var n=this.stringToCells(Editor.getDiagramNodeXml(p[k])),q=this.editor.graph.getBoundingBoxFromGeometry(n);G(n,new mxRectangle(0,0,q.width,q.height),b)}u=!0}catch(X){null!=window.console&&console.log("error in drop handler:",X)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+d,f.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,c,d,e){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var f=this.sidebar.palettes[b.getHash()],f=null!=f?f[f.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var l=null,n=mxUtils.bind(this,
+function(c,f){0==c.length&&b.isEditable()?(null==l&&(l=document.createElement("div"),l.className="geDropTarget",mxUtils.write(l,mxResources.get("dragElementsHere"))),f.appendChild(l)):this.addLibraryEntries(c,f)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);d=null!=d&&0<d.length?d:b.getTitle();var g=this.sidebar.addPalette(b.getHash(),d,null!=e?e:!0,mxUtils.bind(this,function(b){n(c,b)}));this.repositionLibrary(f);var k=g.parentNode.previousSibling;e=k.getAttribute("title");null!=e&&0<
+e.length&&".scratchpad"!=b.title&&k.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+e);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.style.backgroundColor="inherit";k.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Editor.crossImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("valign","absmiddle");m.setAttribute("border","0");m.style.position="relative";m.style.top=
+"2px";m.style.width="14px";m.style.cursor="pointer";m.style.margin="0 3px";Editor.isDarkMode()&&(m.style.filter="invert(100%)");var y=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var f=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=y?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f();mxEvent.consume(c)}}));
+if(b.isEditable()){var B=this.editor.graph,C=null,D=mxUtils.bind(this,function(f){this.showLibraryDialog(b.getTitle(),g,c,b,b.getMode());mxEvent.consume(f)}),G=mxUtils.bind(this,function(f){b.setModified(!0);b.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=m.cloneNode(!1),C.setAttribute("src",Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",p.insertBefore(C,p.firstChild),k.style.paddingRight=
+18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),k.style.paddingRight=18*p.childNodes.length+"px")})):null==y&&(y=m.cloneNode(!1),y.setAttribute("src",Editor.saveImage),y.setAttribute("title",mxResources.get("save")),p.insertBefore(y,p.firstChild),mxEvent.addListener(y,"click",mxUtils.bind(this,function(f){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
+y||b.isModified()||(k.style.paddingRight=18*p.childNodes.length+"px",y.parentNode.removeChild(y),y=null)});mxEvent.consume(f)})),k.style.paddingRight=18*p.childNodes.length+"px")}),H=mxUtils.bind(this,function(b,f,d,e){b=B.cloneCells(mxUtils.sortCells(B.model.getTopmostCells(b)));for(var n=0;n<b.length;n++){var k=B.getCellGeometry(b[n]);null!=k&&k.translate(-f.x,-f.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(b,f.width,f.height,e||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
+w:f.width,h:f.height};null!=e&&(b.title=e);c.push(b);G(d);null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)}),E=mxUtils.bind(this,function(b){if(B.isSelectionEmpty())B.getRubberband().isActive()?(B.getRubberband().execute(b),B.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=B.getSelectionCells(),f=B.view.getBounds(c),d=B.view.scale;f.x/=d;f.y/=d;f.width/=d;f.height/=d;f.x-=B.view.translate.x;
+f.y-=B.view.translate.y;H(c,f)}mxEvent.consume(b)});mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.panningManager&&null!=B.graphHandler.first&&(B.graphHandler.suspend(),null!=B.graphHandler.hint&&(B.graphHandler.hint.style.visibility="hidden"),g.style.backgroundColor="#f1f3f4",g.style.cursor="copy",B.panningManager.stop(),B.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.panningManager&&null!=B.graphHandler&&
+(g.style.backgroundColor="",g.style.cursor="default",this.sidebar.showTooltips=!0,B.panningManager.stop(),B.graphHandler.reset(),B.isMouseDown=!1,B.autoScroll=!0,E(b),mxEvent.consume(b))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(b){B.isMouseDown&&null!=B.graphHandler.first&&(B.graphHandler.resume(),null!=B.graphHandler.hint&&(B.graphHandler.hint.style.visibility="visible"),g.style.backgroundColor="",g.style.cursor="",B.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(g,
+"dragover",mxUtils.bind(this,function(b){g.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(b){g.style.cursor="";g.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(f,d,e,k,p,m,q,t,y){if(null!=f&&"image/"==d.substring(0,6))f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(f),f=[new mxCell("",new mxGeometry(0,0,p,m),f)],f[0].vertex=!0,H(f,new mxRectangle(0,0,p,m),b,mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null);else{var u=!1,B=mxUtils.bind(this,function(f,d){if(null!=f&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(f);null!=e&&0<e.length&&(f=e)}if(null!=f)if(e=mxUtils.parseXml(f),"mxlibrary"==e.documentElement.nodeName)try{var k=
+JSON.parse(mxUtils.getTextContent(e.documentElement));n(k,g);c=c.concat(k);G(b);this.spinner.stop();u=!0}catch(X){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),k=0;k<p.length;k++){var m=this.stringToCells(Editor.getDiagramNodeXml(p[k])),q=this.editor.graph.getBoundingBoxFromGeometry(m);H(m,new mxRectangle(0,0,q.width,q.height),b)}u=!0}catch(X){null!=window.console&&console.log("error in drop handler:",X)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
null!=l&&null!=l.parentNode&&0<c.length&&(l.parentNode.removeChild(l),l=null)});null!=y&&null!=q&&(/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q))?this.importVisio(y,function(b){B(b,"text/xml")},null,q):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f,q)&&null!=y?this.parseFile(y,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?B(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):B(f,d)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"dragleave",function(b){g.style.cursor="";g.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));n=n.cloneNode(!1);n.setAttribute("src",Editor.editImage);n.setAttribute("title",mxResources.get("edit"));p.insertBefore(n,p.firstChild);mxEvent.addListener(n,"click",D);mxEvent.addListener(g,"dblclick",function(b){mxEvent.getSource(b)==
-g&&D(b)});e=n.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));p.insertBefore(e,p.firstChild);mxEvent.addListener(e,"click",F);this.isOffline()||".scratchpad"!=b.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;cursor:pointer;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):B(f,d)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(g,"dragleave",function(b){g.style.cursor="";g.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",Editor.editImage);m.setAttribute("title",mxResources.get("edit"));p.insertBefore(m,p.firstChild);mxEvent.addListener(m,"click",D);mxEvent.addListener(g,"dblclick",function(b){mxEvent.getSource(b)==
+g&&D(b)});e=m.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));p.insertBefore(e,p.firstChild);mxEvent.addListener(e,"click",E);this.isOffline()||".scratchpad"!=b.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;cursor:pointer;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
mxEvent.consume(b)})),p.insertBefore(e,p.firstChild))}k.appendChild(p);k.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var f=0;f<b.length;f++){var d=b[f],e=d.data;if(null!=e){var e=this.convertDataUri(e),l="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(l+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(l+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(Graph.decompress(d.xml)),
0<e.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.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="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):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
@@ -10638,28 +10642,28 @@ endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPer
480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,c){if(!c){var f=new ChangePageSetup(this,null,b);f.ignoreColor=!0;this.editor.graph.model.execute(f)}});var f=new BackgroundImageDialog(this,b,c);this.showDialog(f.container,360,200,!0,!0);f.init()};EditorUi.prototype.showLibraryDialog=function(b,c,d,e,g){b=new LibraryDialog(this,b,c,d,e,g);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,
function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var d=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var c=d.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var b=this.createDiv("geSidebarContainer geSidebarFooter");b.style.position="absolute";b.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>+</span>";var d=c.getElementsByTagName("span")[0];d.style.fontSize="18px";d.style.marginRight="5px";mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
-function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,d,e,g,k,n){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{n?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(C){}if(null!=
-l||null!=c){n=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok"),p=null;c=null!=c?c:mxResources.get("error");if(null!=l){null!=l.retry&&(m=mxResources.get("cancel"),p=function(){f();l.retry()});if(404==l.code||404==l.status||403==l.code){n=403==l.code?null!=l.message?mxUtils.htmlEntities(l.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=g?g:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
+function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,d,e,g,k,m){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{m?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(C){}if(null!=
+l||null!=c){m=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok"),p=null;c=null!=c?c:mxResources.get("error");if(null!=l){null!=l.retry&&(n=mxResources.get("cancel"),p=function(){f();l.retry()});if(404==l.code||404==l.status||403==l.code){m=403==l.code?null!=l.message?mxUtils.htmlEntities(l.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=g?g:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=g?null:null!=k?k:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==l.code||404==l.status)){q="#U"==q.substring(0,2)?q.substring(45,q.lastIndexOf("%26ex")):
-q.substring(2);this.showError(c,n,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,d,e,g)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){e.innerHTML="";for(var b=0;b<c.length;b++){var f=document.createElement("option");mxUtils.write(f,c[b].displayName);f.value=b;e.appendChild(f);f=document.createElement("option");f.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(f,"<"+c[b].email+
+q.substring(2);this.showError(c,m,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,d,e,g)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){e.innerHTML="";for(var b=0;b<c.length;b++){var f=document.createElement("option");mxUtils.write(f,c[b].displayName);f.value=b;e.appendChild(f);f=document.createElement("option");f.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(f,"<"+c[b].email+
">");f.setAttribute("disabled","disabled");e.appendChild(f)}f=document.createElement("option");mxUtils.write(f,mxResources.get("addAccount"));f.value=c.length;e.appendChild(f)}var c=this.drive.getUsersList(),f=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");f.appendChild(d);var e=document.createElement("select");e.style.width="200px";b();mxEvent.addListener(e,"change",mxUtils.bind(this,function(){var f=e.value,
-d=c.length!=f;d&&this.drive.setUser(c[f]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));f.appendChild(e);f=new CustomDialog(this,f,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(f.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=l.message?n=""==l.message&&null!=
-l.name?mxUtils.htmlEntities(l.name):mxUtils.htmlEntities(l.message):null!=l.response&&null!=l.response.error?n=mxUtils.htmlEntities(l.response.error):"undefined"!==typeof window.App&&(l.code==App.ERROR_TIMEOUT?n=mxUtils.htmlEntities(mxResources.get("timeout")):l.code==App.ERROR_BUSY?n=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof l&&0<l.length&&(n=mxUtils.htmlEntities(l)))}var t=k=null;null!=l&&null!=l.helpLink&&(k=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(l.helpLink)}));
-this.showError(c,n,m,d,p,null,null,k,t,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(b,c,d){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,d||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,d,e,g,k){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){f();null!=c&&c()},function(){f();null!=d&&d()},e,g,null,
+d=c.length!=f;d&&this.drive.setUser(c[f]);this.drive.authorize(d,mxUtils.bind(this,function(){d||(c=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));f.appendChild(e);f=new CustomDialog(this,f,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(f.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=l.message?m=""==l.message&&null!=
+l.name?mxUtils.htmlEntities(l.name):mxUtils.htmlEntities(l.message):null!=l.response&&null!=l.response.error?m=mxUtils.htmlEntities(l.response.error):"undefined"!==typeof window.App&&(l.code==App.ERROR_TIMEOUT?m=mxUtils.htmlEntities(mxResources.get("timeout")):l.code==App.ERROR_BUSY?m=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof l&&0<l.length&&(m=mxUtils.htmlEntities(l)))}var t=k=null;null!=l&&null!=l.helpLink&&(k=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(l.helpLink)}));
+this.showError(c,m,n,d,p,null,null,k,t,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(b,c,d){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,d||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,d,e,g,k){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){f();null!=c&&c()},function(){f();null!=d&&d()},e,g,null,
null,null,null,l);this.showDialog(b.container,340,46+l,!0,k);b.init()};EditorUi.prototype.showBanner=function(b,c,d,e){var f=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var l=document.createElement("div");l.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(l.style,
"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(l.style,"transition","all 1s ease");l.className="geBtn gePrimaryBtn";f=document.createElement("img");f.setAttribute("src",IMAGE_PATH+"/logo.png");f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";l.appendChild(f);f=document.createElement("img");f.setAttribute("src",
-Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get(e?"doNotShowAgain":"close"));f.setAttribute("border","0");f.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";l.appendChild(f);mxUtils.write(l,c);document.body.appendChild(l);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var m=document.createElement("input");m.setAttribute("type","checkbox");
-m.setAttribute("id","geDoNotShowAgainCheckbox");m.style.marginRight="6px";if(!e){c.appendChild(m);var g=document.createElement("label");g.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(g,mxResources.get("doNotShowAgain"));c.appendChild(g);l.style.paddingBottom="30px";l.appendChild(c)}var k=mxUtils.bind(this,function(){null!=l.parentNode&&(l.parentNode.removeChild(l),this.bannerShowing=!1,m.checked||e)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
-b]=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);k()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k()}),1E3)});mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);c!=m&&c!=g?(null!=d&&d(),k(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,
+Dialog.prototype.closeImage);f.setAttribute("title",mxResources.get(e?"doNotShowAgain":"close"));f.setAttribute("border","0");f.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";l.appendChild(f);mxUtils.write(l,c);document.body.appendChild(l);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var n=document.createElement("input");n.setAttribute("type","checkbox");
+n.setAttribute("id","geDoNotShowAgainCheckbox");n.style.marginRight="6px";if(!e){c.appendChild(n);var g=document.createElement("label");g.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(g,mxResources.get("doNotShowAgain"));c.appendChild(g);l.style.paddingBottom="30px";l.appendChild(c)}var k=mxUtils.bind(this,function(){null!=l.parentNode&&(l.parentNode.removeChild(l),this.bannerShowing=!1,n.checked||e)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);k()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k()}),1E3)});mxEvent.addListener(l,"click",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);c!=n&&c!=g?(null!=d&&d(),k(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(l.style,
"transform","translate(-50%,0%)")}),500);window.setTimeout(p,3E4);f=!0}return f};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,d,e){b=b.toDataURL("image/"+d);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(c))),
0<e&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",e));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,d,e,g){var f="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+(null!=c?".drawio":"")+"."+f;b=this.createImageDataUri(b,c,d,g);this.saveData(e,f,b.substring(b.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||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var f=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));f.textarea.style.width="600px";f.textarea.style.height="380px";this.showDialog(f.container,620,460,!0,!0,null,null,null,null,!0);f.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,d,e,g,k){"text/xml"!=d||/(\.drawio)$/i.test(c)||
/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=k?k:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=e?this.base64ToBlob(b,d):new Blob([b],{type:d}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(b,!0):(d.document.write(b),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+
":",b):this.openInNewWindow(b,d,e);else{var f=document.createElement("a");k=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof f.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var l=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);k=65==(l?parseInt(l[2],10):!1)?!1:k}if(k||this.isOffline()){f.href=URL.createObjectURL(e?this.base64ToBlob(b,d):new Blob([b],{type:d}));k?f.download=c:f.setAttribute("target","_blank");document.body.appendChild(f);
try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},2E4),f.click(),f.parentNode.removeChild(f)}catch(x){}}else this.createEchoRequest(b,c,d,e,g).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,d,e,g,k){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=d?"&mime="+d:"")+(null!=g?"&format="+g:"")+(null!=k?"&base64="+k:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(b,c){c=
-c||"";for(var f=atob(b),d=f.length,e=Math.ceil(d/1024),l=Array(e),g=0;g<e;++g){for(var k=1024*g,n=Math.min(k+1024,d),A=Array(n-k),z=0;k<n;++z,++k)A[z]=f[k].charCodeAt(0);l[g]=new Uint8Array(A)}return new Blob(l,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,d,e,g,k,n,v){k=null!=k?k:!1;n=null!=n?n:"vsdx"!=g&&(!mxClient.IS_IOS||!navigator.standalone);g=this.getServiceCount(k);isLocalStorage&&g++;var f=4>=g?2:6<g?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(c,f){try{if("_blank"==
+c||"";for(var f=atob(b),d=f.length,e=Math.ceil(d/1024),l=Array(e),g=0;g<e;++g){for(var k=1024*g,m=Math.min(k+1024,d),A=Array(m-k),z=0;k<m;++z,++k)A[z]=f[k].charCodeAt(0);l[g]=new Uint8Array(A)}return new Blob(l,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,d,e,g,k,m,v){k=null!=k?k:!1;m=null!=m?m:"vsdx"!=g&&(!mxClient.IS_IOS||!navigator.standalone);g=this.getServiceCount(k);isLocalStorage&&g++;var f=4>=g?2:6<g?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(c,f){try{if("_blank"==
f)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(b,d,e);else if(null!=d&&"text/html"==d.substring(0,9)){var l=new EmbedDialog(this,b);this.showDialog(l.container,440,240,!0,!0);l.init()}else{var g=window.open("about:blank");null==g?mxUtils.popup(b,!0):(g.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),g.document.close())}else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(b,c,d,e,null,v):null!=c&&0<c.length&&this.pickFolder(f,mxUtils.bind(this,function(l){try{this.exportFile(b,
-c,d,e,f,l)}catch(D){this.handleError(D)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,n,null,1<g,f,b,d,e);k=this.isServices(g)?g>f?390:270:160;this.showDialog(c.container,400,k,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,d){var f=window.open("about:blank");null==f||null==f.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?f.document.write("<html>"+
+c,d,e,f,l)}catch(D){this.handleError(D)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,k,m,null,1<g,f,b,d,e);k=this.isServices(g)?g>f?390:270:160;this.showDialog(c.container,400,k,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,d){var f=window.open("about:blank");null==f||null==f.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?f.document.write("<html>"+
b+"</html>"):(b=d?b:btoa(unescape(encodeURIComponent(b))),f.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):f.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),f.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};
EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",
this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color=
@@ -10672,85 +10676,85 @@ this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExp
this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=f.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(b){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var f=this.createImageDataUri(b,
null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",f);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(f.substring(f.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,
function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,d,e,g){this.isLocalFileSave()?this.saveLocalFile(d,b,e,g,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,f){return this.createEchoRequest(d,b,e,g,c,f)}),d,g,e)};EditorUi.prototype.saveRequest=
-function(b,c,d,e,g,k,n){n=null!=n?n:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);isLocalStorage&&f++;var l=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){if("_blank"==f||null!=b&&0<b.length){var l=d("_blank"==f?null:b,f==App.MODE_DEVICE||"download"==f||null==f||"_blank"==f?"0":"1");null!=l&&(f==App.MODE_DEVICE||"download"==f||"_blank"==f?l.simulate(document,"_blank"):this.pickFolder(f,mxUtils.bind(this,function(d){k=null!=k?k:"pdf"==c?"application/pdf":
+function(b,c,d,e,g,k,m){m=null!=m?m:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);isLocalStorage&&f++;var l=4>=f?2:6<f?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,f){if("_blank"==f||null!=b&&0<b.length){var l=d("_blank"==f?null:b,f==App.MODE_DEVICE||"download"==f||null==f||"_blank"==f?"0":"1");null!=l&&(f==App.MODE_DEVICE||"download"==f||"_blank"==f?l.simulate(document,"_blank"):this.pickFolder(f,mxUtils.bind(this,function(d){k=null!=k?k:"pdf"==c?"application/pdf":
"image/"+c;if(null!=e)try{this.exportFile(e,b,k,!0,f,d)}catch(C){this.handleError(C)}else this.spinner.spin(document.body,mxResources.get("saving"))&&l.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=l.getStatus()&&299>=l.getStatus())try{this.exportFile(l.getText(),b,k,!0,f,d)}catch(C){this.handleError(C)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),
-mxResources.get("saveAs"),mxResources.get("download"),!1,!1,n,null,1<f,l,e,k,g);f=this.isServices(f)?4<f?390:270:160;this.showDialog(b.container,380,f,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,d,e,g,k){};EditorUi.prototype.pickFolder=function(b,c,d){c(null)};EditorUi.prototype.exportSvg=function(b,c,d,e,g,k,n,v,x,A,z,y){if(this.spinner.spin(document.body,
-mxResources.get("export")))try{var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;var l=c?null:this.editor.graph.background;l==mxConstants.NONE&&(l=null);null==l&&0==c&&(l=z?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var m=this.editor.graph.getSvg(l,b,n,v,null,d,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!0,z,y);e&&this.editor.graph.addSvgShadow(m);var p=this.getBaseFilename()+(g?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();g&&b.setAttribute("content",
-this.getFileData(!0,null,null,null,d,x,null,null,null,!1));var c=Graph.xmlDeclaration+"\n"+(g?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(m);this.editor.graph.mathEnabled&&this.editor.addMathCss(m);k?(null==this.thumbImageCache&&
-(this.thumbImageCache={}),this.editor.convertImages(m,q,this.thumbImageCache)):q(m)}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(b,c,d,e,g,k,n){return this.addCheckbox(b,d,e,g,k,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,d,e,g,k,n,v){k=null!=k?k:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",n?"radio":"checkbox");n="geCheckbox-"+Editor.guid();f.id=n;null!=v&&f.setAttribute("name",v);d&&(f.setAttribute("checked",
-"checked"),f.defaultChecked=!0);e&&f.setAttribute("disabled","disabled");k&&(b.appendChild(f),d=document.createElement("label"),mxUtils.write(d,c),d.setAttribute("for",n),b.appendChild(d),g||mxUtils.br(b));return f};EditorUi.prototype.addEditButton=function(b,c){var f=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);f.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var l=document.createElement("select");
+mxResources.get("saveAs"),mxResources.get("download"),!1,!1,m,null,1<f,l,e,k,g);f=this.isServices(f)?4<f?390:270:160;this.showDialog(b.container,380,f,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,d,e,g,k){};EditorUi.prototype.pickFolder=function(b,c,d){c(null)};EditorUi.prototype.exportSvg=function(b,c,d,e,g,k,m,v,x,A,z,y){if(this.spinner.spin(document.body,
+mxResources.get("export")))try{var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;var l=c?null:this.editor.graph.background;l==mxConstants.NONE&&(l=null);null==l&&0==c&&(l=z?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var n=this.editor.graph.getSvg(l,b,m,v,null,d,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!0,z,y);e&&this.editor.graph.addSvgShadow(n);var p=this.getBaseFilename()+(g?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();g&&b.setAttribute("content",
+this.getFileData(!0,null,null,null,d,x,null,null,null,!1));var c=Graph.xmlDeclaration+"\n"+(g?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.editor.addFontCss(n);this.editor.graph.mathEnabled&&this.editor.addMathCss(n);k?(null==this.thumbImageCache&&
+(this.thumbImageCache={}),this.editor.convertImages(n,q,this.thumbImageCache)):q(n)}catch(E){this.handleError(E)}};EditorUi.prototype.addRadiobox=function(b,c,d,e,g,k,m){return this.addCheckbox(b,d,e,g,k,m,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,d,e,g,k,m,v){k=null!=k?k:!0;var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type",m?"radio":"checkbox");m="geCheckbox-"+Editor.guid();f.id=m;null!=v&&f.setAttribute("name",v);d&&(f.setAttribute("checked",
+"checked"),f.defaultChecked=!0);e&&f.setAttribute("disabled","disabled");k&&(b.appendChild(f),d=document.createElement("label"),mxUtils.write(d,c),d.setAttribute("for",m),b.appendChild(d),g||mxUtils.br(b));return f};EditorUi.prototype.addEditButton=function(b,c){var f=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);f.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var l=document.createElement("select");
l.style.width="120px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));l.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");l.appendChild(d);b.appendChild(l);mxEvent.addListener(l,"change",mxUtils.bind(this,function(){if("custom"==l.value){var b=new FilenameDialog(this,e,mxResources.get("ok"),
function(b){null!=b?e=b:l.value="blank"},mxResources.get("url"),null,null,null,null,function(){l.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(f,"change",mxUtils.bind(this,function(){f.checked&&(null==c||c.checked)?l.removeAttribute("disabled"):l.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return f.checked?"blank"===l.value?"_blank":e:null},getEditInput:function(){return f},getEditSelect:function(){return l}}};EditorUi.prototype.addLinkSection=
function(b,c){function f(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=l&&l!=mxConstants.NONE?"border:1px solid black;background-color:"+l:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");
e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);c&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+
")"),d.appendChild(e));b.appendChild(d);mxUtils.write(b,mxResources.get("borderColor")+":");var l="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(l||"none",function(b){l=b;f()});mxEvent.consume(b)}));f();g.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";b.appendChild(g);
-mxUtils.br(b);return{getColor:function(){return l},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,d,e,g,k,n){n=null!=n?n:[];e&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||n.push("lightbox=1"),"auto"!=b&&n.push("target="+b),null!=c&&c!=mxConstants.NONE&&n.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=g&&0<g.length&&n.push("edit="+encodeURIComponent(g)),k&&n.push("layers=1"),this.editor.graph.foldingEnabled&&
-n.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&n.push("page-id="+this.currentPage.getId());return n};EditorUi.prototype.createLink=function(b,c,d,e,g,k,n,v,x,A){x=this.createUrlParameters(b,c,d,e,g,k,x);b=this.getCurrentFile();c=!0;null!=n?d="#U"+encodeURIComponent(n):(b=this.getCurrentFile(),v||null==b||b.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="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&x.push("title="+encodeURIComponent(b.getTitle()));A&&1<d.length&&(x.push("open="+d.substring(1)),d="");return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<x.length?"?"+x.join("&"):"")+d};EditorUi.prototype.createHtml=function(b,c,d,e,g,k,n,v,x,A,z,y){this.getBasenames();
-var f={};""!=g&&g!=mxConstants.NONE&&(f.highlight=g);"auto"!==e&&(f.target=e);A||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(f.zoom=d/100);d=[];n&&(d.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),f.resize=!0);v&&d.push("layers");x&&d.push("tags");0<d.length&&(A&&d.push("lightbox"),f.toolbar=d.join(" "));null!=z&&0<z.length&&(f.edit=z);null!=b?f.url=b:f.xml=this.getFileData(!0,
-null,null,null,null,!n);c='<div class="mxgraph" style="'+(k?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";y(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+
-"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxResources.get("html"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var g=document.createElement("div");g.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");l=m.cloneNode(!0);l.setAttribute("value","copy");g.appendChild(l);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(m);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var p=this.getCurrentFile();
-null==d&&null!=p&&p.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(p.getId())})));l.setAttribute("checked","checked");null==d&&m.setAttribute("disabled","disabled");f.appendChild(g);var n=this.addLinkSection(f),y=this.addCheckbox(f,mxResources.get("zoom"),
-!0,null,!0);mxUtils.write(f,":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";f.appendChild(B);var C=this.addCheckbox(f,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,D=D=this.addCheckbox(f,mxResources.get("allPages"),g,!g),E=this.addCheckbox(f,mxResources.get("layers"),!0),G=this.addCheckbox(f,mxResources.get("tags"),!0),F=this.addCheckbox(f,
-mxResources.get("lightbox"),!0),J=this.addEditButton(f,F),L=J.getEditInput();L.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled");L.checked&&F.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(m.checked?d:null,y.checked,B.value,n.getTarget(),n.getColor(),C.checked,D.checked,E.checked,G.checked,
-F.checked,J.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);l.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,d,e,g,k){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,b||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var m=this.getCurrentFile(),l="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=m&&m.constructor==
-window.DriveFile&&!c){b=80;var l="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));p.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(m.getId())}));
-n.style.marginTop="12px";n.className="geBtn";p.appendChild(n);f.appendChild(p);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"));p.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(b){this.spinner.stop();b=new ErrorDialog(this,null,
+mxUtils.br(b);return{getColor:function(){return l},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,d,e,g,k,m){m=null!=m?m:[];e&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||m.push("lightbox=1"),"auto"!=b&&m.push("target="+b),null!=c&&c!=mxConstants.NONE&&m.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=g&&0<g.length&&m.push("edit="+encodeURIComponent(g)),k&&m.push("layers=1"),this.editor.graph.foldingEnabled&&
+m.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&m.push("page-id="+this.currentPage.getId());return m};EditorUi.prototype.createLink=function(b,c,d,e,g,k,m,v,x,A){x=this.createUrlParameters(b,c,d,e,g,k,x);b=this.getCurrentFile();c=!0;null!=m?d="#U"+encodeURIComponent(m):(b=this.getCurrentFile(),v||null==b||b.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="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&x.push("title="+encodeURIComponent(b.getTitle()));A&&1<d.length&&(x.push("open="+d.substring(1)),d="");return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<x.length?"?"+x.join("&"):"")+d};EditorUi.prototype.createHtml=function(b,c,d,e,g,k,m,v,x,A,z,y){this.getBasenames();
+var f={};""!=g&&g!=mxConstants.NONE&&(f.highlight=g);"auto"!==e&&(f.target=e);A||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(f.zoom=d/100);d=[];m&&(d.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(d.push("zoom"),f.resize=!0);v&&d.push("layers");x&&d.push("tags");0<d.length&&(A&&d.push("lightbox"),f.toolbar=d.join(" "));null!=z&&0<z.length&&(f.edit=z);null!=b?f.url=b:f.xml=this.getFileData(!0,
+null,null,null,null,!m);c='<div class="mxgraph" style="'+(k?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";y(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+
+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxResources.get("html"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var n=document.createElement("input");
+n.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","type-embedhtmldialog");l=n.cloneNode(!0);l.setAttribute("value","copy");g.appendChild(l);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(n);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var m=this.getCurrentFile();
+null==d&&null!=m&&m.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(m.getId())})));l.setAttribute("checked","checked");null==d&&n.setAttribute("disabled","disabled");f.appendChild(g);var p=this.addLinkSection(f),y=this.addCheckbox(f,mxResources.get("zoom"),
+!0,null,!0);mxUtils.write(f,":");var B=document.createElement("input");B.setAttribute("type","text");B.style.marginRight="16px";B.style.width="60px";B.style.marginLeft="4px";B.style.marginRight="12px";B.value="100%";f.appendChild(B);var C=this.addCheckbox(f,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,D=D=this.addCheckbox(f,mxResources.get("allPages"),g,!g),G=this.addCheckbox(f,mxResources.get("layers"),!0),H=this.addCheckbox(f,mxResources.get("tags"),!0),E=this.addCheckbox(f,
+mxResources.get("lightbox"),!0),J=this.addEditButton(f,E),L=J.getEditInput();L.style.marginBottom="16px";mxEvent.addListener(E,"change",function(){E.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled");L.checked&&E.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(n.checked?d:null,y.checked,B.value,p.getTarget(),p.getColor(),C.checked,D.checked,G.checked,H.checked,
+E.checked,J.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);l.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,d,e,g,k){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,b||mxResources.get("link"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var n=this.getCurrentFile(),l="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=n&&n.constructor==
+window.DriveFile&&!c){b=80;var l="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",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 p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));m.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(n.getId())}));
+p.style.marginTop="12px";p.className="geBtn";m.appendChild(p);f.appendChild(m);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"));m.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(b){this.spinner.stop();b=new ErrorDialog(this,null,
mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var q=null,t=null;if(null!=d||null!=e)b+=30,mxUtils.write(f,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft="6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",f.appendChild(q),mxUtils.write(f,mxResources.get("height")+":"),
-t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=e+"px",f.appendChild(t),mxUtils.br(f);var C=this.addLinkSection(f,k);d=null!=this.pages&&1<this.pages.length;var D=null;if(null==m||m.constructor!=window.DriveFile||c)D=this.addCheckbox(f,mxResources.get("allPages"),d,!d);var E=this.addCheckbox(f,mxResources.get("lightbox"),!0,null,null,!k),G=this.addEditButton(f,E),F=G.getEditInput();k&&(F.style.marginLeft=
-E.style.marginLeft,E.style.display="none",b-=20);var J=this.addCheckbox(f,mxResources.get("layers"),!0);J.style.marginLeft=F.style.marginLeft;J.style.marginTop="8px";var L=this.addCheckbox(f,mxResources.get("tags"),!0);L.style.marginLeft=F.style.marginLeft;L.style.marginBottom="16px";L.style.marginTop="16px";mxEvent.addListener(E,"change",function(){E.checked?(J.removeAttribute("disabled"),F.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"));
-F.checked&&E.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){g(C.getTarget(),C.getColor(),null==D?!0:D.checked,E.checked,G.getLink(),J.checked,null!=q?q.value:null,null!=t?t.value:null,L.checked)}),null,mxResources.get("create"),l);this.showDialog(c.container,340,300+b,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",
-!1,null)):C.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxResources.get("image"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(g?"10":"4")+"px";f.appendChild(l);if(g){mxUtils.write(f,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%";f.appendChild(m);mxUtils.write(f,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";f.appendChild(k);mxUtils.br(f)}var n=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),p=e?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram),l=this.editor.graph,q=e?null:this.addCheckbox(f,mxResources.get("transparentBackground"),l.background==mxConstants.NONE||null==l.background);null!=q&&(q.style.marginBottom="16px");b=new CustomDialog(this,f,mxUtils.bind(this,function(){var b=parseInt(m.value)/100||1,c=parseInt(k.value)||0;d(!n.checked,null!=p?p.checked:!1,null!=q?q.checked:!1,b,c)}),null,b,c);this.showDialog(b.container,300,(g?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,
-d,e,g,k,n,v,x){n=null!=n?n:Editor.defaultIncludeDiagram;var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph,m="jpeg"==v?220:300,p=document.createElement("h3");mxUtils.write(p,b);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(p);mxUtils.write(f,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight=
-"12px";q.value=this.lastExportZoom||"100%";f.appendChild(q);mxUtils.write(f,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";f.appendChild(t);mxUtils.br(f);var u=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),G=document.createElement("input");G.style.marginTop="16px";G.style.marginRight="8px";G.style.marginLeft=
-"24px";G.setAttribute("disabled","disabled");G.setAttribute("type","checkbox");var F=document.createElement("select");F.style.marginTop="16px";F.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(p=0;p<b.length;p++)if(!l.isSelectionEmpty()||"selectionOnly"!=b[p]){var J=document.createElement("option");mxUtils.write(J,mxResources.get(b[p]));J.setAttribute("value",b[p]);F.appendChild(J)}x?(mxUtils.write(f,mxResources.get("size")+":"),f.appendChild(F),mxUtils.br(f),m+=26,mxEvent.addListener(F,
-"change",function(){"selectionOnly"==F.value&&(u.checked=!0)})):k&&(f.appendChild(G),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),m+=30,mxEvent.addListener(u,"change",function(){u.checked?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}));l.isSelectionEmpty()?x&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",m-=30):(F.value="diagram",G.setAttribute("checked","checked"),G.defaultChecked=!0,mxEvent.addListener(u,
-"change",function(){F.value=u.checked?"selectionOnly":"diagram"}));var L=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=v),H=null;Editor.isDarkMode()&&(H=this.addCheckbox(f,mxResources.get("dark"),!0),m+=26);var M=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible),P=document.createElement("input");P.style.marginTop="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||P.setAttribute("disabled","disabled");
-c&&(f.appendChild(P),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),m+=30);var S=null;if("png"==v||"jpeg"==v)S=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),m+=30;var K=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=v);K.style.marginBottom="16px";var I=document.createElement("select");I.style.maxWidth="260px";I.style.marginLeft="8px";I.style.marginRight="10px";I.className="geBtn";c=document.createElement("option");
-c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));I.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));I.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));I.appendChild(c);"svg"==v&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(I),mxUtils.br(f),mxUtils.br(f),m+=50);d=new CustomDialog(this,f,
-mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=q.value;g(q.value,L.checked,!u.checked,M.checked,K.checked,P.checked,t.value,G.checked,!1,I.value,null!=S?S.checked:null,null!=H?H.checked:null,F.value)}),null,d,e);this.showDialog(d.container,340,m,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,d,e,g){var f=document.createElement("div");
-f.style.whiteSpace="nowrap";var l=this.editor.graph;if(null!=c){var m=document.createElement("h3");mxUtils.write(m,c);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(m)}var k=this.addCheckbox(f,mxResources.get("fit"),!0),n=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&e,!e),p=this.addCheckbox(f,d),q=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addEditButton(f,q),C=B.getEditInput(),D=1<l.model.getChildCount(l.model.getRoot()),
-E=this.addCheckbox(f,mxResources.get("layers"),D,!D);E.style.marginLeft=C.style.marginLeft;E.style.marginBottom="12px";E.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(D&&E.removeAttribute("disabled"),C.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&q.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,
-function(){b(k.checked,n.checked,p.checked,q.checked,B.getLink(),E.checked)}),null,mxResources.get("embed"),g);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,d,e,g,k,n,v){function f(c){var f=" ",p="";e&&(f=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=m?"&page="+m:"")+(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");b&&(p+="max-width:100%;");var q="";d&&(q=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');n('<img src="'+c+'"'+q+(""!=p?' style="'+p+'"':"")+f+"/>")}var l=this.editor.graph.getGraphBounds(),m=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=e?this.getFileData(!0):null;b=
+t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=e+"px",f.appendChild(t),mxUtils.br(f);var C=this.addLinkSection(f,k);d=null!=this.pages&&1<this.pages.length;var D=null;if(null==n||n.constructor!=window.DriveFile||c)D=this.addCheckbox(f,mxResources.get("allPages"),d,!d);var G=this.addCheckbox(f,mxResources.get("lightbox"),!0,null,null,!k),H=this.addEditButton(f,G),E=H.getEditInput();k&&(E.style.marginLeft=
+G.style.marginLeft,G.style.display="none",b-=20);var J=this.addCheckbox(f,mxResources.get("layers"),!0);J.style.marginLeft=E.style.marginLeft;J.style.marginTop="8px";var L=this.addCheckbox(f,mxResources.get("tags"),!0);L.style.marginLeft=E.style.marginLeft;L.style.marginBottom="16px";L.style.marginTop="16px";mxEvent.addListener(G,"change",function(){G.checked?(J.removeAttribute("disabled"),E.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"));
+E.checked&&G.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){g(C.getTarget(),C.getColor(),null==D?!0:D.checked,G.checked,H.getLink(),J.checked,null!=q?q.value:null,null!=t?t.value:null,L.checked)}),null,mxResources.get("create"),l);this.showDialog(c.container,340,300+b,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",
+!1,null)):C.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxResources.get("image"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(g?"10":"4")+"px";f.appendChild(l);if(g){mxUtils.write(f,mxResources.get("zoom")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.marginRight="16px";k.style.width="60px";
+k.style.marginLeft="4px";k.style.marginRight="12px";k.value=this.lastExportZoom||"100%";f.appendChild(k);mxUtils.write(f,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.value=this.lastExportBorder||"0";f.appendChild(n);mxUtils.br(f)}var m=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),p=e?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),
+Editor.defaultIncludeDiagram),l=this.editor.graph,q=e?null:this.addCheckbox(f,mxResources.get("transparentBackground"),l.background==mxConstants.NONE||null==l.background);null!=q&&(q.style.marginBottom="16px");b=new CustomDialog(this,f,mxUtils.bind(this,function(){var b=parseInt(k.value)/100||1,c=parseInt(n.value)||0;d(!m.checked,null!=p?p.checked:!1,null!=q?q.checked:!1,b,c)}),null,b,c);this.showDialog(b.container,300,(g?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,
+d,e,g,k,m,v,x){m=null!=m?m:Editor.defaultIncludeDiagram;var f=document.createElement("div");f.style.whiteSpace="nowrap";var l=this.editor.graph,n="jpeg"==v?220:300,p=document.createElement("h3");mxUtils.write(p,b);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(p);mxUtils.write(f,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight=
+"12px";q.value=this.lastExportZoom||"100%";f.appendChild(q);mxUtils.write(f,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";f.appendChild(t);mxUtils.br(f);var u=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),H=document.createElement("input");H.style.marginTop="16px";H.style.marginRight="8px";H.style.marginLeft=
+"24px";H.setAttribute("disabled","disabled");H.setAttribute("type","checkbox");var E=document.createElement("select");E.style.marginTop="16px";E.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(p=0;p<b.length;p++)if(!l.isSelectionEmpty()||"selectionOnly"!=b[p]){var J=document.createElement("option");mxUtils.write(J,mxResources.get(b[p]));J.setAttribute("value",b[p]);E.appendChild(J)}x?(mxUtils.write(f,mxResources.get("size")+":"),f.appendChild(E),mxUtils.br(f),n+=26,mxEvent.addListener(E,
+"change",function(){"selectionOnly"==E.value&&(u.checked=!0)})):k&&(f.appendChild(H),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),n+=30,mxEvent.addListener(u,"change",function(){u.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")}));l.isSelectionEmpty()?x&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",n-=30):(E.value="diagram",H.setAttribute("checked","checked"),H.defaultChecked=!0,mxEvent.addListener(u,
+"change",function(){E.value=u.checked?"selectionOnly":"diagram"}));var L=this.addCheckbox(f,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=v),F=null;Editor.isDarkMode()&&(F=this.addCheckbox(f,mxResources.get("dark"),!0),n+=26);var M=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible),P=document.createElement("input");P.style.marginTop="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||P.setAttribute("disabled","disabled");
+c&&(f.appendChild(P),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),n+=30);var S=null;if("png"==v||"jpeg"==v)S=this.addCheckbox(f,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),n+=30;var K=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=v);K.style.marginBottom="16px";var I=document.createElement("select");I.style.maxWidth="260px";I.style.marginLeft="8px";I.style.marginRight="10px";I.className="geBtn";c=document.createElement("option");
+c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));I.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));I.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));I.appendChild(c);"svg"==v&&(mxUtils.write(f,mxResources.get("links")+":"),f.appendChild(I),mxUtils.br(f),mxUtils.br(f),n+=50);d=new CustomDialog(this,f,
+mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=q.value;g(q.value,L.checked,!u.checked,M.checked,K.checked,P.checked,t.value,H.checked,!1,I.value,null!=S?S.checked:null,null!=F?F.checked:null,E.value)}),null,d,e);this.showDialog(d.container,340,n,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,d,e,g){var f=document.createElement("div");
+f.style.whiteSpace="nowrap";var l=this.editor.graph;if(null!=c){var k=document.createElement("h3");mxUtils.write(k,c);k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(k)}var n=this.addCheckbox(f,mxResources.get("fit"),!0),m=this.addCheckbox(f,mxResources.get("shadow"),l.shadowVisible&&e,!e),p=this.addCheckbox(f,d),q=this.addCheckbox(f,mxResources.get("lightbox"),!0),B=this.addEditButton(f,q),C=B.getEditInput(),D=1<l.model.getChildCount(l.model.getRoot()),
+G=this.addCheckbox(f,mxResources.get("layers"),D,!D);G.style.marginLeft=C.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(D&&G.removeAttribute("disabled"),C.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"));C.checked&&q.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,
+function(){b(n.checked,m.checked,p.checked,q.checked,B.getLink(),G.checked)}),null,mxResources.get("embed"),g);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,d,e,g,k,m,v){function f(c){var f=" ",p="";e&&(f=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=n?"&page="+n:"")+(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");b&&(p+="max-width:100%;");var q="";d&&(q=' width="'+Math.round(l.width)+'" height="'+Math.round(l.height)+'"');m('<img src="'+c+'"'+q+(""!=p?' style="'+p+'"':"")+f+"/>")}var l=this.editor.graph.getGraphBounds(),n=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=e?this.getFileData(!0):null;b=
this.createImageDataUri(b,c,"png");f(b)}),null,null,null,mxUtils.bind(this,function(b){v({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),l.width*l.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var p="";d&&(p="&w="+Math.round(2*l.width)+"&h="+Math.round(2*l.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+p+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&
-299>=q.getStatus()?f("data:image/png;base64,"+q.getText()):v({message:mxResources.get("unknownError")})}))}else v({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(b,c,d,e,g,k,n){var f=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),l=f.getElementsByTagName("a");if(null!=l)for(var m=0;m<l.length;m++){var p=l[m].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==l[m].getAttribute("target")&&l[m].removeAttribute("target")}e&&
+299>=q.getStatus()?f("data:image/png;base64,"+q.getText()):v({message:mxResources.get("unknownError")})}))}else v({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(b,c,d,e,g,k,m){var f=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),l=f.getElementsByTagName("a");if(null!=l)for(var n=0;n<l.length;n++){var p=l[n].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==l[n].getAttribute("target")&&l[n].removeAttribute("target")}e&&
f.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(f);if(d){var q=" ",t="";e&&(q="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(g?"&edit=_blank":"")+(k?"&layers=1":
-"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(f,mxUtils.bind(this,function(b){n('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+q+"/>")}))}else t="",e&&(c=this.getSelectedPageIndex(),f.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=c?"&page="+c:"")+(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(f.getAttribute("width")),g=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","-0.5 -0.5 "+b+" "+g),t+="max-width:100%;max-height:"+g+"px;",f.removeAttribute("height")),""!=t&&f.setAttribute("style",t),this.editor.addFontCss(f),this.editor.graph.mathEnabled&&this.editor.addMathCss(f),n(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(b){b=
+"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(f,mxUtils.bind(this,function(b){m('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+q+"/>")}))}else t="",e&&(c=this.getSelectedPageIndex(),f.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=c?"&page="+c:"")+(g?"&edit=_blank":"")+(k?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(f.getAttribute("width")),g=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","-0.5 -0.5 "+b+" "+g),t+="max-width:100%;max-height:"+g+"px;",f.removeAttribute("height")),""!=t&&f.setAttribute("style",t),this.editor.addFontCss(f),this.editor.graph.mathEnabled&&this.editor.addMathCss(f),m(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(b){b=
Math.floor((new Date-b)/1E3);var c=Math.floor(b/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(b/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floor(b/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(b/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(b/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(b,c){if(null!=b){var f=null;if("diagram"==b.nodeName)f=
b;else if("mxfile"==b.nodeName){var d=b.getElementsByTagName("diagram");if(0<d.length){var f=d[0],e=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?f.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:e.apply(this,arguments)}}}null!=f&&(b=Editor.parseDiagramNode(f))}d=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(t){}finally{this.editor.graph=d}return b};EditorUi.prototype.getPngFileProperties=function(b){var c=1,f=0;if(null!=
-b){if(b.hasAttribute("scale")){var d=parseFloat(b.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}b.hasAttribute("border")&&(d=parseInt(b.getAttribute("border")),!isNaN(d)&&0<d&&(f=d))}return{scale:c,border:f}};EditorUi.prototype.getEmbeddedPng=function(b,c,d,e,g){try{var f=this.editor.graph,l=null!=f.themes&&"darkTheme"==f.defaultThemeName,m=null;if(null!=d&&0<d.length)f=this.createTemporaryGraph(l?f.getDefaultStylesheet():f.getStylesheet()),document.body.appendChild(f.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
-!0),f),m=d;else if(l||null!=this.pages&&this.currentPage!=this.pages[0]){var f=this.createTemporaryGraph(l?f.getDefaultStylesheet():f.getStylesheet()),k=f.getGlobalVariable;f.setBackgroundImage=this.editor.graph.setBackgroundImage;var n=this.pages[0];this.currentPage==n?f.setBackgroundImage(this.editor.graph.backgroundImage):null!=n.viewState&&null!=n.viewState&&f.setBackgroundImage(n.viewState.backgroundImage);f.getGlobalVariable=function(b){return"page"==b?n.getName():"pagenumber"==b?1:k.apply(this,
-arguments)};document.body.appendChild(f.container);f.model.setRoot(n.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==m&&(m=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=d.toDataURL("image/png"),e=Editor.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(m));b(e.substring(e.lastIndexOf(",")+1));f!=this.editor.graph&&f.container.parentNode.removeChild(f.container)}catch(B){null!=c&&c(B)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&
-c(b)}),null,null,e,null,f.shadowVisible,null,f,g,null,null,null,"diagram",null)}catch(z){null!=c&&c(z)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,d,e,g,k,n,v,x,A,z,y,B){v=null!=v?v:!0;n=null!=x?x:c.background;n==mxConstants.NONE&&(n=null);k=c.getSvg(n,A,z,null,null,k,null,null,null,c.shadowVisible||y,null,B,"diagram");(c.shadowVisible||y)&&c.addSvgShadow(k);null!=b&&k.setAttribute("content",b);null!=d&&k.setAttribute("resource",d);var f=(e?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+
-Graph.svgDoctype+"\n")+mxUtils.getXml(k);if(null!=g)this.embedFonts(k,mxUtils.bind(this,function(b){v?this.editor.convertImages(b,mxUtils.bind(this,function(b){g(f)})):g(f)}));else return f};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(f){try{null!=f&&this.editor.addFontCss(b,f),c(b)}catch(p){c(b)}}))}catch(m){c(b)}}))};
-EditorUi.prototype.exportImage=function(b,c,d,e,g,k,n,v,x,A,z,y,B){x=null!=x?x:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,g?this.getFileData(!0,null,null,null,d,v):null,x,null==this.pages||0==this.pages.length,z)}catch(E){this.handleError(E)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,d,b||1,c,e,null,null,k,n,A,y,B)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,d,e,g,k,n){c=null!=c?c:0;d=null!=d?d:0;var f=[];try{var l=this.editor.graph;if(null!=b&&0<b.length){l.model.beginUpdate();try{var m=mxUtils.parseXml(b);b={};var p=this.editor.extractGraphModel(m.documentElement,
+b){if(b.hasAttribute("scale")){var d=parseFloat(b.getAttribute("scale"));!isNaN(d)&&0<d&&(c=d)}b.hasAttribute("border")&&(d=parseInt(b.getAttribute("border")),!isNaN(d)&&0<d&&(f=d))}return{scale:c,border:f}};EditorUi.prototype.getEmbeddedPng=function(b,c,d,e,g){try{var f=this.editor.graph,l=null!=f.themes&&"darkTheme"==f.defaultThemeName,k=null;if(null!=d&&0<d.length)f=this.createTemporaryGraph(l?f.getDefaultStylesheet():f.getStylesheet()),document.body.appendChild(f.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,
+!0),f),k=d;else if(l||null!=this.pages&&this.currentPage!=this.pages[0]){var f=this.createTemporaryGraph(l?f.getDefaultStylesheet():f.getStylesheet()),n=f.getGlobalVariable;f.setBackgroundImage=this.editor.graph.setBackgroundImage;var m=this.pages[0];this.currentPage==m?f.setBackgroundImage(this.editor.graph.backgroundImage):null!=m.viewState&&null!=m.viewState&&f.setBackgroundImage(m.viewState.backgroundImage);f.getGlobalVariable=function(b){return"page"==b?m.getName():"pagenumber"==b?1:n.apply(this,
+arguments)};document.body.appendChild(f.container);f.model.setRoot(m.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(d){try{null==k&&(k=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var e=d.toDataURL("image/png"),e=Editor.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(k));b(e.substring(e.lastIndexOf(",")+1));f!=this.editor.graph&&f.container.parentNode.removeChild(f.container)}catch(B){null!=c&&c(B)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&
+c(b)}),null,null,e,null,f.shadowVisible,null,f,g,null,null,null,"diagram",null)}catch(z){null!=c&&c(z)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,d,e,g,k,m,v,x,A,z,y,B){v=null!=v?v:!0;m=null!=x?x:c.background;m==mxConstants.NONE&&(m=null);k=c.getSvg(m,A,z,null,null,k,null,null,null,c.shadowVisible||y,null,B,"diagram");(c.shadowVisible||y)&&c.addSvgShadow(k);null!=b&&k.setAttribute("content",b);null!=d&&k.setAttribute("resource",d);var f=(e?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+
+Graph.svgDoctype+"\n")+mxUtils.getXml(k);if(null!=g)this.embedFonts(k,mxUtils.bind(this,function(b){v?this.editor.convertImages(b,mxUtils.bind(this,function(b){g(f)})):g(f)}));else return f};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(f){try{null!=f&&this.editor.addFontCss(b,f),c(b)}catch(p){c(b)}}))}catch(n){c(b)}}))};
+EditorUi.prototype.exportImage=function(b,c,d,e,g,k,m,v,x,A,z,y,B){x=null!=x?x:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();d=null!=d?d:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,g?this.getFileData(!0,null,null,null,d,v):null,x,null==this.pages||0==this.pages.length,z)}catch(G){this.handleError(G)}}),null,this.thumbImageCache,
+null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,d,b||1,c,e,null,null,k,m,A,y,B)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,d,e,g,k,m){c=null!=c?c:0;d=null!=d?d:0;var f=[];try{var l=this.editor.graph;if(null!=b&&0<b.length){l.model.beginUpdate();try{var n=mxUtils.parseXml(b);b={};var p=this.editor.extractGraphModel(n.documentElement,
null!=this.pages);if(null!=p&&"mxfile"==p.nodeName&&null!=this.pages){var q=p.getElementsByTagName("diagram");if(1==q.length&&!k){if(p=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<
-q.length){k=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),p=Editor.parseDiagramNode(q[0]),e=!1,u=1);for(;u<q.length;u++){var D=q[u].getAttribute("id");q[u].removeAttribute("id");var E=this.updatePageRoot(new DiagramPage(q[u]));b[D]=q[u].getAttribute("id");var G=this.pages.length;null==E.getName()&&E.setName(mxResources.get("pageWithNumber",[G+1]));l.model.execute(new ChangePage(this,E,E,G,!0));k.push(E)}this.updatePageLinks(b,
-k)}}if(null!=p&&"mxGraphModel"===p.nodeName&&(f=l.importGraphModel(p,c,d,e),null!=f))for(u=0;u<f.length;u++)this.updatePageLinksForCell(b,f[u]);n&&this.insertHandler(f,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{l.model.endUpdate()}}}catch(F){if(g)throw F;this.handleError(F)}return f};EditorUi.prototype.updatePageLinks=function(b,c){for(var f=0;f<c.length;f++)this.updatePageLinksForCell(b,c[f].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
+q.length){k=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),p=Editor.parseDiagramNode(q[0]),e=!1,u=1);for(;u<q.length;u++){var D=q[u].getAttribute("id");q[u].removeAttribute("id");var G=this.updatePageRoot(new DiagramPage(q[u]));b[D]=q[u].getAttribute("id");var H=this.pages.length;null==G.getName()&&G.setName(mxResources.get("pageWithNumber",[H+1]));l.model.execute(new ChangePage(this,G,G,H,!0));k.push(G)}this.updatePageLinks(b,
+k)}}if(null!=p&&"mxGraphModel"===p.nodeName&&(f=l.importGraphModel(p,c,d,e),null!=f))for(u=0;u<f.length;u++)this.updatePageLinksForCell(b,f[u]);m&&this.insertHandler(f,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{l.model.endUpdate()}}}catch(E){if(g)throw E;this.handleError(E)}return f};EditorUi.prototype.updatePageLinks=function(b,c){for(var f=0;f<c.length;f++)this.updatePageLinksForCell(b,c[f].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
c){var f=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(c);null!=e&&d.setLinkForCell(c,this.updatePageLink(b,e));if(d.isHtmlLabel(c)){f.innerHTML=d.sanitizeHtml(d.getLabel(c));for(var l=f.getElementsByTagName("a"),g=!1,k=0;k<l.length;k++)e=l[k].getAttribute("href"),null!=e&&(l[k].setAttribute("href",this.updatePageLink(b,e)),g=!0);g&&d.labelChanged(c,f.innerHTML)}for(k=0;k<d.model.getChildCount(c);k++)this.updatePageLinksForCell(b,d.model.getChildAt(c,k))};EditorUi.prototype.updatePageLink=
function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var f=JSON.parse(c.substring(17));if(null!=f.actions){for(var e=0;e<f.actions.length;e++){var l=f.actions[e];if(null!=l.open&&Graph.isPageLink(l.open)){var g=l.open.substring(l.open.indexOf(",")+1),d=b[g];null!=d?l.open="data:page/id,"+d:null==this.getPageById(g)&&delete l.open}}c="data:action/json,"+JSON.stringify(f)}}catch(v){}return c};
-EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,d,e,g){e=null!=e?e:b.name;d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var f=this.isRemoteVisioFormat(e);try{var l="UNKNOWN-VISIO",k=e.lastIndexOf(".");if(0<=k&&k<e.length)l=e.substring(k+1).toUpperCase();else{var m=e.lastIndexOf("/");0<=
-m&&m<e.length&&(e=e.substring(m+1))}EditorUi.logEvent({category:l+"-MS-IMPORT-FILE",action:"filename_"+e,label:f?"remote":"local"})}catch(y){}if(f)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{f=new FormData;f.append("file1",b,e);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(e)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);
-null!=g&&n.setRequestHeader("x-convert-custom",g);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var f=new FileReader;f.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(D){d({message:mxResources.get("errorLoadingFile")})}});f.readAsText(b)}else this.doImportVisio(b,c,d,e)}catch(C){d(C)}else try{""==n.responseType||"text"==n.responseType?d({message:n.responseText}):(f=new FileReader,f.onload=
-function(){d({message:JSON.parse(f.result).Message})},f.readAsText(n.response))}catch(C){d({})}});n.send(f)}else try{this.doImportVisio(b,c,d,e)}catch(y){d(y)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=function(b,c,d){d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});
+EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,d,e,g){e=null!=e?e:b.name;d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var f=this.isRemoteVisioFormat(e);try{var l="UNKNOWN-VISIO",k=e.lastIndexOf(".");if(0<=k&&k<e.length)l=e.substring(k+1).toUpperCase();else{var n=e.lastIndexOf("/");0<=
+n&&n<e.length&&(e=e.substring(n+1))}EditorUi.logEvent({category:l+"-MS-IMPORT-FILE",action:"filename_"+e,label:f?"remote":"local"})}catch(y){}if(f)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{f=new FormData;f.append("file1",b,e);var m=new XMLHttpRequest;m.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(e)?"?stencil=1":""));m.responseType="blob";this.addRemoteServiceSecurityCheck(m);
+null!=g&&m.setRequestHeader("x-convert-custom",g);m.onreadystatechange=mxUtils.bind(this,function(){if(4==m.readyState)if(200<=m.status&&299>=m.status)try{var b=m.response;if("text/xml"==b.type){var f=new FileReader;f.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(D){d({message:mxResources.get("errorLoadingFile")})}});f.readAsText(b)}else this.doImportVisio(b,c,d,e)}catch(C){d(C)}else try{""==m.responseType||"text"==m.responseType?d({message:m.responseText}):(f=new FileReader,f.onload=
+function(){d({message:JSON.parse(f.result).Message})},f.readAsText(m.response))}catch(C){d({})}});m.send(f)}else try{this.doImportVisio(b,c,d,e)}catch(y){d(y)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importGraphML=function(b,c,d){d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});
var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,d)}catch(q){d(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.exportVisio=function(b){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||
-this.handleError({message:mxResources.get("unknownError")})}catch(m){this.handleError(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.convertLucidChart=function(b,c,d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
+this.handleError({message:mxResources.get("unknownError")})}catch(n){this.handleError(n)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.convertLucidChart=function(b,c,d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(q){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(q){null!=window.console&&console.error(q),d(q)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(f,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})})}):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generateMermaidImage=function(b,c,d,e){var f=this,l=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(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=
b.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(b).getElementsByTagName("svg");if(0<c.length){var l=parseFloat(c[0].getAttribute("width")),g=parseFloat(c[0].getAttribute("height"));if(isNaN(l)||isNaN(g))try{var k=c[0].getAttribute("viewBox").split(/\s+/),l=parseFloat(k[2]),g=parseFloat(k[3])}catch(y){l=l||100,g=g||100}d(f.convertDataUri(Editor.createSvgDataUri(b)),l,g)}else e({message:mxResources.get("invalidInput")})}catch(y){e(y)}})}catch(u){e(u)}};
"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?l():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",l):mxscript("js/extensions.min.js",l))};EditorUi.prototype.generatePlantUmlImage=function(b,c,d,e){function f(b,c,d){c1=b>>2;c2=(b&3)<<4|c>>4;c3=(c&15)<<2|d>>6;c4=d&63;r="";r+=l(c1&63);r+=l(c2&63);r+=l(c3&63);return r+=l(c4&63)}function l(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+
b);b-=26;return 0==b?"-":1==b?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+f(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+f(b.charCodeAt(i),0,0):r+f(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(g.responseType="blob");g.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==
-c)d(this.response);else{var f=new FileReader;f.readAsDataURL(this.response);f.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,l=c.height;if(0==b&&0==l){var g=f.result,k=g.indexOf(","),m=decodeURIComponent(escape(atob(g.substring(k+1)))),n=mxUtils.parseXml(m).getElementsByTagName("svg");0<n.length&&(b=parseFloat(n[0].getAttribute("width")),l=parseFloat(n[0].getAttribute("height")))}d(f.result,b,l)}catch(F){e(F)}};c.src=f.result};f.onerror=function(b){e(b)}}else e(b)};g.onerror=
-function(b){e(b)};g.send()};EditorUi.prototype.insertAsPreText=function(b,c,d){var f=this.editor.graph,e=null;f.getModel().beginUpdate();try{e=f.insertVertex(null,null,"<pre>"+b+"</pre>",c,d,1,1,"text;html=1;align=left;verticalAlign=top;"),f.updateCellSize(e,!0)}finally{f.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(b,c,d,e,g,k,n,v){k=null!=k?k:!0;n=null!=n?n:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
+c)d(this.response);else{var f=new FileReader;f.readAsDataURL(this.response);f.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,l=c.height;if(0==b&&0==l){var g=f.result,k=g.indexOf(","),n=decodeURIComponent(escape(atob(g.substring(k+1)))),m=mxUtils.parseXml(n).getElementsByTagName("svg");0<m.length&&(b=parseFloat(m[0].getAttribute("width")),l=parseFloat(m[0].getAttribute("height")))}d(f.result,b,l)}catch(E){e(E)}};c.src=f.result};f.onerror=function(b){e(b)}}else e(b)};g.onerror=
+function(b){e(b)};g.send()};EditorUi.prototype.insertAsPreText=function(b,c,d){var f=this.editor.graph,e=null;f.getModel().beginUpdate();try{e=f.insertVertex(null,null,"<pre>"+b+"</pre>",c,d,1,1,"text;html=1;align=left;verticalAlign=top;"),f.updateCellSize(e,!0)}finally{f.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(b,c,d,e,g,k,m,v){k=null!=k?k:!0;m=null!=m?m:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,d,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(g||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var f=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var l=Editor.extractGraphModelFromPdf(b);if(null!=l&&0<l.length)return this.importXml(l,c,d,k,!0,v)}if("data:image/png;base64,"==
-b.substring(0,22)&&(l=this.extractGraphModelFromPng(b),null!=l&&0<l.length))return this.importXml(l,c,d,k,!0,v);if("data:image/svg+xml;"==b.substring(0,19))try{l=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(l=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0)):l=decodeURIComponent(b.substring(b.indexOf(",")+1));var m=this.importXml(l,c,d,k,!0,v);if(0<m.length)return m}catch(B){}this.loadImage(b,mxUtils.bind(this,function(e){if("data:"==b.substring(0,
-5))this.resizeImage(e,b,mxUtils.bind(this,function(b,e,l){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(d),e,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),n,this.maxImageSize);else{var l=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),g=Math.round(e.width*l);e=Math.round(e.height*l);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(d),
+b.substring(0,22)&&(l=this.extractGraphModelFromPng(b),null!=l&&0<l.length))return this.importXml(l,c,d,k,!0,v);if("data:image/svg+xml;"==b.substring(0,19))try{l=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(l=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(l):Base64.decode(l,!0)):l=decodeURIComponent(b.substring(b.indexOf(",")+1));var n=this.importXml(l,c,d,k,!0,v);if(0<n.length)return n}catch(B){}this.loadImage(b,mxUtils.bind(this,function(e){if("data:"==b.substring(0,
+5))this.resizeImage(e,b,mxUtils.bind(this,function(b,e,l){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(d),e,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),m,this.maxImageSize);else{var l=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),g=Math.round(e.width*l);e=Math.round(e.height*l);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(d),
g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var l=null;f.getModel().beginUpdate();try{l=f.insertVertex(f.getDefaultParent(),null,b,f.snap(c),f.snap(d),1,1,"text;"+(e?"html=1;":"")),f.updateCellSize(l),f.fireEvent(new mxEventObject("textInserted","cells",[l]))}finally{f.getModel().endUpdate()}f.setSelectionCell(l)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,
c,d,k,null,v);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,d,k,null,v))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{f=this.editor.graph;g=null;f.getModel().beginUpdate();try{g=f.insertVertex(f.getDefaultParent(),null,"",f.snap(c),f.snap(d),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));f.fireEvent(new mxEventObject("textInserted","cells",[g]));"<"==b.charAt(0)&&b.indexOf(">")==
b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");g.value=b;f.updateCellSize(g);if(0<this.maxTextWidth&&g.geometry.width>this.maxTextWidth){var p=f.getPreferredSizeForCell(g,this.maxTextWidth);g.geometry.width=p.width;g.geometry.height=p.height}Graph.isLink(g.value)&&f.setLinkForCell(g,g.value);g.geometry.width+=f.gridSize;g.geometry.height+=f.gridSize}finally{f.getModel().endUpdate()}return[g]}}return[]};EditorUi.prototype.formatFileSize=
@@ -10760,31 +10764,31 @@ b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.impo
function(b,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var d=new Blob([b],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var e=this.dialog,l=e.close;this.dialog.close=mxUtils.bind(this,
function(b){Editor.useLocalStorage=f;l.apply(e,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,d){var f=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(e){if(0==Object.keys(e.files).length)d();else{var l=0,g,k=!1;e.forEach(function(b,f){var e=f.name.toLowerCase();"diagram/diagram.xml"==e?(k=!0,f.async("string").then(function(b){0==b.indexOf("<mxfile ")?
c(b):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>l&&(l=e,g=f))});0<l?g.async("string").then(function(e){!f.isOffline()&&(new XMLHttpRequest).upload&&f.isRemoteFileFormat(e,b.name)?f.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):d())}),b.name):d()}):k||d()}},function(b){d(b)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=
-!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(b,c,d,e,g,k,n,v,x,A,z,y){A=null!=A?A:!0;var f=!1,l=null,m=mxUtils.bind(this,function(b){var c=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,n)):c=this.importXml(b,d,e,A,null,null!=y?mxEvent.isControlDown(y):null);null!=v&&v(c)});"image"==c.substring(0,5)?(x=!1,"image/png"==c.substring(0,9)&&(c=z?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(l=this.importXml(c,d,e,A,
-null,null!=y?mxEvent.isControlDown(y):null),x=!0)),x||(c=this.editor.graph,z=b.indexOf(";"),0<z&&(b=b.substring(0,z)+b.substring(b.indexOf(",",z+1))),A&&c.isGridEnabled()&&(d=c.snap(d),e=c.snap(e)),l=[c.insertVertex(null,null,"",d,e,g,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(f=!0,this.importGraphML(b,m)):null!=x&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?
-(f=!0,this.importVisio(x,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,n)?(f=!0,this.parseFile(null!=x?x:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?m(b.responseText):null!=v&&v(null))}),n)):0==b.indexOf("PK")&&null!=x?(f=!0,this.importZipFile(x,m,mxUtils.bind(this,function(){l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,A);v(l)}))):/(\.v(sd|dx))($|\?)/i.test(n)||/(\.vs(s|x))($|\?)/i.test(n)||
-(l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,A,null,null!=y?mxEvent.isControlDown(y):null));f||null==v||v(l);return l};EditorUi.prototype.importFiles=function(b,c,d,e,g,k,n,v,x,A,z,y,B){e=null!=e?e:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var f=null!=c&&null!=d,l=!0;c=null!=c?c:0;d=null!=d?d:0;var m=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var p=z||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>p){m=!0;break}var t=mxUtils.bind(this,
-function(){var m=this.editor.graph,p=m.gridSize;g=null!=g?g:mxUtils.bind(this,function(b,c,d,e,g,l,k,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,d,e,g,l,k,m,n,f,y,B)}catch(W){return this.handleError(W),null}});k=null!=k?k:mxUtils.bind(this,function(b){m.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,t=q,u=[],F=mxUtils.bind(this,function(b,
-c){u[b]=c;if(0==--t){this.spinner.stop();if(null!=v)v(u);else{var d=[];m.getModel().beginUpdate();try{for(var f=0;f<u.length;f++){var e=u[f]();null!=e&&(d=d.concat(e))}}finally{m.getModel().endUpdate()}}k(d)}}),x=0;x<q;x++)mxUtils.bind(this,function(f){var k=b[f];if(null!=k){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==n||n(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+
-1)))),B=mxUtils.parseXml(u),u=B.getElementsByTagName("svg");if(0<u.length){var u=u[0],v=y?null:u.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?F(f,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=B){var b=B.getElementsByTagName("svg");if(0<b.length){var l=b[0],n=l.getAttribute("width"),
-y=l.getAttribute("height"),n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN,y=null!=y&&"%"!=y.charAt(y.length-1)?parseFloat(y):NaN,u=l.getAttribute("viewBox");if(null==u||0==u.length)l.setAttribute("viewBox","0 0 "+n+" "+y);else if(isNaN(n)||isNaN(y)){var v=u.split(" ");3<v.length&&(n=parseFloat(v[2]),y=parseFloat(v[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(l));var F=Math.min(1,Math.min(e/Math.max(1,n)),e/Math.max(1,y)),A=g(q,k.type,c+f*p,d+f*p,Math.max(1,Math.round(n*F)),Math.max(1,Math.round(y*
-F)),k.name);if(isNaN(n)||isNaN(y)){var x=new Image;x.onload=mxUtils.bind(this,function(){n=Math.max(1,x.width);y=Math.max(1,x.height);A[0].geometry.width=n;A[0].geometry.height=y;l.setAttribute("viewBox","0 0 "+n+" "+y);q=Editor.createSvgDataUri(mxUtils.getXml(l));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));m.setCellStyles("image",q,[A[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(l))}return A}}}catch(Z){}return null})):F(f,mxUtils.bind(this,function(){return g(v,
-"text/xml",c+f*p,d+f*p,0,0,k.name)}))}else F(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==k.type){var x=y?null:this.extractGraphModelFromPng(b.target.result);if(null!=x&&0<x.length){var C=new Image;C.src=b.target.result;F(f,mxUtils.bind(this,function(){return g(x,"text/xml",c+f*p,d+f*p,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"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,b.target.result,mxUtils.bind(this,function(b,m,n){F(f,mxUtils.bind(this,function(){if(null!=b&&b.length<A){var q=l&&this.isResampleImageSize(k.size,z)?Math.min(1,Math.min(e/m,e/n)):1;return g(b,k.type,c+f*p,d+f*p,Math.round(m*q),Math.round(n*q),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),l,e,z,k.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,g(q,k.type,c+f*p,d+f*p,240,160,k.name,function(b){F(f,function(){return b})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?g(null,k.type,c+f*p,d+f*p,240,160,k.name,function(b){F(f,function(){return b})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?q.readAsDataURL(k):q.readAsText(k)}})(x)});if(m){m=
-[];for(q=0;q<b.length;q++)m.push(b[q]);b=m;this.confirmImageResize(function(b){l=b;t()},x)}else t()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(f,e){if(f||c)mxSettings.setResizeImages(f?e:null),mxSettings.save();d();b(e)};null==f||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(b,c,d,e,g,k,m,v,x,A,z,y){A=null!=A?A:!0;var f=!1,l=null,n=mxUtils.bind(this,function(b){var c=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,m)):c=this.importXml(b,d,e,A,null,null!=y?mxEvent.isControlDown(y):null);null!=v&&v(c)});"image"==c.substring(0,5)?(x=!1,"image/png"==c.substring(0,9)&&(c=z?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(l=this.importXml(c,d,e,A,
+null,null!=y?mxEvent.isControlDown(y):null),x=!0)),x||(c=this.editor.graph,z=b.indexOf(";"),0<z&&(b=b.substring(0,z)+b.substring(b.indexOf(",",z+1))),A&&c.isGridEnabled()&&(d=c.snap(d),e=c.snap(e)),l=[c.insertVertex(null,null,"",d,e,g,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(f=!0,this.importGraphML(b,n)):null!=x&&null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?
+(f=!0,this.importVisio(x,n)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,m)?(f=!0,this.parseFile(null!=x?x:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?n(b.responseText):null!=v&&v(null))}),m)):0==b.indexOf("PK")&&null!=x?(f=!0,this.importZipFile(x,n,mxUtils.bind(this,function(){l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,A);v(l)}))):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||
+(l=this.insertTextAt(this.validateFileData(b),d,e,!0,null,A,null,null!=y?mxEvent.isControlDown(y):null));f||null==v||v(l);return l};EditorUi.prototype.importFiles=function(b,c,d,e,g,k,m,v,x,A,z,y,B){e=null!=e?e:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var f=null!=c&&null!=d,l=!0;c=null!=c?c:0;d=null!=d?d:0;var n=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var p=z||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>p){n=!0;break}var t=mxUtils.bind(this,
+function(){var n=this.editor.graph,p=n.gridSize;g=null!=g?g:mxUtils.bind(this,function(b,c,d,e,g,l,k,n,m){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,d,e,g,l,k,n,m,f,y,B)}catch(W){return this.handleError(W),null}});k=null!=k?k:mxUtils.bind(this,function(b){n.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,t=q,u=[],E=mxUtils.bind(this,function(b,
+c){u[b]=c;if(0==--t){this.spinner.stop();if(null!=v)v(u);else{var d=[];n.getModel().beginUpdate();try{for(var f=0;f<u.length;f++){var e=u[f]();null!=e&&(d=d.concat(e))}}finally{n.getModel().endUpdate()}}k(d)}}),x=0;x<q;x++)mxUtils.bind(this,function(f){var k=b[f];if(null!=k){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==m||m(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+
+1)))),B=mxUtils.parseXml(u),u=B.getElementsByTagName("svg");if(0<u.length){var u=u[0],v=y?null:u.getAttribute("content");null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(v,!0)));null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v));null==v||"<mxfile "!==v.substring(0,8)&&"<mxGraphModel "!==v.substring(0,14)?E(f,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=B){var b=B.getElementsByTagName("svg");if(0<b.length){var l=b[0],m=l.getAttribute("width"),
+y=l.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,y=null!=y&&"%"!=y.charAt(y.length-1)?parseFloat(y):NaN,u=l.getAttribute("viewBox");if(null==u||0==u.length)l.setAttribute("viewBox","0 0 "+m+" "+y);else if(isNaN(m)||isNaN(y)){var v=u.split(" ");3<v.length&&(m=parseFloat(v[2]),y=parseFloat(v[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(l));var E=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,y)),A=g(q,k.type,c+f*p,d+f*p,Math.max(1,Math.round(m*E)),Math.max(1,Math.round(y*
+E)),k.name);if(isNaN(m)||isNaN(y)){var x=new Image;x.onload=mxUtils.bind(this,function(){m=Math.max(1,x.width);y=Math.max(1,x.height);A[0].geometry.width=m;A[0].geometry.height=y;l.setAttribute("viewBox","0 0 "+m+" "+y);q=Editor.createSvgDataUri(mxUtils.getXml(l));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));n.setCellStyles("image",q,[A[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(l))}return A}}}catch(Z){}return null})):E(f,mxUtils.bind(this,function(){return g(v,
+"text/xml",c+f*p,d+f*p,0,0,k.name)}))}else E(f,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==k.type){var x=y?null:this.extractGraphModelFromPng(b.target.result);if(null!=x&&0<x.length){var C=new Image;C.src=b.target.result;E(f,mxUtils.bind(this,function(){return g(x,"text/xml",c+f*p,d+f*p,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"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(n){this.resizeImage(n,b.target.result,mxUtils.bind(this,function(b,n,m){E(f,mxUtils.bind(this,function(){if(null!=b&&b.length<A){var q=l&&this.isResampleImageSize(k.size,z)?Math.min(1,Math.min(e/n,e/m)):1;return g(b,k.type,c+f*p,d+f*p,Math.round(n*q),Math.round(m*q),k.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),l,e,z,k.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,g(q,k.type,c+f*p,d+f*p,240,160,k.name,function(b){E(f,function(){return b})},k)});/(\.v(dx|sdx?))($|\?)/i.test(k.name)||/(\.vs(x|sx?))($|\?)/i.test(k.name)?g(null,k.type,c+f*p,d+f*p,240,160,k.name,function(b){E(f,function(){return b})},k):"image"==k.type.substring(0,5)||"application/pdf"==k.type?q.readAsDataURL(k):q.readAsText(k)}})(x)});if(n){n=
+[];for(q=0;q<b.length;q++)n.push(b[q]);b=n;this.confirmImageResize(function(b){l=b;t()},x)}else t()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(f,e){if(f||c)mxSettings.setResizeImages(f?e:null),mxSettings.save();d();b(e)};null==f||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
function(b){e(b,!0)},function(b){e(b,!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,f)};EditorUi.prototype.parseFile=function(b,c,d){d=null!=d?d:b.name;var f=new FormData;f.append("format","xml");f.append("upfile",b,d);var e=new XMLHttpRequest;e.open("POST",
-OPEN_URL);e.onreadystatechange=function(){c(e)};e.send(f);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,d,e,g,k,n){g=null!=g?g:this.maxImageSize;var f=Math.max(1,b.width),l=Math.max(1,b.height);if(e&&this.isResampleImageSize(null!=n?n:c.length,k))try{var m=Math.max(f/g,l/g);if(1<m){var p=Math.round(f/m),q=Math.round(l/
-m),t=document.createElement("canvas");t.width=p;t.height=q;t.getContext("2d").drawImage(b,0,0,p,q);var u=t.toDataURL();if(u.length<c.length){var D=document.createElement("canvas");D.width=p;D.height=q;var E=D.toDataURL();u!==E&&(c=u,f=p,l=q)}}}catch(G){}d(c,f,l)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,d){try{var f=new Image;f.onload=function(){f.width=0<f.width?f.width:120;f.height=0<f.height?f.height:
-120;c(f)};null!=d&&(f.onerror=d);f.src=b}catch(q){if(null!=d)d(q);else throw q;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:"0"!=urlParams.rough),this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&
+OPEN_URL);e.onreadystatechange=function(){c(e)};e.send(f);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,d,e,g,k,m){g=null!=g?g:this.maxImageSize;var f=Math.max(1,b.width),l=Math.max(1,b.height);if(e&&this.isResampleImageSize(null!=m?m:c.length,k))try{var n=Math.max(f/g,l/g);if(1<n){var p=Math.round(f/n),q=Math.round(l/
+n),t=document.createElement("canvas");t.width=p;t.height=q;t.getContext("2d").drawImage(b,0,0,p,q);var u=t.toDataURL();if(u.length<c.length){var D=document.createElement("canvas");D.width=p;D.height=q;var G=D.toDataURL();u!==G&&(c=u,f=p,l=q)}}}catch(H){}d(c,f,l)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,d){try{var f=new Image;f.onload=function(){f.width=0<f.width?f.width:120;f.height=0<f.height?f.height:
+120;c(f)};null!=d&&(f.onerror=d);f.src=b}catch(q){if(null!=d)d(q);else throw q;}};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:"0"!=urlParams.rough),this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&
(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,f,e){var g=JSON.parse(e);f=new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(f){null!=f&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(f,g.format,function(e,l,k){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+e+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(e),
-[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=l,m.height=k,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:f,format:g.format}))}finally{c.getModel().endUpdate()}},function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};c.cellEditor.editMermaidData=function(d,f,e){var g=JSON.parse(e);f=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(f){null!=f&&b.spinner.spin(document.body,mxResources.get("inserting"))&&
-b.generateMermaidImage(f,g.config,function(e,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",e,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,l),m.height=Math.max(m.height,k),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:f,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};var d=c.cellEditor.startEditing;
-c.cellEditor.startEditing=function(f,e){try{var g=this.graph.getAttributeForCell(f,"plantUmlData");if(null!=g)this.editPlantUmlData(f,e,g);else if(g=this.graph.getAttributeForCell(f,"mermaidData"),null!=g)this.editMermaidData(f,e,g);else{var l=c.getCellStyle(f);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(f):d.apply(this,arguments)}}catch(H){b.handleError(H)}};c.getLinkTitle=function(c){return b.getLinkTitle(c)};c.customLinkClicked=function(c){var d=!1;try{b.handleCustomLink(c),d=!0}catch(J){b.handleError(J)}return d};
-var e=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var c=e.apply(this,arguments);null!=c&&null!=c.src&&Graph.isPageLink(c.src)&&(c={originalSrc:c.src});return c};var k=c.setBackgroundImage;c.setBackgroundImage=function(c){null!=c&&null!=c.originalSrc&&(c=b.createImageForPageLink(c.originalSrc,b.currentPage,this));k.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,
-function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(b,d){var f=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=f){var e=f.indexOf(",");if(0<e)for(var f=f.substring(e+1),e=d.getProperty("patches"),g=0;g<e.length;g++)if(null!=e[g][EditorUi.DIFF_UPDATE]&&null!=e[g][EditorUi.DIFF_UPDATE][f]){c.refreshBackgroundImage();break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,c){var d=n.apply(this,arguments);
+[d]);var n=c.model.getGeometry(d);null!=n&&(n=n.clone(),n.width=l,n.height=k,c.cellsResized([d],[n],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:f,format:g.format}))}finally{c.getModel().endUpdate()}},function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};c.cellEditor.editMermaidData=function(d,f,e){var g=JSON.parse(e);f=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(f){null!=f&&b.spinner.spin(document.body,mxResources.get("inserting"))&&
+b.generateMermaidImage(f,g.config,function(e,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",e,[d]);var n=c.model.getGeometry(d);null!=n&&(n=n.clone(),n.width=Math.max(n.width,l),n.height=Math.max(n.height,k),c.cellsResized([d],[n],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:f,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(c){b.handleError(c)})},null,null,400,220);b.showDialog(f.container,420,300,!0,!0);f.init()};var d=c.cellEditor.startEditing;
+c.cellEditor.startEditing=function(f,e){try{var g=this.graph.getAttributeForCell(f,"plantUmlData");if(null!=g)this.editPlantUmlData(f,e,g);else if(g=this.graph.getAttributeForCell(f,"mermaidData"),null!=g)this.editMermaidData(f,e,g);else{var l=c.getCellStyle(f);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(f):d.apply(this,arguments)}}catch(F){b.handleError(F)}};c.getLinkTitle=function(c){return b.getLinkTitle(c)};c.customLinkClicked=function(c){var d=!1;try{b.handleCustomLink(c),d=!0}catch(J){b.handleError(J)}return d};
+var e=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var c=e.apply(this,arguments);null!=c&&null!=c.src&&Graph.isPageLink(c.src)&&(c={originalSrc:c.src});return c};var g=c.setBackgroundImage;c.setBackgroundImage=function(c){null!=c&&null!=c.originalSrc&&(c=b.createImageForPageLink(c.originalSrc,b.currentPage,this));g.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,
+function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(b,d){var f=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=f){var e=f.indexOf(",");if(0<e)for(var f=f.substring(e+1),e=d.getProperty("patches"),g=0;g<e.length;g++)if(null!=e[g][EditorUi.DIFF_UPDATE]&&null!=e[g][EditorUi.DIFF_UPDATE][f]){c.refreshBackgroundImage();break}}}));var m=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,c){var d=m.apply(this,arguments);
null==d||null==d.originalSrc||c||(d={src:d.originalSrc});return d};var u=this.clearDefaultStyle;this.clearDefaultStyle=function(){u.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var v=b.editor.getEditBlankUrl;
-this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return v.apply(this,arguments)};var x=c.addClickHandler;c.addClickHandler=function(b,d,f){var e=d;d=function(b,d){if(null==d){var f=mxEvent.getSource(b);"a"==f.nodeName.toLowerCase()&&(d=f.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=e&&e(b,d)};x.call(this,b,d,f)};g.apply(this,arguments);
+this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return v.apply(this,arguments)};var x=c.addClickHandler;c.addClickHandler=function(b,d,f){var e=d;d=function(b,d){if(null==d){var f=mxEvent.getSource(b);"a"==f.nodeName.toLowerCase()&&(d=f.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=e&&e(b,d)};x.call(this,b,d,f)};k.apply(this,arguments);
mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(c,d,f){b.editor.graph.isSelectionEmpty()?A.apply(this,arguments):b.menus.addMenuItems(c,"delete - cut copy copyAsImage - duplicate".split(" "),null,f)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=
mxResources.get("untitledDiagram");var z=c.getExportVariables;c.getExportVariables=function(){var c=z.apply(this,arguments),d=b.getCurrentFile();null!=d&&(c.filename=d.getTitle());c.pagecount=null!=b.pages?b.pages.length:1;c.page=null!=b.currentPage?b.currentPage.getName():"";c.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return c};var y=c.getGlobalVariable;c.getGlobalVariable=function(c){var d=b.getCurrentFile();return"filename"==c&&null!=d?d.getTitle():
"page"==c&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==c?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==c?null!=b.pages?b.pages.length:1:y.apply(this,arguments)};var B=c.labelLinkClicked;c.labelLinkClicked=function(b,d,f){var e=d.getAttribute("href");if(null==e||!c.isCustomLink(e)||!mxEvent.isTouchEvent(f)&&mxEvent.isPopupTrigger(f))B.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(e),c.getRubberband().reset();
@@ -10795,11 +10799,11 @@ g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b
f*e,b*e)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));this.isSettingsEnabled()&&(C=this.editor.graph.view,C.setUnit(mxSettings.getUnit()),C.addListener("unitChanged",
function(b,c){mxSettings.setUnit(c.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,C.unit),this.refresh());if("1"==urlParams.styledev){C=document.getElementById("geFooter");null!=C&&(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)})),C.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,c){if(0<this.editor.graph.getSelectionCount()){var d=
-this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:D.apply(this,arguments)}}C=document.getElementById("geInfo");null!=C&&C.parentNode.removeChild(C);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var E=null;mxEvent.addListener(c.container,
-"dragleave",function(b){c.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=E&&(E.parentNode.removeChild(E),E=null);if(c.isEnabled()){var d=
+this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:D.apply(this,arguments)}}C=document.getElementById("geInfo");null!=C&&C.parentNode.removeChild(C);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var G=null;mxEvent.addListener(c.container,
+"dragleave",function(b){c.isEnabled()&&(null!=G&&(G.parentNode.removeChild(G),G=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=G&&(G.parentNode.removeChild(G),G=null);if(c.isEnabled()){var d=
mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),f=c.view.translate,e=c.view.scale,g=d.x/e-f.x,l=d.y/e-f.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,g,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(l=g=0);var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
-b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var n=null,f=d.getElementsByTagName("img");null!=f&&1==f.length?(m=f[0].getAttribute("src"),null==m&&(m=f[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(n=
-!0)):(f=d.getElementsByTagName("a"),null!=f&&1==f.length?m=f[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,l,!0,n,null,p,mxEvent.isControlDown(b)))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),
+b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var n=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(n);var m=null,f=d.getElementsByTagName("img");null!=f&&1==f.length?(n=f[0].getAttribute("src"),null==n&&(n=f[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(n)||(m=
+!0)):(f=d.getElementsByTagName("a"),null!=f&&1==f.length?n=f[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(n=mxUtils.getTextContent(d[0]))));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(n,g,l,!0,m,null,p,mxEvent.isControlDown(b)))});m&&null!=n&&n.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),
mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,l,d*f,b*f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(k,g,l,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),
g,l,!0))}}b.stopPropagation();b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c))try{for(var d=c.clipboardData||c.originalEvent.clipboardData,f=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){f=!0;break}if(!f){var g=
d.items;for(index in g){var l=g[index];if("file"===l.kind){if(b.isEditing())this.importFiles([l.getAsFile()],0,0,this.maxImageSize,function(c,d,f,e,g,l){b.insertImage(c,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var c=0;c<b.length;c++)b[c]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(c)}break}}}}catch(x){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){d.innerHTML=
@@ -10823,9 +10827,9 @@ null,null,null,10,null,null,!1,null,0<b.length?b:null)}catch(p){this.handleError
mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(d.encodeCells(f));mxUtils.setTextContent(b,encodeURIComponent(e));c?(d.removeCells(f,!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),
c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,d,e){var f=this.editor.graph,g=null;f.lastPasteXml==b?f.pasteCounter++:(f.lastPasteXml=b,f.pasteCounter=0);var k=f.pasteCounter*f.gridSize;if(d||this.isCompatibleString(b))g=this.importXml(b,k,k),f.setSelectionCells(g);else if(c&&1==f.getSelectionCount()){k=f.getStartEditingCell(f.getSelectionCell(),e);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==f.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])f.setCellStyles(mxConstants.STYLE_IMAGE,
b,[k]);else{f.model.beginUpdate();try{f.labelChanged(k,b),Graph.isLink(b)&&f.setLinkForCell(k,b)}finally{f.model.endUpdate()}}f.setSelectionCell(k)}else g=f.getInsertPoint(),f.isMouseInsertPoint()&&(k=0,f.lastPasteXml==b&&0<f.pasteCounter&&f.pasteCounter--),g=this.insertTextAt(b,g.x+k,g.y+k,!0),f.setSelectionCells(g);f.isSelectionEmpty()||(f.scrollCellToVisible(f.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(f.view.getState(f.getSelectionCell())));return g};EditorUi.prototype.pasteCells=
-function(b,c,d,e){if(!mxEvent.isConsumed(b)){var f=c,g=!1;if(d&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(l=!0,k=m)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(f=this.parseHtmlData(l),g="text/plain"!=f.getAttribute("data-type")):null!=k&&0<k.length&&(f=document.createElement("div"),mxUtils.setTextContent(f,
+function(b,c,d,e){if(!mxEvent.isConsumed(b)){var f=c,g=!1;if(d&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var n=decodeURIComponent(k);this.isCompatibleString(n)&&(l=!0,k=n)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(f=this.parseHtmlData(l),g="text/plain"!=f.getAttribute("data-type")):null!=k&&0<k.length&&(f=document.createElement("div"),mxUtils.setTextContent(f,
l))}k=f.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(b){var c=this.editor.graph;c.lastPasteXml==b?c.pasteCounter++:(c.lastPasteXml=b,c.pasteCounter=0);var d=c.pasteCounter*c.gridSize;c.setSelectionCells(this.importXml(b,d,d));c.scrollCellToVisible(c.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),
-mxEvent.consume(b));else{g=g?f.innerHTML:mxUtils.trim(null==f.innerText?mxUtils.getTextContent(f):f.innerText);l=!1;try{var n=g.lastIndexOf("%3E");0<=n&&n<g.length-3&&(g=g.substring(0,n+3))}catch(y){}try{k=f.getElementsByTagName("span"),m=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(g),this.isCompatibleString(m)&&(l=!0,g=m)}catch(y){}try{if(null!=g&&0<g.length){this.pasteXml(g,e,l,b);try{mxEvent.consume(b)}catch(y){}}else if(!d){var p=this.editor.graph;
+mxEvent.consume(b));else{g=g?f.innerHTML:mxUtils.trim(null==f.innerText?mxUtils.getTextContent(f):f.innerText);l=!1;try{var m=g.lastIndexOf("%3E");0<=m&&m<g.length-3&&(g=g.substring(0,m+3))}catch(y){}try{k=f.getElementsByTagName("span"),n=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(g),this.isCompatibleString(n)&&(l=!0,g=n)}catch(y){}try{if(null!=g&&0<g.length){this.pasteXml(g,e,l,b);try{mxEvent.consume(b)}catch(y){}}else if(!d){var p=this.editor.graph;
p.lastPasteXml=null;p.pasteCounter=0}}catch(y){this.handleError(y)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var c=null,d=0;d<b.length;d++)mxEvent.addListener(b[d],"dragleave",function(b){null!=c&&(c.parentNode.removeChild(c),c=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[d],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&
12>document.documentMode)&&(c=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[d],"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);
else{var d=this.extractGraphModelFromEvent(b);if(null==d){var f=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=f&&(10==document.documentMode||11==document.documentMode?d=f.getData("Text"):(d=null,d=0<=mxUtils.indexOf(f.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(f.types,"text/html")?f.getData("text/html"):null,null!=d&&0<d.length?(f=document.createElement("div"),f.innerHTML=this.editor.graph.sanitizeHtml(d),f=f.getElementsByTagName("img"),0<f.length&&
@@ -10847,48 +10851,48 @@ null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=t
this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,b,{}));this.mode=App.MODE_EMBED;this.setFileData(b);if(e)try{var f=this.editor.graph;f.setGridEnabled(!1);f.pageVisible=!1;var g=f.model.cells,k;for(k in g){var l=g[k];null!=l&&null!=l.style&&(l.style+=";sketch=1;"+(-1==l.style.indexOf("fontFamily=")||-1<l.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
""))}}catch(x){console.log(x)}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(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var c=this.editor.graph;return{event:b,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale,page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var c=null,d=!1,
-f=!1,e=null,g=mxUtils.bind(this,function(b,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){if(g.source==(window.opener||window.parent)){var l=g.data,m=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==
-b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(ma){}return b});if("json"==urlParams.proto){var n=!1;try{l=JSON.parse(l)}catch(N){l=null}try{if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?
+f=!1,e=null,g=mxUtils.bind(this,function(b,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){if(g.source==(window.opener||window.parent)){var l=g.data,n=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==
+b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(ma){}return b});if("json"==urlParams.proto){var m=!1;try{l=JSON.parse(l)}catch(N){l=null}try{if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?
mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&(this.editor.modified=l.modified);return}if("layout"==l.action){this.executeLayoutList(l.layouts);return}if("prompt"==l.action){this.spinner.stop();var p=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):l.ok,function(b){null!=b?k.postMessage(JSON.stringify({event:"prompt",value:b,message:l}),"*"):k.postMessage(JSON.stringify({event:"prompt-cancel",message:l}),
-"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==l.action){var q=m(l.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),
+"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==l.action){var q=n(l.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),
"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null,l.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:l}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{p.init()}catch(N){k.postMessage(JSON.stringify({event:"draft",error:N.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();
-var t=1==l.enableRecent,u=1==l.enableSearch,v=1==l.enableCustomTemp;if("1"==urlParams.newTempDlg&&!l.templatesOnly&&null!=l.callback){var F=this.getCurrentUser(),x=new TemplatesDialog(this,function(b,c,d){b=b||this.emptyDiagramXml;k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c,tempUrl:d.url,libs:d.libs,builtIn:null!=d.info&&null!=d.info.custContentId,message:l}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=F?F.id:
+var t=1==l.enableRecent,u=1==l.enableSearch,v=1==l.enableCustomTemp;if("1"==urlParams.newTempDlg&&!l.templatesOnly&&null!=l.callback){var E=this.getCurrentUser(),x=new TemplatesDialog(this,function(b,c,d){b=b||this.emptyDiagramXml;k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c,tempUrl:d.url,libs:d.libs,builtIn:null!=d.info&&null!=d.info.custContentId,message:l}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=E?E.id:
null,t?mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getRecentDiagrams",[d],null,b,c)}):null,u?mxUtils.bind(this,function(b,c,d,f){this.remoteInvoke("searchDiagrams",[b,f],null,c,d)}):null,mxUtils.bind(this,function(b,c,d){this.remoteInvoke("getFileContent",[b.url],null,c,d)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(x.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=
new NewDialog(this,!1,l.templatesOnly?!1:null!=l.callback,mxUtils.bind(this,function(c,d,f,e){c=c||this.emptyDiagramXml;null!=l.callback?k.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:d,tempUrl:f,libs:e,builtIn:!0,message:l}),"*"):(b(c,g,c!=this.emptyDiagramXml,l.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,
"Network Error!")})}):null,u?mxUtils.bind(this,function(b,c){this.remoteInvoke("searchDiagrams",[b,null],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,c,d){k.postMessage(JSON.stringify({event:"template",docUrl:b,info:c,name:d}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==l.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();
-b&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==l.action){var L=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:L,message:l}),"*");return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var H=null!=l.messageKey?mxResources.get(l.messageKey):
-l.message;null==l.show||l.show?this.spinner.spin(document.body,H):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var M=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,S=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=
+b&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==l.action){var L=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:L,message:l}),"*");return}if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var F=null!=l.messageKey?mxResources.get(l.messageKey):
+l.message;null==l.show||l.show?this.spinner.spin(document.body,F):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var M=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,S=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=
l.format;c.message=l;c.data=b;c.xml=M;k.postMessage(JSON.stringify(c),"*")}),K=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==l.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(M)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);S(b)}),I=l.pageId||(null!=this.pages?l.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=l.xml&&0<l.xml.length&&(d=!0,this.setFileData(M),d=!1);if(null!=
this.pages&&this.currentPage.getId()!=I){for(var T=P.getGlobalVariable,P=this.createTemporaryGraph(P.getStylesheet()),R,O=0;O<this.pages.length;O++)if(this.pages[O].getId()==I){R=this.updatePageRoot(this.pages[O]);break}null==R&&(R=this.currentPage);P.getGlobalVariable=function(b){return"page"==b?R.getName():"pagenumber"==b?1:T.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(R.root)}if(null!=l.layerIds){for(var Y=P.model,aa=Y.getChildCells(Y.getRoot()),p={},O=0;O<l.layerIds.length;O++)p[l.layerIds[O]]=
!0;for(O=0;O<aa.length;O++)Y.setVisible(aa[O],p[aa[O].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){K(b.toDataURL("image/png"))}),l.width,null,l.background,mxUtils.bind(this,function(){K(null)}),null,null,l.scale,l.transparent,l.shadow,null,P,l.border,null,l.grid,l.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==l.format?"1":"0")+(null!=I?"&pageId="+I:"")+(null!=l.layerIds&&0<l.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:l.layerIds})):
-"")+(null!=l.scale?"&scale="+l.scale:"")+"&base64=1&xml="+encodeURIComponent(M))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?S("data:image/png;base64,"+b.getText()):K(null)}),mxUtils.bind(this,function(){K(null)}))}}else{null!=l.xml&&0<l.xml.length&&(d=!0,this.setFileData(l.xml),d=!1);H=this.createLoadMessage("export");H.message=l;if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();H.xml=
-mxUtils.getXml(ga);H.data=this.getFileData(null,null,!0,null,null,null,ga);H.format=l.format}else if("html"==l.format)M=this.editor.getGraphXml(),H.data=this.getHtml(M,this.editor.graph),H.xml=mxUtils.getXml(M),H.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ca=null!=l.background?l.background:this.editor.graph.background;ca==mxConstants.NONE&&(ca=null);H.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);H.format="svg";var ea=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);
-this.spinner.stop();H.data=Editor.createSvgDataUri(b);k.postMessage(JSON.stringify(H),"*")});if("xmlsvg"==l.format)(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))&&this.getEmbeddedSvg(H.xml,this.editor.graph,null,!0,ea,null,null,l.embedImages,ca,l.scale,l.border,l.shadow,l.keepTheme);else if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){this.editor.graph.setEnabled(!1);
-var la=this.editor.graph.getSvg(ca,l.scale,l.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||l.shadow,null,l.keepTheme);(this.editor.graph.shadowVisible||l.shadow)&&this.editor.graph.addSvgShadow(la);this.embedFonts(la,mxUtils.bind(this,function(b){l.embedImages||null==l.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){ea(mxUtils.getXml(b))})):ea(mxUtils.getXml(b))}))}return}k.postMessage(JSON.stringify(H),"*")}return}if("load"==l.action){n=l.toSketch;f=
+"")+(null!=l.scale?"&scale="+l.scale:"")+"&base64=1&xml="+encodeURIComponent(M))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?S("data:image/png;base64,"+b.getText()):K(null)}),mxUtils.bind(this,function(){K(null)}))}}else{null!=l.xml&&0<l.xml.length&&(d=!0,this.setFileData(l.xml),d=!1);F=this.createLoadMessage("export");F.message=l;if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();F.xml=
+mxUtils.getXml(ga);F.data=this.getFileData(null,null,!0,null,null,null,ga);F.format=l.format}else if("html"==l.format)M=this.editor.getGraphXml(),F.data=this.getHtml(M,this.editor.graph),F.xml=mxUtils.getXml(M),F.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ca=null!=l.background?l.background:this.editor.graph.background;ca==mxConstants.NONE&&(ca=null);F.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);F.format="svg";var ea=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);
+this.spinner.stop();F.data=Editor.createSvgDataUri(b);k.postMessage(JSON.stringify(F),"*")});if("xmlsvg"==l.format)(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))&&this.getEmbeddedSvg(F.xml,this.editor.graph,null,!0,ea,null,null,l.embedImages,ca,l.scale,l.border,l.shadow,l.keepTheme);else if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){this.editor.graph.setEnabled(!1);
+var la=this.editor.graph.getSvg(ca,l.scale,l.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||l.shadow,null,l.keepTheme);(this.editor.graph.shadowVisible||l.shadow)&&this.editor.graph.addSvgShadow(la);this.embedFonts(la,mxUtils.bind(this,function(b){l.embedImages||null==l.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){ea(mxUtils.getXml(b))})):ea(mxUtils.getXml(b))}))}return}k.postMessage(JSON.stringify(F),"*")}return}if("load"==l.action){m=l.toSketch;f=
1==l.autosave;this.hideDialog();null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified);null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit);null!=l.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=l.noSaveBtn);null!=l.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=l.noExitBtn);null!=l.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
"12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"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(q),this.embedFilenameSpan=q);try{l.libs&&this.sidebar.showEntries(l.libs)}catch(N){}l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):
-null!=l.descriptor?l.descriptor:l.xml}else{if("merge"==l.action){var W=this.getCurrentFile();null!=W&&(q=m(l.xml),null!=q&&""!=q&&W.mergeFile(new LocalFile(this,q),function(){k.postMessage(JSON.stringify({event:"merge",message:l}),"*")},function(b){k.postMessage(JSON.stringify({event:"merge",message:l,error:b}),"*")}))}else"remoteInvokeReady"==l.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==l.action?this.handleRemoteInvoke(l,g.origin):"remoteInvokeResponse"==l.action?this.handleRemoteInvokeResponse(l):
-k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}catch(N){this.handleError(N)}}var fa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),X=mxUtils.bind(this,function(g,l){d=!0;try{b(g,l,null,n)}catch(ba){this.handleError(ba)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");e=fa();f&&null==c&&(c=mxUtils.bind(this,function(b,c){var f=fa();if(f!=
+null!=l.descriptor?l.descriptor:l.xml}else{if("merge"==l.action){var W=this.getCurrentFile();null!=W&&(q=n(l.xml),null!=q&&""!=q&&W.mergeFile(new LocalFile(this,q),function(){k.postMessage(JSON.stringify({event:"merge",message:l}),"*")},function(b){k.postMessage(JSON.stringify({event:"merge",message:l,error:b}),"*")}))}else"remoteInvokeReady"==l.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==l.action?this.handleRemoteInvoke(l,g.origin):"remoteInvokeResponse"==l.action?this.handleRemoteInvokeResponse(l):
+k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(l)}),"*");return}}catch(N){this.handleError(N)}}var fa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),X=mxUtils.bind(this,function(g,l){d=!0;try{b(g,l,null,m)}catch(ba){this.handleError(ba)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");e=fa();f&&null==c&&(c=mxUtils.bind(this,function(b,c){var f=fa();if(f!=
e&&!d){var g=this.createLoadMessage("autosave");g.xml=f;(window.opener||window.parent).postMessage(JSON.stringify(g),"*")}e=f}),this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),
-this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",c),this.addListener("pageViewChanged",c));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var m=this.createLoadMessage("load");m.xml=g;k.postMessage(JSON.stringify(m),"*")}});null!=l&&"function"===typeof l.substring&&"data:application/vnd.visio;base64,"==l.substring(0,34)?(m="0M8R4KGxGuE"==l.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(l.substring(l.indexOf(",")+
-1)),function(b){X(b,g)},mxUtils.bind(this,function(b){this.handleError(b)}),m)):null!=l&&"function"===typeof l.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,"")?this.parseFile(new Blob([l],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&X(b.responseText,g)}),""):null!=l&&"function"===typeof l.substring&&this.isLucidChartData(l)?this.convertLucidChart(l,
-mxUtils.bind(this,function(b){X(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==l||"object"!==typeof l||null==l.format||null==l.data&&null==l.url?(l=m(l),X(l,g)):this.loadDescriptor(l,mxUtils.bind(this,function(b){X(fa(),g)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(g,"*");if("json"==urlParams.proto){var n=
-this.editor.graph.openLink;this.editor.graph.openLink=function(b,c,d){n.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:b,target:c,allowOpener:d}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";
+this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",c),this.addListener("pageViewChanged",c));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var n=this.createLoadMessage("load");n.xml=g;k.postMessage(JSON.stringify(n),"*")}});null!=l&&"function"===typeof l.substring&&"data:application/vnd.visio;base64,"==l.substring(0,34)?(n="0M8R4KGxGuE"==l.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(l.substring(l.indexOf(",")+
+1)),function(b){X(b,g)},mxUtils.bind(this,function(b){this.handleError(b)}),n)):null!=l&&"function"===typeof l.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,"")?this.parseFile(new Blob([l],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&X(b.responseText,g)}),""):null!=l&&"function"===typeof l.substring&&this.isLucidChartData(l)?this.convertLucidChart(l,
+mxUtils.bind(this,function(b){X(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==l||"object"!==typeof l||null==l.format||null==l.data&&null==l.url?(l=n(l),X(l,g)):this.loadDescriptor(l,mxUtils.bind(this,function(b){X(fa(),g)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(g,"*");if("json"==urlParams.proto){var m=
+this.editor.graph.openLink;this.editor.graph.openLink=function(b,c,d){m.apply(this,arguments);k.postMessage(JSON.stringify({event:"openLink",href:b,target:c,allowOpener:d}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var c=document.createElement("button");c.className="geBigButton";
var d=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var e="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,e);c.setAttribute("title",e);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else 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()})),
b.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()})),b.appendChild(c),d=c);"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
mxUtils.write(c,d),c.setAttribute("title",d),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),d=c);d.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.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(b){this.importCsv(b)}),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(b,c){for(var d=this.editor.graph,f=d.getSelectionCells(),e=0;e<b.length;e++){var g=new window[b[e].layout](d);
-if(null!=b[e].config)for(var l in b[e].config)g[l]=b[e].config[l];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==f.length?null:f)},e==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),f=[],e=[],g={};if(0<d.length){var l={},k=null,n=null,A=null,z=null,y=null,B=null,C=null,D=null,E=null,G="",F="auto",J="auto",L=null,H=null,M=40,P=40,S=100,K=0,I=this.editor.graph;I.getGraphBounds();for(var T=function(){null!=c?c(ia):(I.setSelectionCells(ia),I.scrollCellToVisible(I.getSelectionCell()))},
-R=I.getFreeInsertPoint(),O=R.x,Y=R.y,R=Y,aa=null,ga="auto",E=null,ca=[],ea=null,la=null,W=0;W<d.length&&"#"==d[W].charAt(0);){b=d[W];for(W++;W<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[W].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[W].substring(1)),W++;if("#"!=b.charAt(1)){var fa=b.indexOf(":");if(0<fa){var X=mxUtils.trim(b.substring(1,fa)),N=mxUtils.trim(b.substring(fa+1));"label"==X?aa=I.sanitizeHtml(N):"labelname"==X&&0<N.length&&"-"!=N?y=N:"labels"==X&&0<N.length&&"-"!=N?B=JSON.parse(N):
-"style"==X?n=N:"parentstyle"==X?C=N:"stylename"==X&&0<N.length&&"-"!=N?z=N:"styles"==X&&0<N.length&&"-"!=N?A=JSON.parse(N):"vars"==X&&0<N.length&&"-"!=N?k=JSON.parse(N):"identity"==X&&0<N.length&&"-"!=N?D=N:"parent"==X&&0<N.length&&"-"!=N?E=N:"namespace"==X&&0<N.length&&"-"!=N?G=N:"width"==X?F=N:"height"==X?J=N:"left"==X&&0<N.length?L=N:"top"==X&&0<N.length?H=N:"ignore"==X?la=N.split(","):"connect"==X?ca.push(JSON.parse(N)):"link"==X?ea=N:"padding"==X?K=parseFloat(N):"edgespacing"==X?M=parseFloat(N):
-"nodespacing"==X?P=parseFloat(N):"levelspacing"==X?S=parseFloat(N):"layout"==X&&(ga=N)}}}if(null==d[W])throw Error(mxResources.get("invalidOrMissingFile"));for(var ma=this.editor.csvToArray(d[W]),X=fa=null,N=[],Q=0;Q<ma.length;Q++)D==ma[Q]&&(fa=Q),E==ma[Q]&&(X=Q),N.push(mxUtils.trim(ma[Q]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==aa&&(aa="%"+N[0]+"%");if(null!=ca)for(var ba=0;ba<ca.length;ba++)null==l[ca[ba].to]&&(l[ca[ba].to]={});D=[];for(Q=W+1;Q<d.length;Q++){var oa=
-this.editor.csvToArray(d[Q]);if(null==oa){var ka=40<d[Q].length?d[Q].substring(0,40)+"...":d[Q];throw Error(ka+" ("+Q+"):\n"+mxResources.get("containsValidationErrors"));}0<oa.length&&D.push(oa)}I.model.beginUpdate();try{for(Q=0;Q<D.length;Q++){var oa=D[Q],V=null,na=null!=fa?G+oa[fa]:null;null!=na&&(V=I.model.getCell(na));var d=null!=V,Z=new mxCell(aa,new mxGeometry(O,R,0,0),n||"whiteSpace=wrap;html=1;");Z.vertex=!0;Z.id=na;for(var ha=0;ha<oa.length;ha++)I.setAttributeForCell(Z,N[ha],oa[ha]);if(null!=
+if(null!=b[e].config)for(var l in b[e].config)g[l]=b[e].config[l];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==f.length?null:f)},e==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),f=[],e=[],g={};if(0<d.length){var l={},k=null,m=null,A=null,z=null,y=null,B=null,C=null,D=null,G=null,H="",E="auto",J="auto",L=null,F=null,M=40,P=40,S=100,K=0,I=this.editor.graph;I.getGraphBounds();for(var T=function(){null!=c?c(ia):(I.setSelectionCells(ia),I.scrollCellToVisible(I.getSelectionCell()))},
+R=I.getFreeInsertPoint(),O=R.x,Y=R.y,R=Y,aa=null,ga="auto",G=null,ca=[],ea=null,la=null,W=0;W<d.length&&"#"==d[W].charAt(0);){b=d[W];for(W++;W<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[W].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[W].substring(1)),W++;if("#"!=b.charAt(1)){var fa=b.indexOf(":");if(0<fa){var X=mxUtils.trim(b.substring(1,fa)),N=mxUtils.trim(b.substring(fa+1));"label"==X?aa=I.sanitizeHtml(N):"labelname"==X&&0<N.length&&"-"!=N?y=N:"labels"==X&&0<N.length&&"-"!=N?B=JSON.parse(N):
+"style"==X?m=N:"parentstyle"==X?C=N:"stylename"==X&&0<N.length&&"-"!=N?z=N:"styles"==X&&0<N.length&&"-"!=N?A=JSON.parse(N):"vars"==X&&0<N.length&&"-"!=N?k=JSON.parse(N):"identity"==X&&0<N.length&&"-"!=N?D=N:"parent"==X&&0<N.length&&"-"!=N?G=N:"namespace"==X&&0<N.length&&"-"!=N?H=N:"width"==X?E=N:"height"==X?J=N:"left"==X&&0<N.length?L=N:"top"==X&&0<N.length?F=N:"ignore"==X?la=N.split(","):"connect"==X?ca.push(JSON.parse(N)):"link"==X?ea=N:"padding"==X?K=parseFloat(N):"edgespacing"==X?M=parseFloat(N):
+"nodespacing"==X?P=parseFloat(N):"levelspacing"==X?S=parseFloat(N):"layout"==X&&(ga=N)}}}if(null==d[W])throw Error(mxResources.get("invalidOrMissingFile"));for(var ma=this.editor.csvToArray(d[W]),X=fa=null,N=[],Q=0;Q<ma.length;Q++)D==ma[Q]&&(fa=Q),G==ma[Q]&&(X=Q),N.push(mxUtils.trim(ma[Q]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==aa&&(aa="%"+N[0]+"%");if(null!=ca)for(var ba=0;ba<ca.length;ba++)null==l[ca[ba].to]&&(l[ca[ba].to]={});D=[];for(Q=W+1;Q<d.length;Q++){var oa=
+this.editor.csvToArray(d[Q]);if(null==oa){var ka=40<d[Q].length?d[Q].substring(0,40)+"...":d[Q];throw Error(ka+" ("+Q+"):\n"+mxResources.get("containsValidationErrors"));}0<oa.length&&D.push(oa)}I.model.beginUpdate();try{for(Q=0;Q<D.length;Q++){var oa=D[Q],V=null,na=null!=fa?H+oa[fa]:null;null!=na&&(V=I.model.getCell(na));var d=null!=V,Z=new mxCell(aa,new mxGeometry(O,R,0,0),m||"whiteSpace=wrap;html=1;");Z.vertex=!0;Z.id=na;for(var ha=0;ha<oa.length;ha++)I.setAttributeForCell(Z,N[ha],oa[ha]);if(null!=
y&&null!=B){var U=B[Z.getAttribute(y)];null!=U&&I.labelChanged(Z,U)}if(null!=z&&null!=A){var da=A[Z.getAttribute(z)];null!=da&&(Z.style=da)}I.setAttributeForCell(Z,"placeholders","1");Z.style=I.replacePlaceholders(Z,Z.style,k);d&&(I.model.setGeometry(V,Z.geometry),I.model.setStyle(V,Z.style),0>mxUtils.indexOf(e,V)&&e.push(V));V=Z;if(!d)for(ba=0;ba<ca.length;ba++)l[ca[ba].to][V.getAttribute(ca[ba].to)]=V;null!=ea&&"link"!=ea&&(I.setLinkForCell(V,V.getAttribute(ea)),I.setAttributeForCell(V,ea,null));
-I.fireEvent(new mxEventObject("cellsInserted","cells",[V]));var ua=this.editor.graph.getPreferredSizeForCell(V);V.vertex&&(null!=L&&null!=V.getAttribute(L)&&(V.geometry.x=O+parseFloat(V.getAttribute(L))),null!=H&&null!=V.getAttribute(H)&&(V.geometry.y=Y+parseFloat(V.getAttribute(H))),"@"==F.charAt(0)&&null!=V.getAttribute(F.substring(1))?V.geometry.width=parseFloat(V.getAttribute(F.substring(1))):V.geometry.width="auto"==F?ua.width+K:parseFloat(F),"@"==J.charAt(0)&&null!=V.getAttribute(J.substring(1))?
-V.geometry.height=parseFloat(V.getAttribute(J.substring(1))):V.geometry.height="auto"==J?ua.height+K:parseFloat(J),R+=V.geometry.height+P);d?(null==g[na]&&(g[na]=[]),g[na].push(V)):(E=null!=X?I.model.getCell(G+oa[X]):null,f.push(V),null!=E?(E.style=I.replacePlaceholders(E,C,k),I.addCell(V,E)):e.push(I.addCell(V)))}for(var ja=e.slice(),ia=e.slice(),ba=0;ba<ca.length;ba++)for(var pa=ca[ba],Q=0;Q<f.length;Q++){var V=f[Q],wa=mxUtils.bind(this,function(b,c,d){var f=c.getAttribute(d.from);if(null!=f&&(I.setAttributeForCell(c,
-d.from,null),""!=f))for(var f=f.split(","),e=0;e<f.length;e++){var g=l[d.to][f[e]];if(null!=g){var m=d.label;null!=d.fromlabel&&(m=(c.getAttribute(d.fromlabel)||"")+(m||""));null!=d.sourcelabel&&(m=I.replacePlaceholders(c,d.sourcelabel,k)+(m||""));null!=d.tolabel&&(m=(m||"")+(g.getAttribute(d.tolabel)||""));null!=d.targetlabel&&(m=(m||"")+I.replacePlaceholders(g,d.targetlabel,k));var n="target"==d.placeholders==!d.invert?g:b,n=null!=d.style?I.replacePlaceholders(n,d.style,k):I.createCurrentEdgeStyle(),
-m=I.insertEdge(null,null,m||"",d.invert?g:b,d.invert?b:g,n);if(null!=d.labels)for(n=0;n<d.labels.length;n++){var p=d.labels[n],y=new mxCell(p.label||n,new mxGeometry(null!=p.x?p.x:0,null!=p.y?p.y:0,0,0),"resizable=0;html=1;");y.vertex=!0;y.connectable=!1;y.geometry.relative=!0;null!=p.placeholders&&(y.value=I.replacePlaceholders("target"==p.placeholders==!d.invert?g:b,y.value,k));if(null!=p.dx||null!=p.dy)y.geometry.offset=new mxPoint(null!=p.dx?p.dx:0,null!=p.dy?p.dy:0);m.insert(y)}ia.push(m);mxUtils.remove(d.invert?
-b:g,ja)}}});wa(V,V,pa);if(null!=g[V.id])for(ha=0;ha<g[V.id].length;ha++)wa(V,g[V.id][ha],pa)}if(null!=la)for(Q=0;Q<f.length;Q++)for(V=f[Q],ha=0;ha<la.length;ha++)I.setAttributeForCell(V,mxUtils.trim(la[ha]),null);if(0<e.length){var ra=new mxParallelEdgeLayout(I);ra.spacing=M;ra.checkOverlap=!0;var qa=function(){0<ra.spacing&&ra.execute(I.getDefaultParent());for(var b=0;b<e.length;b++){var c=I.getCellGeometry(e[b]);c.x=Math.round(I.snap(c.x));c.y=Math.round(I.snap(c.y));"auto"==F&&(c.width=Math.round(I.snap(c.width)));
+I.fireEvent(new mxEventObject("cellsInserted","cells",[V]));var ua=this.editor.graph.getPreferredSizeForCell(V);V.vertex&&(null!=L&&null!=V.getAttribute(L)&&(V.geometry.x=O+parseFloat(V.getAttribute(L))),null!=F&&null!=V.getAttribute(F)&&(V.geometry.y=Y+parseFloat(V.getAttribute(F))),"@"==E.charAt(0)&&null!=V.getAttribute(E.substring(1))?V.geometry.width=parseFloat(V.getAttribute(E.substring(1))):V.geometry.width="auto"==E?ua.width+K:parseFloat(E),"@"==J.charAt(0)&&null!=V.getAttribute(J.substring(1))?
+V.geometry.height=parseFloat(V.getAttribute(J.substring(1))):V.geometry.height="auto"==J?ua.height+K:parseFloat(J),R+=V.geometry.height+P);d?(null==g[na]&&(g[na]=[]),g[na].push(V)):(G=null!=X?I.model.getCell(H+oa[X]):null,f.push(V),null!=G?(G.style=I.replacePlaceholders(G,C,k),I.addCell(V,G)):e.push(I.addCell(V)))}for(var ja=e.slice(),ia=e.slice(),ba=0;ba<ca.length;ba++)for(var pa=ca[ba],Q=0;Q<f.length;Q++){var V=f[Q],wa=mxUtils.bind(this,function(b,c,d){var f=c.getAttribute(d.from);if(null!=f&&(I.setAttributeForCell(c,
+d.from,null),""!=f))for(var f=f.split(","),e=0;e<f.length;e++){var g=l[d.to][f[e]];if(null!=g){var n=d.label;null!=d.fromlabel&&(n=(c.getAttribute(d.fromlabel)||"")+(n||""));null!=d.sourcelabel&&(n=I.replacePlaceholders(c,d.sourcelabel,k)+(n||""));null!=d.tolabel&&(n=(n||"")+(g.getAttribute(d.tolabel)||""));null!=d.targetlabel&&(n=(n||"")+I.replacePlaceholders(g,d.targetlabel,k));var m="target"==d.placeholders==!d.invert?g:b,m=null!=d.style?I.replacePlaceholders(m,d.style,k):I.createCurrentEdgeStyle(),
+n=I.insertEdge(null,null,n||"",d.invert?g:b,d.invert?b:g,m);if(null!=d.labels)for(m=0;m<d.labels.length;m++){var p=d.labels[m],y=new mxCell(p.label||m,new mxGeometry(null!=p.x?p.x:0,null!=p.y?p.y:0,0,0),"resizable=0;html=1;");y.vertex=!0;y.connectable=!1;y.geometry.relative=!0;null!=p.placeholders&&(y.value=I.replacePlaceholders("target"==p.placeholders==!d.invert?g:b,y.value,k));if(null!=p.dx||null!=p.dy)y.geometry.offset=new mxPoint(null!=p.dx?p.dx:0,null!=p.dy?p.dy:0);n.insert(y)}ia.push(n);mxUtils.remove(d.invert?
+b:g,ja)}}});wa(V,V,pa);if(null!=g[V.id])for(ha=0;ha<g[V.id].length;ha++)wa(V,g[V.id][ha],pa)}if(null!=la)for(Q=0;Q<f.length;Q++)for(V=f[Q],ha=0;ha<la.length;ha++)I.setAttributeForCell(V,mxUtils.trim(la[ha]),null);if(0<e.length){var ra=new mxParallelEdgeLayout(I);ra.spacing=M;ra.checkOverlap=!0;var qa=function(){0<ra.spacing&&ra.execute(I.getDefaultParent());for(var b=0;b<e.length;b++){var c=I.getCellGeometry(e[b]);c.x=Math.round(I.snap(c.x));c.y=Math.round(I.snap(c.y));"auto"==E&&(c.width=Math.round(I.snap(c.width)));
"auto"==J&&(c.height=Math.round(I.snap(c.height)))}};if("["==ga.charAt(0)){var ya=T;I.view.validate();this.executeLayoutList(JSON.parse(ga),function(){qa();ya()});T=null}else if("circle"==ga){var va=new mxCircleLayout(I);va.disableEdgeStyle=!1;va.resetEdges=!1;var za=va.isVertexIgnored;va.isVertexIgnored=function(b){return za.apply(this,arguments)||0>mxUtils.indexOf(e,b)};this.executeLayout(function(){va.execute(I.getDefaultParent());qa()},!0,T);T=null}else if("horizontaltree"==ga||"verticaltree"==
ga||"auto"==ga&&ia.length==2*e.length-1&&1==ja.length){I.view.validate();var xa=new mxCompactTreeLayout(I,"horizontaltree"==ga);xa.levelDistance=P;xa.edgeRouting=!1;xa.resetEdges=!1;this.executeLayout(function(){xa.execute(I.getDefaultParent(),0<ja.length?ja[0]:null)},!0,T);T=null}else if("horizontalflow"==ga||"verticalflow"==ga||"auto"==ga&&1==ja.length){I.view.validate();var sa=new mxHierarchicalLayout(I,"horizontalflow"==ga?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);sa.intraCellSpacing=
P;sa.parallelEdgeSpacing=M;sa.interRankCellSpacing=S;sa.disableEdgeStyle=!1;this.executeLayout(function(){sa.execute(I.getDefaultParent(),ia);I.moveCells(ia,O,Y)},!0,T);T=null}else if("organic"==ga||"auto"==ga&&ia.length>e.length){I.view.validate();var ta=new mxFastOrganicLayout(I);ta.forceConstant=3*P;ta.disableEdgeStyle=!1;ta.resetEdges=!1;var Ba=ta.isVertexIgnored;ta.isVertexIgnored=function(b){return Ba.apply(this,arguments)||0>mxUtils.indexOf(e,b)};this.executeLayout(function(){ta.execute(I.getDefaultParent());
@@ -10898,92 +10902,92 @@ if("1"==urlParams.offline)b+=window.location.search;else{var d="tmp libs clibs s
this.menus.get("viewZoom").setEnabled(c);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.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));
b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.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()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);this.menus.get("arrange").setEnabled(b);
null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();return null!=b&&b.isEditable()||
-"1"==urlParams.embed&&this.editor.graph.isEnabled()};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),d=this.isDiagramActive(),e=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(d);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(d);this.actions.get("editData").setEnabled(0<
+"1"==urlParams.embed&&this.editor.graph.isEnabled()};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),d=this.isDiagramActive(),e=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(d);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(d);this.actions.get("editData").setEnabled(0<
e.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(d);this.actions.get("connectionArrows").setEnabled(d);this.actions.get("connectionPoints").setEnabled(d);this.actions.get("copyStyle").setEnabled(d&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(d&&0<e.length);this.actions.get("editGeometry").setEnabled(0<e.length&&b.getModel().isVertex(e[0]));this.actions.get("createShape").setEnabled(d);this.actions.get("createRevision").setEnabled(d);this.actions.get("moveToFolder").setEnabled(null!=
c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(d&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=
-c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(d&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var n=EditorUi.prototype.destroy;
-EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);n.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,d,e,g,k,n,v){var f=b.editor.graph;if("xml"==d)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==d)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(f.getSvg(e,
-g,k)),"image/svg+xml");else{var l=b.getFileData(!0,null,null,null,null,!0),m=f.getGraphBounds(),p=Math.floor(m.width*g/f.view.scale),q=Math.floor(m.height*g/f.view.scale);if(l.length<=MAX_REQUEST_SIZE&&p*q<MAX_AREA)if(b.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!b.isExportToCanvas()){var t={globalVars:f.getExportVariables()};v&&(t.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});b.saveRequest(c,d,function(b,c){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(c||"0")+
-(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(0<n?"&dpi="+n:"")+"&bg="+(null!=e?e:"none")+"&w="+p+"&h="+q+"&border="+k+"&xml="+encodeURIComponent(l))})}else"png"==d?b.exportImage(g,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,v,n):b.exportImage(g,!1,!0,!1,!1,k,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=
+c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(d&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var m=EditorUi.prototype.destroy;
+EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);m.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,d,e,g,k,m,v){var f=b.editor.graph;if("xml"==d)b.hideDialog(),b.saveData(c,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==d)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(f.getSvg(e,
+g,k)),"image/svg+xml");else{var l=b.getFileData(!0,null,null,null,null,!0),n=f.getGraphBounds(),p=Math.floor(n.width*g/f.view.scale),q=Math.floor(n.height*g/f.view.scale);if(l.length<=MAX_REQUEST_SIZE&&p*q<MAX_AREA)if(b.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!b.isExportToCanvas()){var t={globalVars:f.getExportVariables()};v&&(t.grid={size:f.gridSize,steps:f.view.gridSteps,color:f.view.gridColor});b.saveRequest(c,d,function(b,c){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(c||"0")+
+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(t))+(0<m?"&dpi="+m:"")+"&bg="+(null!=e?e:"none")+"&w="+p+"&h="+q+"&border="+k+"&xml="+encodeURIComponent(l))})}else"png"==d?b.exportImage(g,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,v,m):b.exportImage(g,!1,!0,!1,!1,k,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=
this.pages)for(var d=0;d<this.pages.length;d++){var e=b;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[d]),e.model.setRoot(this.pages[d].root));c+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=function(b){var c={},d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,
-mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(e);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="'+IMAGE_PATH+'/spin.gif"></div>';var g={};try{var k=mxSettings.getCustomLibraries();for(b=0;b<k.length;b++){var n=k[b];if("R"==n.substring(0,1)){var x=JSON.parse(decodeURIComponent(n.substring(1)));g[x[0]]=
+mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(e);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="'+IMAGE_PATH+'/spin.gif"></div>';var g={};try{var k=mxSettings.getCustomLibraries();for(b=0;b<k.length;b++){var m=k[b];if("R"==m.substring(0,1)){var x=JSON.parse(decodeURIComponent(m.substring(1)));g[x[0]]=
{id:x[0],title:x[1],downloadUrl:x[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",null,null,function(b){f.innerHTML="";if(0==b.length)f.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var d=0;d<b.length;d++){var e=b[d];g[e.id]&&(c[e.id]=e);var k=this.addCheckbox(f,e.title,g[e.id]);(function(b,d){mxEvent.addListener(d,"change",function(){this.checked?c[b.id]=b:delete c[b.id]})})(e,k)}},mxUtils.bind(this,
function(b){f.innerHTML="";var c=document.createElement("div");c.style.padding="8px";c.style.textAlign="center";mxUtils.write(c,mxResources.get("error")+": ");mxUtils.write(c,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));f.appendChild(c)}));d.appendChild(f);d=new CustomDialog(this,d,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var b=0,d;for(d in c)null==g[d]&&(b++,mxUtils.bind(this,function(c){this.remoteInvoke("getFileContent",[c.downloadUrl],
null,mxUtils.bind(this,function(d){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,d,c))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(c[d]));for(d in g)c[d]||this.closeLibrary(new RemoteLibrary(this,null,g[d]));0==b&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(d.container,
340,390,!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(b){this.remoteWin=b;for(var c=0;c<this.remoteInvokeQueue.length;c++)b.postMessage(this.remoteInvokeQueue[c],
"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(b){var c=b.msgMarkers,d=this.remoteInvokeCallbacks[c.callbackId];if(null==d)throw Error("No callback for "+(null!=c?c.callbackId:"null"));b.error?d.error&&d.error(b.error.errResp):d.callback&&d.callback.apply(this,b.resp);this.remoteInvokeCallbacks[c.callbackId]=null};EditorUi.prototype.remoteInvoke=function(b,c,d,e,g){var f=!0,k=window.setTimeout(mxUtils.bind(this,function(){f=!1;g({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
-this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(k);f&&e.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(k);f&&g.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,error:m});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,
+this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(k);f&&e.apply(this,arguments)}),n=mxUtils.bind(this,function(){window.clearTimeout(k);f&&g.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,error:n});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,
c){var d=mxUtils.bind(this,function(c,d){var e={event:"remoteInvokeResponse",msgMarkers:b.msgMarkers};null!=d?e.error={errResp:d}:null!=c&&(e.resp=c);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=b.funtionName,f=this.remoteInvokableFns[e];if(null!=f&&"function"===typeof this[e]){if(f.allowedDomains){for(var g=!1,k=0;k<f.allowedDomains.length;k++)if(c=="https://"+f.allowedDomains[k]){g=!0;break}if(!g){d(null,"Invalid Call: "+e+" is not allowed.");return}}var l=b.functionArgs;Array.isArray(l)||
-(l=[]);if(f.isAsync)l.push(function(){d(Array.prototype.slice.apply(arguments))}),l.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,l);else{var n=this[e].apply(this,l);d([n])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(A){d(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=
+(l=[]);if(f.isAsync)l.push(function(){d(Array.prototype.slice.apply(arguments))}),l.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,l);else{var m=this[e].apply(this,l);d([m])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(A){d(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=
function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=c&&c(u)}};e.onsuccess=mxUtils.bind(this,function(c){var d=e.result;this.database=d;EditorUi.migrateStorageFiles&&(StorageFile.migrate(d),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(b){if(!b||"1"==urlParams.forceMigration){var c=document.createElement("iframe");c.style.display="none";c.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(c);var d=!0,e=!1,f,g=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(F){console.log(F)}}),n=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,
-size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(F){console.log(F)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(J){}"init"==g.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||
+funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null==d||".scratchpad"==b&&d==this.emptyLibraryXml?c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(E){console.log(E)}}),n=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,
+size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(E){console.log(E)}});b=mxUtils.bind(this,function(b){try{if(b.source==c.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(J){}"init"==g.event?(c.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),c.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||
(d?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],d=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?n(g.resp[0]):l())}}catch(J){console.log(J)}});window.addEventListener("message",b)}})));b(d);d.onversionchange=function(){d.close()}});e.onerror=c;e.onblocked=function(){}}catch(q){null!=c&&c(q)}else null!=c&&c()}else b(this.database)};EditorUi.prototype.setDatabaseItem=function(b,c,d,e,g){this.openDatabase(mxUtils.bind(this,function(f){try{g=g||"objects";Array.isArray(g)||(g=
[g],b=[b],c=[c]);var k=f.transaction(g,"readwrite");k.oncomplete=d;k.onerror=e;for(f=0;f<g.length;f++)k.objectStore(g[f]).put(null!=b&&null!=b[f]?{key:b[f],data:c[f]}:c[f])}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.removeDatabaseItem=function(b,c,d,e){this.openDatabase(mxUtils.bind(this,function(f){e=e||"objects";Array.isArray(e)||(e=[e],b=[b]);f=f.transaction(e,"readwrite");f.oncomplete=c;f.onerror=d;for(var g=0;g<e.length;g++)f.objectStore(e[g])["delete"](b[g])}),d)};EditorUi.prototype.getDatabaseItem=
function(b,c,d,e){this.openDatabase(mxUtils.bind(this,function(f){try{e=e||"objects";var g=f.transaction([e],"readonly").objectStore(e).get(b);g.onsuccess=function(){c(g.result)};g.onerror=d}catch(u){null!=d&&d(u)}}),d)};EditorUi.prototype.getDatabaseItems=function(b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(c){null==c.target.result?b(g):(g.push(c.target.result.value),
c.target.result["continue"]())};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).getAllKeys();f.onsuccess=function(){b(f.result)};f.onerror=c}catch(t){null!=c&&c(t)}}),c)};EditorUi.prototype.commentsSupported=function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=
this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();null!=d?d.getComments(b,c):b([])};EditorUi.prototype.addComment=function(b,c,d){var e=this.getCurrentFile();null!=e?e.addComment(b,c,d):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var b=this.getCurrentFile();return null!=b?
b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=
-d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,d,e,g,k,n,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(b,c,d,e,g,k,n,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,d,e,g,k,n,v,x,A,z,y,B,C,D,E){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,d,e,g,k,n,v,x,A,z,y,B,C,D,E)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,d,e,g,k,m,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
+return this.editor.loadUrl(b,c,d,e,g,k,m,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
+return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,d,e,g,k,m,v,x,A,z,y,B,C,D,G){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,d,e,g,k,m,v,x,A,z,y,B,C,D,G)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
return this.editor.convertImages(b,c,d,e)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=function(b,c,d,e){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,d,e)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,d,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,c,d,e,g)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var d=localStorage.key(c),e=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<e.length){var g=
"<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(g||e)&&b.push(d)}}return b};EditorUi.prototype.getLocalStorageFile=function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,d,c,g,k){function n(){for(var b=y.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==y&&c++;B.style.display=0==c?"block":"none"}function f(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}x={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
-"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),n()):f();x=null});p.className="geCommentEditBtn";m.appendChild(p);var y=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);x=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
-function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(y.click(),mxEvent.consume(b)):27==b.keyCode&&(p.click(),mxEvent.consume(b)))}));y.focus();y.className="geCommentEditBtn gePrimaryBtn";m.appendChild(y);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function l(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
-[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function m(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function p(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function q(b){b.style.border="";b.removeChild(b.busyImg)}function t(c,d,e,g,k){function F(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
-"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});G.appendChild(f);e&&(f.style.display="none")}function C(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=D;b(c);return{pdiv:e,replies:d}}function M(d,e,k,l,n){function y(){m(F);c.addReply(v,function(b){v.id=b;c.replies.push(v);q(F);k&&k()},function(c){B();p(F);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},l,n)}function B(){f(v,F,function(b){y()},!0)}var u=C().pdiv,v=b.newComment(d,b.getCurrentUser());v.pCommentId=c.id;null==c.replies&&(c.replies=[]);var F=t(v,c.replies,u,g+1);e?B():y()}if(k||!c.isResolved){B.style.display="none";var D=document.createElement("div");D.className="geCommentContainer";D.setAttribute("data-commentId",c.id);D.style.marginLeft=20*g+5+"px";c.isResolved&&!Editor.isDarkMode()&&(D.style.backgroundColor="ghostWhite");
-var z=document.createElement("div");z.className="geCommentHeader";var A=document.createElement("img");A.className="geCommentUserImg";A.src=c.user.pictureUrl||Editor.userImage;z.appendChild(A);A=document.createElement("div");A.className="geCommentHeaderTxt";z.appendChild(A);var H=document.createElement("div");H.className="geCommentUsername";mxUtils.write(H,c.user.displayName||"");A.appendChild(H);H=document.createElement("div");H.className="geCommentDate";H.setAttribute("data-commentId",c.id);l(c,
-H);A.appendChild(H);D.appendChild(z);z=document.createElement("div");z.className="geCommentTxt";mxUtils.write(z,c.content||"");D.appendChild(z);c.isLocked&&(D.style.opacity="0.5");z=document.createElement("div");z.className="geCommentActions";var G=document.createElement("ul");G.className="geCommentActionsList";z.appendChild(G);u||c.isLocked||0!=g&&!v||F(mxResources.get("reply"),function(){M("",!0)},c.isResolved);A=b.getCurrentUser();null==A||A.id!=c.user.id||u||c.isLocked||(F(mxResources.get("edit"),
-function(){function d(){f(c,D,function(){m(D);c.editComment(c.content,function(){q(D)},function(c){p(D);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),F(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){m(D);c.deleteComment(function(b){if(!0===b){b=D.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var e=D.querySelectorAll(".geCommentAction");for(b=
-0;b<e.length;b++)e[b].parentNode.removeChild(e[b]);q(D);D.style.opacity="0.5"}else{e=C(c).replies;for(b=0;b<e.length;b++)y.removeChild(e[b]);for(b=0;b<d.length;b++)if(d[b]==c){d.splice(b,1);break}B.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(c){p(D);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=g||F(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
-b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=C(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);E||(f[k].style.display="none")}n()}c.isResolved?M(mxResources.get("reOpened")+": ",!0,
+var CommentsWindow=function(b,e,d,c,k,g){function m(){for(var b=y.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==y&&c++;B.style.display=0==c?"block":"none"}function f(b,c,d,e){function f(){c.removeChild(l);c.removeChild(n);k.style.display="block";g.style.display="block"}x={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var n=document.createElement("div");n.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),m()):f();x=null});p.className="geCommentEditBtn";n.appendChild(p);var y=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);x=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
+function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(y.click(),mxEvent.consume(b)):27==b.keyCode&&(p.click(),mxEvent.consume(b)))}));y.focus();y.className="geCommentEditBtn gePrimaryBtn";n.appendChild(y);c.insertBefore(n,g);k.style.display="none";g.style.display="none";l.focus()}function l(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
+[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function n(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function p(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function q(b){b.style.border="";b.removeChild(b.busyImg)}function t(c,d,e,g,k){function E(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
+"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});H.appendChild(f);e&&(f.style.display="none")}function C(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=D;b(c);return{pdiv:e,replies:d}}function M(d,e,k,l,m){function y(){n(E);c.addReply(v,function(b){v.id=b;c.replies.push(v);q(E);k&&k()},function(c){B();p(E);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},l,m)}function B(){f(v,E,function(b){y()},!0)}var u=C().pdiv,v=b.newComment(d,b.getCurrentUser());v.pCommentId=c.id;null==c.replies&&(c.replies=[]);var E=t(v,c.replies,u,g+1);e?B():y()}if(k||!c.isResolved){B.style.display="none";var D=document.createElement("div");D.className="geCommentContainer";D.setAttribute("data-commentId",c.id);D.style.marginLeft=20*g+5+"px";c.isResolved&&!Editor.isDarkMode()&&(D.style.backgroundColor="ghostWhite");
+var z=document.createElement("div");z.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=c.user.pictureUrl||Editor.userImage;z.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";z.appendChild(F);var A=document.createElement("div");A.className="geCommentUsername";mxUtils.write(A,c.user.displayName||"");F.appendChild(A);A=document.createElement("div");A.className="geCommentDate";A.setAttribute("data-commentId",c.id);l(c,
+A);F.appendChild(A);D.appendChild(z);z=document.createElement("div");z.className="geCommentTxt";mxUtils.write(z,c.content||"");D.appendChild(z);c.isLocked&&(D.style.opacity="0.5");z=document.createElement("div");z.className="geCommentActions";var H=document.createElement("ul");H.className="geCommentActionsList";z.appendChild(H);u||c.isLocked||0!=g&&!v||E(mxResources.get("reply"),function(){M("",!0)},c.isResolved);F=b.getCurrentUser();null==F||F.id!=c.user.id||u||c.isLocked||(E(mxResources.get("edit"),
+function(){function d(){f(c,D,function(){n(D);c.editComment(c.content,function(){q(D)},function(c){p(D);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},c.isResolved),E(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){n(D);c.deleteComment(function(b){if(!0===b){b=D.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var e=D.querySelectorAll(".geCommentAction");for(b=
+0;b<e.length;b++)e[b].parentNode.removeChild(e[b]);q(D);D.style.opacity="0.5"}else{e=C(c).replies;for(b=0;b<e.length;b++)y.removeChild(e[b]);for(b=0;b<d.length;b++)if(d[b]==c){d.splice(b,1);break}B.style.display=0==y.getElementsByTagName("div").length?"block":"none"}},function(c){p(D);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=g||E(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=C(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),n=0;n<l.length;n++)l[n]!=d.parentNode&&(l[n].style.display=e);G||(f[k].style.display="none")}m()}c.isResolved?M(mxResources.get("reOpened")+": ",!0,
d,!1,!0):M(mxResources.get("markedAsResolved"),!1,d,!0)});D.appendChild(z);null!=e?y.insertBefore(D,e.nextSibling):y.appendChild(D);for(e=0;null!=c.replies&&e<c.replies.length;e++)z=c.replies[e],z.isResolved=c.isResolved,t(z,c.replies,null,g+1,k);null!=x&&(x.comment.id==c.id?(k=c.content,c.content=x.comment.content,f(c,D,x.saveCallback,x.deleteOnCancel),c.content=k):null==x.comment.id&&x.comment.pCommentId==c.id&&(y.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel)));return D}}
var u=!b.canComment(),v=b.canReplyToReplies(),x=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var z=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";y.style.bottom=parseInt(z)+7+"px";A.appendChild(y);var B=document.createElement("span");B.style.cssText="display:none;padding-top:10px;text-align:center;";
mxUtils.write(B,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=z;C.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";z=document.createElement("a");z.className="geButton";if(!u){var D=z.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(D,"click",function(c){function d(){f(e,g,function(c){m(g);b.addComment(c,function(b){c.id=b;G.push(c);q(g)},function(c){p(g);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=b.newComment("",b.getCurrentUser()),g=t(e,G,null,0);d();c.preventDefault();mxEvent.consume(c)});C.appendChild(D)}D=z.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));
-var E=!1;Editor.isDarkMode()&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(b){this.className=(E=!E)?"geButton geCheckedBtn":"geButton";F();b.preventDefault();mxEvent.consume(b)});C.appendChild(D);b.commentsRefreshNeeded()&&(D=z.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',D.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(b){F();
-b.preventDefault();mxEvent.consume(b)}),C.appendChild(D));b.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(z.style.filter="invert(100%)"),mxEvent.addListener(z,"click",function(b){k();b.preventDefault();mxEvent.consume(b)}),C.appendChild(z));A.appendChild(C);var G=[],F=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);
+"...");mxEvent.addListener(D,"click",function(c){function d(){f(e,g,function(c){n(g);b.addComment(c,function(b){c.id=b;H.push(c);q(g)},function(c){p(g);d();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var e=b.newComment("",b.getCurrentUser()),g=t(e,H,null,0);d();c.preventDefault();mxEvent.consume(c)});C.appendChild(D)}D=z.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));
+var G=!1;Editor.isDarkMode()&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(b){this.className=(G=!G)?"geButton geCheckedBtn":"geButton";E();b.preventDefault();mxEvent.consume(b)});C.appendChild(D);b.commentsRefreshNeeded()&&(D=z.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',D.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(b){E();
+b.preventDefault();mxEvent.consume(b)}),C.appendChild(D));b.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(z.style.filter="invert(100%)"),mxEvent.addListener(z,"click",function(b){g();b.preventDefault();mxEvent.consume(b)}),C.appendChild(z));A.appendChild(C);var H=[],E=mxUtils.bind(this,function(){this.hasError=!1;if(null!=x)try{x.div=x.div.cloneNode(!0);
var c=x.div.querySelector(".geCommentEditTxtArea"),d=x.div.querySelector(".geCommentEditBtns");x.comment.content=c.value;c.parentNode.removeChild(c);d.parentNode.removeChild(d)}catch(M){b.handleError(M)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
-new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});y.innerHTML="";y.appendChild(B);B.style.display="block";G=b;for(b=0;b<G.length;b++)c(G[b].replies),t(G[b],G,null,0,E);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(y.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(b){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
-": "+b.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});F();this.refreshComments=F;C=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(l(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=y.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var f=c[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<G.length;e++)b(G[e])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=
-new mxWindow(mxResources.get("comments"),A,e,d,c,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
+new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});y.innerHTML="";y.appendChild(B);B.style.display="block";H=b;for(b=0;b<H.length;b++)c(H[b].replies),t(H[b],H,null,0,G);null!=x&&null==x.comment.id&&null==x.comment.pCommentId&&(y.appendChild(x.div),f(x.comment,x.div,x.saveCallback,x.deleteOnCancel))},mxUtils.bind(this,function(b){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+": "+b.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});E();this.refreshComments=E;C=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(l(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=y.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var f=c[e];d[f.getAttribute("data-commentId")]=f}for(e=0;e<H.length;e++)b(H[e])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=
+new mxWindow(mxResources.get("comments"),A,e,d,c,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var J=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",J);this.destroy=function(){mxEvent.removeListener(window,"resize",J);this.window.destroy()}},ConfirmDialog=function(b,e,d,
-c,g,k,n,f,l,m,p){var q=document.createElement("div");q.style.textAlign="center";p=null!=p?p:44;var t=document.createElement("div");t.style.padding="6px";t.style.overflow="auto";t.style.maxHeight=p+"px";t.style.lineHeight="1.2em";mxUtils.write(t,e);q.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),q.appendChild(t));m=document.createElement("div");m.style.textAlign="center";m.style.whiteSpace=
-"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");k=mxUtils.button(k||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(u.checked)});k.className="geBtn";null!=f&&(k.innerHTML=f+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");b.editor.cancelFirst&&m.appendChild(k);var v=mxUtils.button(g||mxResources.get("ok"),function(){b.hideDialog();null!=d&&d(u.checked)});m.appendChild(v);null!=n?(v.innerHTML=
-n+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||m.appendChild(k);q.appendChild(m);l?(m.style.marginTop="10px",t=document.createElement("p"),t.style.marginTop="20px",t.style.marginBottom="0px",t.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),t.appendChild(g),q.appendChild(t),mxEvent.addListener(g,
-"click",function(b){u.checked=!u.checked;mxEvent.consume(b)})):m.style.marginTop="12px";this.init=function(){v.focus()};this.container=q};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(b,e,d,c,g){var k={},n=[],f={},l={},m={},p={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var q in c[EditorUi.DIFF_UPDATE])k[q]=c[EditorUi.DIFF_UPDATE][q];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)l[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)f[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(q in e[EditorUi.DIFF_UPDATE])c=
-e[EditorUi.DIFF_UPDATE][q],null!=c.previous&&(p[c.previous]=q);if(null!=b){var t="";for(c=0;c<b.length;c++){var u=b[c].getId();m[u]=b[c];null!=p[t]||l[u]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][u]&&null!=e[EditorUi.DIFF_UPDATE][u].previous||(p[t]=u);t=u}}var v={},x=mxUtils.bind(this,function(b){var c=null!=b?b.getId():"";if(null!=b&&!v[c]){v[c]=!0;n.push(b);var l=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][c]:null;null!=l&&(this.updatePageRoot(b),null!=l.name&&b.setName(l.name),
-null!=l.view&&this.patchViewState(b,l.view),null!=l.cells&&this.patchPage(b,l.cells,k[b.getId()],g),!d||null==l.cells&&null==l.view||(b.needsUpdate=!0))}b=p[c];null!=b&&(delete p[c],x(m[b]));b=f[c];null!=b&&(delete f[c],A(b))}),A=mxUtils.bind(this,function(b){b=mxUtils.parseXml(b.data).documentElement;b=new DiagramPage(b);this.updatePageRoot(b);var c=m[b.getId()];null==c?x(b):(c.root=b.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):d&&(c.needsUpdate=!0))});x();for(q in p)x(m[p[q]]),
-delete p[q];for(q in f)A(f[q]),delete f[q];return n};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var d in e)try{b.viewState[d]=JSON.parse(e[d])}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};
-EditorUi.prototype.createParentLookup=function(b,e){function d(b){var d=c[b];null==d&&(d={inserted:[],moved:{}},c[b]=d);return d}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var g=0;g<e[EditorUi.DIFF_INSERT].length;g++){var k=e[EditorUi.DIFF_INSERT][g],n=null!=k.parent?k.parent:"",f=null!=k.previous?k.previous:"";d(n).inserted[f]=k}if(null!=e[EditorUi.DIFF_UPDATE])for(var l in e[EditorUi.DIFF_UPDATE])k=e[EditorUi.DIFF_UPDATE][l],null!=k.previous&&(n=k.parent,null==n&&(g=b.getCell(l),null!=g&&(g=
-b.getParent(g),null!=g&&(n=g.getId()))),null!=n&&(d(n).moved[k.previous]=l));return c};
-EditorUi.prototype.patchPage=function(b,e,d,c){var g=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),k=this.createParentLookup(g,e);g.beginUpdate();try{var n=g.updateEdgeParent,f=new mxDictionary,l=[];g.updateEdgeParent=function(b,d){!f.get(b)&&c&&(f.put(b,!0),l.push(b))};var m=k[""],p=null!=m&&null!=m.inserted?m.inserted[""]:null,q=null;null!=p&&(q=this.getCellForJson(p));if(null==q){var t=null!=m&&null!=m.moved?m.moved[""]:null;null!=t&&(q=g.getCell(t))}null!=q&&(g.setRoot(q),
-b.root=q);this.patchCellRecursive(b,g,g.root,k,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var u=0;u<e[EditorUi.DIFF_REMOVE].length;u++){var v=g.getCell(e[EditorUi.DIFF_REMOVE][u]);null!=v&&g.remove(v)}if(null!=e[EditorUi.DIFF_UPDATE]){var x=null!=d&&null!=d.cells?d.cells[EditorUi.DIFF_UPDATE]:null;for(t in e[EditorUi.DIFF_UPDATE])this.patchCell(g,g.getCell(t),e[EditorUi.DIFF_UPDATE][t],null!=x?x[t]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(u=0;u<e[EditorUi.DIFF_INSERT].length;u++)p=e[EditorUi.DIFF_INSERT][u],
-v=g.getCell(p.id),null!=v&&(g.setTerminal(v,g.getCell(p.source),!0),g.setTerminal(v,g.getCell(p.target),!1));g.updateEdgeParent=n;if(c&&0<l.length)for(u=0;u<l.length;u++)g.contains(l[u])&&g.updateEdgeParent(l[u])}finally{g.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,e,d,c,g){if(null!=d){for(var k=c[d.getId()],n=null!=k&&null!=k.inserted?k.inserted:{},k=null!=k&&null!=k.moved?k.moved:{},f=0,l=e.getChildCount(d),m="",p=0;p<l;p++){var q=e.getChildAt(d,p).getId();null==k[m]&&(null==g[EditorUi.DIFF_UPDATE]||null==g[EditorUi.DIFF_UPDATE][q]||null==g[EditorUi.DIFF_UPDATE][q].previous&&null==g[EditorUi.DIFF_UPDATE][q].parent)&&(k[m]=q);m=q}l=mxUtils.bind(this,function(k,l){var n=null!=k?k.getId():"";if(null!=k&&l){var m=
-e.getCell(n);null!=m&&m!=k&&(k=null)}null!=k&&(e.getChildAt(d,f)!=k&&e.add(d,k,f),this.patchCellRecursive(b,e,k,c,g),f++);return n});for(m=[null];0<m.length;)if(p=m.shift(),p=l(null!=p?p.child:null,null!=p?p.insert:!1),q=k[p],null!=q&&(delete k[p],m.push({child:e.getCell(q)})),q=n[p],null!=q&&(delete n[p],m.push({child:this.getCellForJson(q),insert:!0})),0==m.length){for(p in k)m.push({child:e.getCell(k[p])}),delete k[p];for(p in n)m.push({child:this.getCellForJson(n[p]),insert:!0}),delete n[p]}}};
+c,k,g,m,f,l,n,p){var q=document.createElement("div");q.style.textAlign="center";p=null!=p?p:44;var t=document.createElement("div");t.style.padding="6px";t.style.overflow="auto";t.style.maxHeight=p+"px";t.style.lineHeight="1.2em";mxUtils.write(t,e);q.appendChild(t);null!=n&&(t=document.createElement("div"),t.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",n),t.appendChild(e),q.appendChild(t));n=document.createElement("div");n.style.textAlign="center";n.style.whiteSpace=
+"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");g=mxUtils.button(g||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(u.checked)});g.className="geBtn";null!=f&&(g.innerHTML=f+"<br>"+g.innerHTML,g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.style.width="40%");b.editor.cancelFirst&&n.appendChild(g);var v=mxUtils.button(k||mxResources.get("ok"),function(){b.hideDialog();null!=d&&d(u.checked)});n.appendChild(v);null!=m?(v.innerHTML=
+m+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||n.appendChild(g);q.appendChild(n);l?(n.style.marginTop="10px",t=document.createElement("p"),t.style.marginTop="20px",t.style.marginBottom="0px",t.appendChild(u),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),t.appendChild(k),q.appendChild(t),mxEvent.addListener(k,
+"click",function(b){u.checked=!u.checked;mxEvent.consume(b)})):n.style.marginTop="12px";this.init=function(){v.focus()};this.container=q};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(b,e,d,c,k){var g={},m=[],f={},l={},n={},p={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var q in c[EditorUi.DIFF_UPDATE])g[q]=c[EditorUi.DIFF_UPDATE][q];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)l[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)f[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(q in e[EditorUi.DIFF_UPDATE])c=
+e[EditorUi.DIFF_UPDATE][q],null!=c.previous&&(p[c.previous]=q);if(null!=b){var t="";for(c=0;c<b.length;c++){var u=b[c].getId();n[u]=b[c];null!=p[t]||l[u]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][u]&&null!=e[EditorUi.DIFF_UPDATE][u].previous||(p[t]=u);t=u}}var v={},x=mxUtils.bind(this,function(b){var c=null!=b?b.getId():"";if(null!=b&&!v[c]){v[c]=!0;m.push(b);var l=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][c]:null;null!=l&&(this.updatePageRoot(b),null!=l.name&&b.setName(l.name),
+null!=l.view&&this.patchViewState(b,l.view),null!=l.cells&&this.patchPage(b,l.cells,g[b.getId()],k),!d||null==l.cells&&null==l.view||(b.needsUpdate=!0))}b=p[c];null!=b&&(delete p[c],x(n[b]));b=f[c];null!=b&&(delete f[c],A(b))}),A=mxUtils.bind(this,function(b){b=mxUtils.parseXml(b.data).documentElement;b=new DiagramPage(b);this.updatePageRoot(b);var c=n[b.getId()];null==c?x(b):(c.root=b.root,this.currentPage==c?this.editor.graph.model.setRoot(c.root):d&&(c.needsUpdate=!0))});x();for(q in p)x(n[p[q]]),
+delete p[q];for(q in f)A(f[q]),delete f[q];return m};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var d in e)try{b.viewState[d]=JSON.parse(e[d])}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};
+EditorUi.prototype.createParentLookup=function(b,e){function d(b){var d=c[b];null==d&&(d={inserted:[],moved:{}},c[b]=d);return d}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var k=0;k<e[EditorUi.DIFF_INSERT].length;k++){var g=e[EditorUi.DIFF_INSERT][k],m=null!=g.parent?g.parent:"",f=null!=g.previous?g.previous:"";d(m).inserted[f]=g}if(null!=e[EditorUi.DIFF_UPDATE])for(var l in e[EditorUi.DIFF_UPDATE])g=e[EditorUi.DIFF_UPDATE][l],null!=g.previous&&(m=g.parent,null==m&&(k=b.getCell(l),null!=k&&(k=
+b.getParent(k),null!=k&&(m=k.getId()))),null!=m&&(d(m).moved[g.previous]=l));return c};
+EditorUi.prototype.patchPage=function(b,e,d,c){var k=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),g=this.createParentLookup(k,e);k.beginUpdate();try{var m=k.updateEdgeParent,f=new mxDictionary,l=[];k.updateEdgeParent=function(b,d){!f.get(b)&&c&&(f.put(b,!0),l.push(b))};var n=g[""],p=null!=n&&null!=n.inserted?n.inserted[""]:null,q=null;null!=p&&(q=this.getCellForJson(p));if(null==q){var t=null!=n&&null!=n.moved?n.moved[""]:null;null!=t&&(q=k.getCell(t))}null!=q&&(k.setRoot(q),
+b.root=q);this.patchCellRecursive(b,k,k.root,g,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var u=0;u<e[EditorUi.DIFF_REMOVE].length;u++){var v=k.getCell(e[EditorUi.DIFF_REMOVE][u]);null!=v&&k.remove(v)}if(null!=e[EditorUi.DIFF_UPDATE]){var x=null!=d&&null!=d.cells?d.cells[EditorUi.DIFF_UPDATE]:null;for(t in e[EditorUi.DIFF_UPDATE])this.patchCell(k,k.getCell(t),e[EditorUi.DIFF_UPDATE][t],null!=x?x[t]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(u=0;u<e[EditorUi.DIFF_INSERT].length;u++)p=e[EditorUi.DIFF_INSERT][u],
+v=k.getCell(p.id),null!=v&&(k.setTerminal(v,k.getCell(p.source),!0),k.setTerminal(v,k.getCell(p.target),!1));k.updateEdgeParent=m;if(c&&0<l.length)for(u=0;u<l.length;u++)k.contains(l[u])&&k.updateEdgeParent(l[u])}finally{k.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,e,d,c,k){if(null!=d){for(var g=c[d.getId()],m=null!=g&&null!=g.inserted?g.inserted:{},g=null!=g&&null!=g.moved?g.moved:{},f=0,l=e.getChildCount(d),n="",p=0;p<l;p++){var q=e.getChildAt(d,p).getId();null==g[n]&&(null==k[EditorUi.DIFF_UPDATE]||null==k[EditorUi.DIFF_UPDATE][q]||null==k[EditorUi.DIFF_UPDATE][q].previous&&null==k[EditorUi.DIFF_UPDATE][q].parent)&&(g[n]=q);n=q}l=mxUtils.bind(this,function(g,l){var m=null!=g?g.getId():"";if(null!=g&&l){var n=
+e.getCell(m);null!=n&&n!=g&&(g=null)}null!=g&&(e.getChildAt(d,f)!=g&&e.add(d,g,f),this.patchCellRecursive(b,e,g,c,k),f++);return m});for(n=[null];0<n.length;)if(p=n.shift(),p=l(null!=p?p.child:null,null!=p?p.insert:!1),q=g[p],null!=q&&(delete g[p],n.push({child:e.getCell(q)})),q=m[p],null!=q&&(delete m[p],n.push({child:this.getCellForJson(q),insert:!0})),0==n.length){for(p in g)n.push({child:e.getCell(g[p])}),delete g[p];for(p in m)n.push({child:this.getCellForJson(m[p]),insert:!0}),delete m[p]}}};
EditorUi.prototype.patchCell=function(b,e,d,c){if(null!=e&&null!=d){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in d?b.setValue(e,d.value):null!=d.xmlValue&&b.setValue(e,mxUtils.parseXml(d.xmlValue).documentElement);null!=c&&null!=c.style||null==d.style||b.setStyle(e,d.style);null!=d.visible&&b.setVisible(e,1==d.visible);null!=d.collapsed&&b.setCollapsed(e,1==d.collapsed);null!=d.vertex&&(e.vertex=1==d.vertex);null!=d.edge&&(e.edge=1==d.edge);null!=d.connectable&&(e.connectable=
-1==d.connectable);null!=d.geometry&&b.setGeometry(e,this.codec.decode(mxUtils.parseXml(d.geometry).documentElement));null!=d.source&&b.setTerminal(e,b.getCell(d.source),!0);null!=d.target&&b.setTerminal(e,b.getCell(d.target),!1);for(var g in d)this.cellProperties[g]||(e[g]=d[g])}};
-EditorUi.prototype.getPagesForNode=function(b,e){var d=this.editor.extractGraphModel(b,!0,!0);null!=d&&(b=d);var d=b.getElementsByTagName(e||"diagram"),c=[];if(0<d.length)for(var g=0;g<d.length;g++){var k=new DiagramPage(d[g]);this.updatePageRoot(k,!0);c.push(k)}else"mxGraphModel"==b.nodeName&&(k=new DiagramPage(b.ownerDocument.createElement("diagram")),k.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(k.node,Graph.compressNode(b,!0)),c.push(k));return c};
-EditorUi.prototype.diffPages=function(b,e){for(var d=[],c=[],g={},k={},n={},f=null,l=0;l<e.length;l++)k[e[l].getId()]={page:e[l],prev:f},f=e[l];f=null;for(l=0;l<b.length;l++){var m=b[l].getId(),p=k[m];if(null==p)c.push(m);else{var q=this.diffPage(b[l],p.page),t={};0<Object.keys(q).length&&(t.cells=q);q=this.diffViewState(b[l],p.page);0<Object.keys(q).length&&(t.view=q);if((null!=p.prev?null==f:null!=f)||null!=f&&null!=p.prev&&f.getId()!=p.prev.getId())t.previous=null!=p.prev?p.prev.getId():"";null!=
-p.page.getName()&&b[l].getName()!=p.page.getName()&&(t.name=p.page.getName());0<Object.keys(t).length&&(n[m]=t)}delete k[b[l].getId()];f=b[l]}for(m in k)p=k[m],d.push({data:mxUtils.getXml(p.page.node),previous:null!=p.prev?p.prev.getId():""});0<Object.keys(n).length&&(g[EditorUi.DIFF_UPDATE]=n);0<c.length&&(g[EditorUi.DIFF_REMOVE]=c);0<d.length&&(g[EditorUi.DIFF_INSERT]=d);return g};
-EditorUi.prototype.createCellLookup=function(b,e,d){d=null!=d?d:{};d[b.getId()]={cell:b,prev:e};var c=b.getChildCount();e=null;for(var g=0;g<c;g++){var k=b.getChildAt(g);this.createCellLookup(k,e,d);e=k}return d};
-EditorUi.prototype.diffCellRecursive=function(b,e,d,c,g){c=null!=c?c:{};var k=d[b.getId()];delete d[b.getId()];if(null==k)g.push(b.getId());else{var n=this.diffCell(b,k.cell);if(null!=n.parent||(null!=k.prev?null==e:null!=e)||null!=e&&null!=k.prev&&e.getId()!=k.prev.getId())n.previous=null!=k.prev?k.prev.getId():"";0<Object.keys(n).length&&(c[b.getId()]=n)}k=b.getChildCount();e=null;for(n=0;n<k;n++){var f=b.getChildAt(n);this.diffCellRecursive(f,e,d,c,g);e=f}return c};
-EditorUi.prototype.diffPage=function(b,e){var d=[],c=[],g={};this.updatePageRoot(b);this.updatePageRoot(e);var k=this.createCellLookup(e.root),n=this.diffCellRecursive(b.root,null,k,n,c),f;for(f in k){var l=k[f];d.push(this.getJsonForCell(l.cell,l.prev))}0<Object.keys(n).length&&(g[EditorUi.DIFF_UPDATE]=n);0<c.length&&(g[EditorUi.DIFF_REMOVE]=c);0<d.length&&(g[EditorUi.DIFF_INSERT]=d);return g};
-EditorUi.prototype.diffViewState=function(b,e){var d=b.viewState,c=e.viewState,g={};e==this.currentPage&&(c=this.editor.graph.getViewState());if(null!=d&&null!=c)for(var k in this.viewStateProperties){var n=JSON.stringify(d[k]),f=JSON.stringify(c[k]);n!=f&&(g[k]=f)}return g};
+1==d.connectable);null!=d.geometry&&b.setGeometry(e,this.codec.decode(mxUtils.parseXml(d.geometry).documentElement));null!=d.source&&b.setTerminal(e,b.getCell(d.source),!0);null!=d.target&&b.setTerminal(e,b.getCell(d.target),!1);for(var k in d)this.cellProperties[k]||(e[k]=d[k])}};
+EditorUi.prototype.getPagesForNode=function(b,e){var d=this.editor.extractGraphModel(b,!0,!0);null!=d&&(b=d);var d=b.getElementsByTagName(e||"diagram"),c=[];if(0<d.length)for(var k=0;k<d.length;k++){var g=new DiagramPage(d[k]);this.updatePageRoot(g,!0);c.push(g)}else"mxGraphModel"==b.nodeName&&(g=new DiagramPage(b.ownerDocument.createElement("diagram")),g.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(g.node,Graph.compressNode(b,!0)),c.push(g));return c};
+EditorUi.prototype.diffPages=function(b,e){for(var d=[],c=[],k={},g={},m={},f=null,l=0;l<e.length;l++)g[e[l].getId()]={page:e[l],prev:f},f=e[l];f=null;for(l=0;l<b.length;l++){var n=b[l].getId(),p=g[n];if(null==p)c.push(n);else{var q=this.diffPage(b[l],p.page),t={};0<Object.keys(q).length&&(t.cells=q);q=this.diffViewState(b[l],p.page);0<Object.keys(q).length&&(t.view=q);if((null!=p.prev?null==f:null!=f)||null!=f&&null!=p.prev&&f.getId()!=p.prev.getId())t.previous=null!=p.prev?p.prev.getId():"";null!=
+p.page.getName()&&b[l].getName()!=p.page.getName()&&(t.name=p.page.getName());0<Object.keys(t).length&&(m[n]=t)}delete g[b[l].getId()];f=b[l]}for(n in g)p=g[n],d.push({data:mxUtils.getXml(p.page.node),previous:null!=p.prev?p.prev.getId():""});0<Object.keys(m).length&&(k[EditorUi.DIFF_UPDATE]=m);0<c.length&&(k[EditorUi.DIFF_REMOVE]=c);0<d.length&&(k[EditorUi.DIFF_INSERT]=d);return k};
+EditorUi.prototype.createCellLookup=function(b,e,d){d=null!=d?d:{};d[b.getId()]={cell:b,prev:e};var c=b.getChildCount();e=null;for(var k=0;k<c;k++){var g=b.getChildAt(k);this.createCellLookup(g,e,d);e=g}return d};
+EditorUi.prototype.diffCellRecursive=function(b,e,d,c,k){c=null!=c?c:{};var g=d[b.getId()];delete d[b.getId()];if(null==g)k.push(b.getId());else{var m=this.diffCell(b,g.cell);if(null!=m.parent||(null!=g.prev?null==e:null!=e)||null!=e&&null!=g.prev&&e.getId()!=g.prev.getId())m.previous=null!=g.prev?g.prev.getId():"";0<Object.keys(m).length&&(c[b.getId()]=m)}g=b.getChildCount();e=null;for(m=0;m<g;m++){var f=b.getChildAt(m);this.diffCellRecursive(f,e,d,c,k);e=f}return c};
+EditorUi.prototype.diffPage=function(b,e){var d=[],c=[],k={};this.updatePageRoot(b);this.updatePageRoot(e);var g=this.createCellLookup(e.root),m=this.diffCellRecursive(b.root,null,g,m,c),f;for(f in g){var l=g[f];d.push(this.getJsonForCell(l.cell,l.prev))}0<Object.keys(m).length&&(k[EditorUi.DIFF_UPDATE]=m);0<c.length&&(k[EditorUi.DIFF_REMOVE]=c);0<d.length&&(k[EditorUi.DIFF_INSERT]=d);return k};
+EditorUi.prototype.diffViewState=function(b,e){var d=b.viewState,c=e.viewState,k={};e==this.currentPage&&(c=this.editor.graph.getViewState());if(null!=d&&null!=c)for(var g in this.viewStateProperties){var m=JSON.stringify(d[g]),f=JSON.stringify(c[g]);m!=f&&(k[g]=f)}return k};
EditorUi.prototype.getCellForJson=function(b){var e=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,d=b.value;null!=b.xmlValue&&(d=mxUtils.parseXml(b.xmlValue).documentElement);e=new mxCell(d,e,b.style);e.connectable=0!=b.connectable;e.collapsed=1==b.collapsed;e.visible=0!=b.visible;e.vertex=1==b.vertex;e.edge=1==b.edge;e.id=b.id;for(var c in b)this.cellProperties[c]||(e[c]=b[c]);return e};
EditorUi.prototype.getJsonForCell=function(b,e){var d={id:b.getId()};b.vertex&&(d.vertex=1);b.edge&&(d.edge=1);b.connectable||(d.connectable=0);null!=b.parent&&(d.parent=b.parent.getId());null!=e&&(d.previous=e.getId());null!=b.source&&(d.source=b.source.getId());null!=b.target&&(d.target=b.target.getId());null!=b.style&&(d.style=b.style);null!=b.geometry&&(d.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(d.collapsed=1);b.visible||(d.visible=0);null!=b.value&&("object"===typeof b.value&&
"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?d.xmlValue=mxUtils.getXml(b.value):d.value=b.value);for(var c in b)this.cellProperties[c]||"function"===typeof b[c]||(d[c]=b[c]);return d};
EditorUi.prototype.diffCell=function(b,e){function d(b){return null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute}var c={};b.vertex!=e.vertex&&(c.vertex=e.vertex?1:0);b.edge!=e.edge&&(c.edge=e.edge?1:0);b.connectable!=e.connectable&&(c.connectable=e.connectable?1:0);if((null!=b.parent?null==e.parent:null!=e.parent)||null!=b.parent&&null!=e.parent&&b.parent.getId()!=e.parent.getId())c.parent=null!=e.parent?e.parent.getId():"";
if((null!=b.source?null==e.source:null!=e.source)||null!=b.source&&null!=e.source&&b.source.getId()!=e.source.getId())c.source=null!=e.source?e.source.getId():"";if((null!=b.target?null==e.target:null!=e.target)||null!=b.target&&null!=e.target&&b.target.getId()!=e.target.getId())c.target=null!=e.target?e.target.getId():"";d(b.value)&&d(e.value)?b.value.isEqualNode(e.value)||(c.xmlValue=mxUtils.getXml(e.value)):b.value!=e.value&&(d(e.value)?c.xmlValue=mxUtils.getXml(e.value):c.value=null!=e.value?
-e.value:null);b.style!=e.style&&(c.style=e.style);b.visible!=e.visible&&(c.visible=e.visible?1:0);b.collapsed!=e.collapsed&&(c.collapsed=e.collapsed?1:0);if(!this.isObjectEqual(b.geometry,e.geometry,new mxGeometry)){var g=this.codec.encode(e.geometry);null!=g&&(c.geometry=mxUtils.getXml(g))}for(var k in b)this.cellProperties[k]||"function"===typeof b[k]||"function"===typeof e[k]||b[k]==e[k]||(c[k]=void 0===e[k]?null:e[k]);for(k in e)k in b||this.cellProperties[k]||"function"===typeof b[k]||"function"===
-typeof e[k]||b[k]==e[k]||(c[k]=void 0===e[k]?null:e[k]);return c};EditorUi.prototype.isObjectEqual=function(b,e,d){if(null==b&&null==e)return!0;if(null!=b?null==e:null!=e)return!1;var c=function(b,c){return null==d||d[b]!=c?!0===c?1:c:void 0};return JSON.stringify(b,c)==JSON.stringify(e,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},getUi:function(){return mxSettings.settings.ui},setUi:function(b){var e=localStorage.getItem(".drawio-config"),e=null==e?mxSettings.getDefaults():JSON.parse(e);e.ui=b;delete e.isNew;e.version=mxSettings.currentVersion;localStorage.setItem(".drawio-config",JSON.stringify(e))},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},
+e.value:null);b.style!=e.style&&(c.style=e.style);b.visible!=e.visible&&(c.visible=e.visible?1:0);b.collapsed!=e.collapsed&&(c.collapsed=e.collapsed?1:0);if(!this.isObjectEqual(b.geometry,e.geometry,new mxGeometry)){var k=this.codec.encode(e.geometry);null!=k&&(c.geometry=mxUtils.getXml(k))}for(var g in b)this.cellProperties[g]||"function"===typeof b[g]||"function"===typeof e[g]||b[g]==e[g]||(c[g]=void 0===e[g]?null:e[g]);for(g in e)g in b||this.cellProperties[g]||"function"===typeof b[g]||"function"===
+typeof e[g]||b[g]==e[g]||(c[g]=void 0===e[g]?null:e[g]);return c};EditorUi.prototype.isObjectEqual=function(b,e,d){if(null==b&&null==e)return!0;if(null!=b?null==e:null!=e)return!1;var c=function(b,c){return null==d||d[b]!=c?!0===c?1:c:void 0};return JSON.stringify(b,c)==JSON.stringify(e,c)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},getUi:function(){return mxSettings.settings.ui},setUi:function(b){var e=localStorage.getItem(".drawio-config"),e=null==e?mxSettings.getDefaults():JSON.parse(e);e.ui=b;delete e.isNew;e.version=mxSettings.currentVersion;localStorage.setItem(".drawio-config",JSON.stringify(e))},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},
setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(b){return b?mxSettings.settings.darkGridColor:mxSettings.settings.gridColor},setGridColor:function(b,e){e?mxSettings.settings.darkGridColor=b:mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=
b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=b},setCustomFonts:function(b){mxSettings.settings.customFonts=b},getCustomFonts:function(){for(var b=mxSettings.settings.customFonts||[],e=0;e<b.length;e++)"string"===typeof b[e]&&(b[e]={name:b[e],url:null});return b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=b},addCustomLibrary:function(b){mxSettings.load();
Array.isArray(mxSettings.settings.customLibraries)||(mxSettings.settings.customLibraries=[]);0>mxUtils.indexOf(mxSettings.settings.customLibraries,b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,0,b):mxSettings.settings.customLibraries.push(b));mxSettings.save()},removeCustomLibrary:function(b){mxSettings.load();mxUtils.remove(b,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},
@@ -11020,27 +11024,27 @@ DrawioFileSync.prototype.fileChangedNotify=function(b){if(this.isValidState())if
DrawioFileSync.prototype.fileChanged=function(b,e,d,c){return this.notifyThread=c=window.setTimeout(mxUtils.bind(this,function(){null!=d&&d()||(this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(c){null!=d&&d()||(this.isValidState()?this.catchup(c,b,e,d):null!=e&&e())}),e):null!=e&&e())}),c?this.cacheReadyDelay:0)};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.p2pCatchup=function(b,e,d,c,g,k,n,f){if(null!=g&&(null==f||!f()))if(this.file.getDescriptorRevisionId(g),this.file.getCurrentRevisionId(),this.isValidState()){if(this.file.getDescriptorSecret(g),null==f||!f()){this.file.stats.bytesReceived+=b.length;e=null;d=[];try{if(b=[b],null!=b&&0<b.length)for(c=0;c<b.length;c++){var l=this.stringToObject(b[c]);if(l.v>DrawioFileSync.PROTOCOL){failed=!0;d=[];break}else if(l.v===DrawioFileSync.PROTOCOL&&null!=l.d)e=l.d.checksum,d.push(l.d.patch);
-else{failed=!0;d=[];break}}}catch(m){d=[],null!=window.console&&"1"==urlParams.test&&console.log(m)}try{0<d.length?(this.file.stats.cacheHits++,this.merge(d,e,g,k,n,f)):(this.file.stats.cacheFail++,this.reload(k,n,f))}catch(m){null!=n&&n(m)}}}else null!=n&&n()};
-DrawioFileSync.prototype.catchup=function(b,e,d,c){if(null!=b&&(null==c||!c())){var g=this.file.getDescriptorRevisionId(b),k=this.file.getCurrentRevisionId();if(k==g)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=e&&e();else if(this.isValidState()){var n=this.file.getDescriptorSecret(b);if(null==n||"1"==urlParams.lockdown)this.reload(e,d,c);else{var f=0,l=!1,m=mxUtils.bind(this,function(){if(null==c||!c())if(k!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var p=
-!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;this.reload(e,d,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(k)+"&to="+encodeURIComponent(g)+(null!=n?"&secret="+encodeURIComponent(n):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(q);if(p&&(null==c||!c()))if(k!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var n=null,t=[];if(200<=
-g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var x=JSON.parse(g.getText());if(null!=x&&0<x.length)for(var A=0;A<x.length;A++){var z=this.stringToObject(x[A]);if(z.v>DrawioFileSync.PROTOCOL){l=!0;t=[];break}else if(z.v===DrawioFileSync.PROTOCOL&&null!=z.d)n=z.d.checksum,t.push(z.d.patch);else{l=!0;t=[];break}}}catch(y){t=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<t.length?(this.file.stats.cacheHits++,this.merge(t,n,b,e,d,c)):f<=this.maxCacheReadyRetries-1&&!l&&
-401!=g.getStatus()&&503!=g.getStatus()?(f++,this.file.stats.cacheMiss++,window.setTimeout(m,(f+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(e,d,c))}catch(y){null!=d&&d(y)}}else null!=d&&d()}))}else null!=d&&d()});window.setTimeout(m,this.cacheReadyDelay)}}else null!=d&&d()}};
+DrawioFileSync.prototype.p2pCatchup=function(b,e,d,c,k,g,m,f){if(null!=k&&(null==f||!f()))if(this.file.getDescriptorRevisionId(k),this.file.getCurrentRevisionId(),this.isValidState()){if(this.file.getDescriptorSecret(k),null==f||!f()){this.file.stats.bytesReceived+=b.length;e=null;d=[];try{if(b=[b],null!=b&&0<b.length)for(c=0;c<b.length;c++){var l=this.stringToObject(b[c]);if(l.v>DrawioFileSync.PROTOCOL){failed=!0;d=[];break}else if(l.v===DrawioFileSync.PROTOCOL&&null!=l.d)e=l.d.checksum,d.push(l.d.patch);
+else{failed=!0;d=[];break}}}catch(n){d=[],null!=window.console&&"1"==urlParams.test&&console.log(n)}try{0<d.length?(this.file.stats.cacheHits++,this.merge(d,e,k,g,m,f)):(this.file.stats.cacheFail++,this.reload(g,m,f))}catch(n){null!=m&&m(n)}}}else null!=m&&m()};
+DrawioFileSync.prototype.catchup=function(b,e,d,c){if(null!=b&&(null==c||!c())){var k=this.file.getDescriptorRevisionId(b),g=this.file.getCurrentRevisionId();if(g==k)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=e&&e();else if(this.isValidState()){var m=this.file.getDescriptorSecret(b);if(null==m||"1"==urlParams.lockdown)this.reload(e,d,c);else{var f=0,l=!1,n=mxUtils.bind(this,function(){if(null==c||!c())if(g!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var p=
+!0,q=window.setTimeout(mxUtils.bind(this,function(){p=!1;this.reload(e,d,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(g)+"&to="+encodeURIComponent(k)+(null!=m?"&secret="+encodeURIComponent(m):""),mxUtils.bind(this,function(k){this.file.stats.bytesReceived+=k.getText().length;window.clearTimeout(q);if(p&&(null==c||!c()))if(g!=this.file.getCurrentRevisionId())null!=e&&e();else if(this.isValidState()){var m=null,t=[];if(200<=
+k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var x=JSON.parse(k.getText());if(null!=x&&0<x.length)for(var A=0;A<x.length;A++){var z=this.stringToObject(x[A]);if(z.v>DrawioFileSync.PROTOCOL){l=!0;t=[];break}else if(z.v===DrawioFileSync.PROTOCOL&&null!=z.d)m=z.d.checksum,t.push(z.d.patch);else{l=!0;t=[];break}}}catch(y){t=[],null!=window.console&&"1"==urlParams.test&&console.log(y)}try{0<t.length?(this.file.stats.cacheHits++,this.merge(t,m,b,e,d,c)):f<=this.maxCacheReadyRetries-1&&!l&&
+401!=k.getStatus()&&503!=k.getStatus()?(f++,this.file.stats.cacheMiss++,window.setTimeout(n,(f+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(e,d,c))}catch(y){null!=d&&d(y)}}else null!=d&&d()}))}else null!=d&&d()});window.setTimeout(n,this.cacheReadyDelay)}}else null!=d&&d()}};
DrawioFileSync.prototype.reload=function(b,e,d,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(b){null!=e&&e(b)}),d,c)};
-DrawioFileSync.prototype.merge=function(b,e,d,c,g,k){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 n=this.file.ignorePatches(b),f=this.file.getDescriptorRevisionId(d);if(!n){for(k=0;k<b.length;k++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
-b[k]);var l=null!=e?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",f,"etag",this.file.getDescriptorEtag(d),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",b,"checksum",e==l,e);if(null!=e&&e!=l){var m=this.ui.hashValue(this.file.getCurrentRevisionId()),p=this.ui.hashValue(f);this.file.checksumError(g,b,"From: "+m+"\nTo: "+p+"\nChecksum: "+e+"\nCurrent: "+l,f,"merge");
-return}this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),d);this.file.backupPatch=null;null!=c&&c()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=g&&g(u);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),p=this.ui.hashValue(f),this.file.sendErrorReport("Error in merge",
-"From: "+m+"\nTo: "+p+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),u);else{var q=this.file.getCurrentUser(),t=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),t,u)}}catch(v){}}};
+DrawioFileSync.prototype.merge=function(b,e,d,c,k,g){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var m=this.file.ignorePatches(b),f=this.file.getDescriptorRevisionId(d);if(!m){for(g=0;g<b.length;g++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
+b[g]);var l=null!=e?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",f,"etag",this.file.getDescriptorEtag(d),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",b,"checksum",e==l,e);if(null!=e&&e!=l){var n=this.ui.hashValue(this.file.getCurrentRevisionId()),p=this.ui.hashValue(f);this.file.checksumError(k,b,"From: "+n+"\nTo: "+p+"\nChecksum: "+e+"\nCurrent: "+l,f,"merge");
+return}this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),d);this.file.backupPatch=null;null!=c&&c()}catch(u){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=k&&k(u);try{if(this.file.errorReportsEnabled)n=this.ui.hashValue(this.file.getCurrentRevisionId()),p=this.ui.hashValue(f),this.file.sendErrorReport("Error in merge",
+"From: "+n+"\nTo: "+p+"\nChecksum: "+e+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),u);else{var q=this.file.getCurrentUser(),t=null!=q?q.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),t,u)}}catch(v){}}};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),d=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(d)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++}this.updateStatus()};
DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
-DrawioFileSync.prototype.createToken=function(b,e,d){var c=!0,g=window.setTimeout(mxUtils.bind(this,function(){c=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(b){window.clearTimeout(g);c&&(200<=b.getStatus()&&299>=b.getStatus()?e(b.getText()):d({code:b.getStatus(),message:"Token Error "+b.getStatus()}))}))};
+DrawioFileSync.prototype.createToken=function(b,e,d){var c=!0,k=window.setTimeout(mxUtils.bind(this,function(){c=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(b){window.clearTimeout(k);c&&(200<=b.getStatus()&&299>=b.getStatus()?e(b.getText()):d({code:b.getStatus(),message:"Token Error "+b.getStatus()}))}))};
DrawioFileSync.prototype.fileSaving=function(){var b=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(b),function(){})};
-DrawioFileSync.prototype.sendFileChanges=function(b,e){this.lastModified=this.file.getLastModifiedDate();var d=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),c=this.file.getDescriptorSecret(this.file.getDescriptor()),g=this.file.getDescriptorRevisionId(e),k=this.file.getCurrentRevisionId(),n=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),f=this.file.getDescriptorSecret(e),l=this.ui.getHashValueForPages(b),
-n=this.ui.diffPages(n,b),l=this.objectToString(this.createMessage({patch:n,checksum:l}));this.file.p2pCollab.sendMessage("diff",{id:this.channelId,from:g,to:k,msg:d,secret:c,lastSecret:f,data:l})};
-DrawioFileSync.prototype.fileSaved=function(b,e,d,c,g){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var k=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),n=this.file.getDescriptorSecret(this.file.getDescriptor()),f=this.file.getDescriptorRevisionId(e),l=this.file.getCurrentRevisionId();if(null==
-n||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(k),function(){}),null!=d&&d(),"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",f,"to",l,"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 p=this.ui.getHashValueForPages(b),m=this.ui.diffPages(m,
-b),q=this.objectToString(this.createMessage({patch:m,checksum:p}));this.file.stats.bytesSent+=q.length;this.file.stats.msgSent++;var t=!0,u=window.setTimeout(mxUtils.bind(this,function(){t=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(l)+"&msg="+encodeURIComponent(k)+(null!=n?"&secret="+encodeURIComponent(n):"")+(null!=e?"&last-secret="+encodeURIComponent(e):
-"")+(q.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(q):"")+(null!=g?"&token="+encodeURIComponent(g):""),mxUtils.bind(this,function(b){window.clearTimeout(u);t&&(200<=b.getStatus()&&299>=b.getStatus()?null!=d&&d():c({code:b.getStatus(),message:b.getStatus()}))}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",f,"to",l,"etag",this.file.getCurrentEtag(),q.length,"bytes","diff",m,"checksum",p)}}this.file.shadowPages=b};
+DrawioFileSync.prototype.sendFileChanges=function(b,e){this.lastModified=this.file.getLastModifiedDate();var d=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),c=this.file.getDescriptorSecret(this.file.getDescriptor()),k=this.file.getDescriptorRevisionId(e),g=this.file.getCurrentRevisionId(),m=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement),f=this.file.getDescriptorSecret(e),l=this.ui.getHashValueForPages(b),
+m=this.ui.diffPages(m,b),l=this.objectToString(this.createMessage({patch:m,checksum:l}));this.file.p2pCollab.sendMessage("diff",{id:this.channelId,from:k,to:g,msg:d,secret:c,lastSecret:f,data:l})};
+DrawioFileSync.prototype.fileSaved=function(b,e,d,c,k){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var g=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),m=this.file.getDescriptorSecret(this.file.getDescriptor()),f=this.file.getDescriptorRevisionId(e),l=this.file.getCurrentRevisionId();if(null==
+m||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(g),function(){}),null!=d&&d(),"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",f,"to",l,"etag",this.file.getCurrentEtag(),"notify");else{var n=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);e=this.file.getDescriptorSecret(e);var p=this.ui.getHashValueForPages(b),n=this.ui.diffPages(n,
+b),q=this.objectToString(this.createMessage({patch:n,checksum:p}));this.file.stats.bytesSent+=q.length;this.file.stats.msgSent++;var t=!0,u=window.setTimeout(mxUtils.bind(this,function(){t=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(l)+"&msg="+encodeURIComponent(g)+(null!=m?"&secret="+encodeURIComponent(m):"")+(null!=e?"&last-secret="+encodeURIComponent(e):
+"")+(q.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(q):"")+(null!=k?"&token="+encodeURIComponent(k):""),mxUtils.bind(this,function(b){window.clearTimeout(u);t&&(200<=b.getStatus()&&299>=b.getStatus()?null!=d&&d():c({code:b.getStatus(),message:b.getStatus()}))}));"1"==urlParams.test&&EditorUi.debug("Sync.fileSaved",[this],"from",f,"to",l,"etag",this.file.getCurrentEtag(),q.length,"bytes","diff",n,"checksum",p)}}this.file.shadowPages=b};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,e,d){this.catchupRetryCount++;this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,e,d):this.fileChanged(e,d)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=d&&d({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()};
@@ -11048,45 +11052,45 @@ DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.
"online",this.onlineListener),this.onlineListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,
"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null)};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;function mxAsyncCanvas(b){mxAbstractCanvas2D.call(this);this.htmlCanvas=b;b.images=b.images||[];b.subCanvas=b.subCanvas||[]}mxUtils.extend(mxAsyncCanvas,mxAbstractCanvas2D);mxAsyncCanvas.prototype.htmlCanvas=null;mxAsyncCanvas.prototype.canvasIndex=0;mxAsyncCanvas.prototype.waitCounter=0;mxAsyncCanvas.prototype.onComplete=null;mxAsyncCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
-mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(b,e,d,c,g){};
+mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(b,e,d,c,k){};
mxAsyncCanvas.prototype.setAlpha=function(b){this.state.alpha=b};mxAsyncCanvas.prototype.setFontColor=function(b){this.state.fontColor=b};mxAsyncCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxAsyncCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxAsyncCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
-mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,e,d,c){};mxAsyncCanvas.prototype.roundrect=function(b,e,d,c,g,k){};mxAsyncCanvas.prototype.ellipse=function(b,e,d,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
-mxAsyncCanvas.prototype.image=function(b,e,d,c,g,k,n,f){g=this.rewriteImageSource(g);b=this.htmlCanvas.images[g];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[g]=b,b.src=g)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(b,e,d,c,g,k,n,f,l,m,p,q){if(null!=g&&0!=g.length&&(b=this.state.scale,"html"==l&&"function"===typeof html2canvas)){this.incWaitCounter();var t=this.canvasIndex++;html2canvas(g,{onrendered:mxUtils.bind(this,function(b){this.htmlCanvas.subCanvas[t]=b;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.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(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(b,d,c,g){return d+d+c+c+g+g});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
+mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,e,d,c){};mxAsyncCanvas.prototype.roundrect=function(b,e,d,c,k,g){};mxAsyncCanvas.prototype.ellipse=function(b,e,d,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
+mxAsyncCanvas.prototype.image=function(b,e,d,c,k,g,m,f){k=this.rewriteImageSource(k);b=this.htmlCanvas.images[k];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[k]=b,b.src=k)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(b,e,d,c,k,g,m,f,l,n,p,q){if(null!=k&&0!=k.length&&(b=this.state.scale,"html"==l&&"function"===typeof html2canvas)){this.incWaitCounter();var t=this.canvasIndex++;html2canvas(k,{onrendered:mxUtils.bind(this,function(b){this.htmlCanvas.subCanvas[t]=b;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.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(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(b,d,c,k){return d+d+c+c+k+k});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[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 b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+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(b){this.state.scale*=b;this.state.strokeWidth*=b;this.ctx.scale(b,b)};mxJsCanvas.prototype.translate=function(b,e){this.state.dx+=b;this.state.dy+=e;this.ctx.translate(b,e)};
-mxJsCanvas.prototype.rotate=function(b,e,d,c,g){c-=this.state.dx;g-=this.state.dy;this.ctx.translate(c,g);(e||d)&&this.ctx.scale(e?-1:1,d?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-g)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};
-mxJsCanvas.prototype.setGradient=function(b,e,d,c,g,k,n,f,l){d=this.ctx.createLinearGradient(0,c,0,c+k);c=this.state;c.fillColor=b;c.fillAlpha=null!=f?f:1;c.gradientColor=e;c.gradientAlpha=null!=l?l:1;c.gradientDirection=n;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&d.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&d.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=d};
+mxJsCanvas.prototype.rotate=function(b,e,d,c,k){c-=this.state.dx;k-=this.state.dy;this.ctx.translate(c,k);(e||d)&&this.ctx.scale(e?-1:1,d?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-k)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};
+mxJsCanvas.prototype.setGradient=function(b,e,d,c,k,g,m,f,l){d=this.ctx.createLinearGradient(0,c,0,c+g);c=this.state;c.fillColor=b;c.fillAlpha=null!=f?f:1;c.gradientColor=e;c.gradientAlpha=null!=l?l:1;c.gradientDirection=m;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&d.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&d.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=d};
mxJsCanvas.prototype.setStrokeColor=function(b){null!=b&&(b==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=b,this.state.strokeColor=b))};mxJsCanvas.prototype.setStrokeWidth=function(b){this.ctx.lineWidth=b};mxJsCanvas.prototype.setDashed=function(b){if(this.state.dashed=b){b=this.state.dashPattern.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.setLineDash(b)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(b){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(b)}catch(e){}};mxJsCanvas.prototype.setDashPattern=function(b){this.state.dashPattern=b;if(this.state.dashed){b=b.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.ctx.setLineDash(b)}};mxJsCanvas.prototype.setLineCap=function(b){this.ctx.lineCap=b};mxJsCanvas.prototype.setLineJoin=function(b){this.ctx.lineJoin=b};
mxJsCanvas.prototype.setMiterLimit=function(b){this.ctx.lineJoin=b};mxJsCanvas.prototype.setFontColor=function(b){this.ctx.fillStyle=b};mxJsCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxJsCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxJsCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
mxJsCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxJsCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxJsCanvas.prototype.setShadow=function(b){(this.state.shadow=b)?(this.setShadowOffset(this.state.shadowDx,this.state.shadowDy),this.setShadowAlpha(this.state.shadowAlpha)):(this.ctx.shadowColor="transparent",this.ctx.shadowBlur=0,this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0)};
mxJsCanvas.prototype.setShadowColor=function(b){if(null==b||b==mxConstants.NONE)b=null,this.ctx.shadowColor="transparent";this.state.shadowColor=b;if(this.state.shadow&&null!=b){var e=null!=this.state.shadowAlpha?this.state.shadowAlpha:1;b=this.hexToRgb(b);this.ctx.shadowColor="rgba("+b.r+","+b.g+","+b.b+","+e+")"}};mxJsCanvas.prototype.setShadowAlpha=function(b){this.state.shadowAlpha=b;this.setShadowColor(this.state.shadowColor)};
mxJsCanvas.prototype.setShadowOffset=function(b,e){this.state.shadowDx=b;this.state.shadowDy=e;this.state.shadow&&(this.ctx.shadowOffsetX=b,this.ctx.shadowOffsetY=e)};mxJsCanvas.prototype.moveTo=function(b,e){this.ctx.moveTo(b,e);this.lastMoveX=b;this.lastMoveY=e};mxJsCanvas.prototype.lineTo=function(b,e){this.ctx.lineTo(b,e);this.lastMoveX=b;this.lastMoveY=e};mxJsCanvas.prototype.quadTo=function(b,e,d,c){this.ctx.quadraticCurveTo(b,e,d,c);this.lastMoveX=d;this.lastMoveY=c};
-mxJsCanvas.prototype.arcTo=function(b,e,d,c,g,k,n){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,e,d,c,g,k,n);if(null!=b)for(e=0;e<b.length;e+=6)this.curveTo(b[e],b[e+1],b[e+2],b[e+3],b[e+4],b[e+5])};mxJsCanvas.prototype.curveTo=function(b,e,d,c,g,k){this.ctx.bezierCurveTo(b,e,d,c,g,k);this.lastMoveX=g;this.lastMoveY=k};mxJsCanvas.prototype.rect=function(b,e,d,c){this.begin();this.moveTo(b,e);this.lineTo(b+d,e);this.lineTo(b+d,e+c);this.lineTo(b,e+c);this.close()};
-mxJsCanvas.prototype.roundrect=function(b,e,d,c,g,k){this.begin();this.moveTo(b+g,e);this.lineTo(b+d-g,e);this.quadTo(b+d,e,b+d,e+k);this.lineTo(b+d,e+c-k);this.quadTo(b+d,e+c,b+d-g,e+c);this.lineTo(b+g,e+c);this.quadTo(b,e+c,b,e+c-k);this.lineTo(b,e+k);this.quadTo(b,e,b+g,e)};mxJsCanvas.prototype.ellipse=function(b,e,d,c){this.ctx.save();this.ctx.translate(b+d/2,e+c/2);this.ctx.scale(d/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
+mxJsCanvas.prototype.arcTo=function(b,e,d,c,k,g,m){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,e,d,c,k,g,m);if(null!=b)for(e=0;e<b.length;e+=6)this.curveTo(b[e],b[e+1],b[e+2],b[e+3],b[e+4],b[e+5])};mxJsCanvas.prototype.curveTo=function(b,e,d,c,k,g){this.ctx.bezierCurveTo(b,e,d,c,k,g);this.lastMoveX=k;this.lastMoveY=g};mxJsCanvas.prototype.rect=function(b,e,d,c){this.begin();this.moveTo(b,e);this.lineTo(b+d,e);this.lineTo(b+d,e+c);this.lineTo(b,e+c);this.close()};
+mxJsCanvas.prototype.roundrect=function(b,e,d,c,k,g){this.begin();this.moveTo(b+k,e);this.lineTo(b+d-k,e);this.quadTo(b+d,e,b+d,e+g);this.lineTo(b+d,e+c-g);this.quadTo(b+d,e+c,b+d-k,e+c);this.lineTo(b+k,e+c);this.quadTo(b,e+c,b,e+c-g);this.lineTo(b,e+g);this.quadTo(b,e,b+k,e)};mxJsCanvas.prototype.ellipse=function(b,e,d,c){this.ctx.save();this.ctx.translate(b+d/2,e+c/2);this.ctx.scale(d/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
-mxJsCanvas.prototype.image=function(b,e,d,c,g,k,n,f){g=this.rewriteImageSource(g);g=this.images[g];if(null!=g&&0<g.height&&0<g.width){var l=this.ctx;l.save();if(k){k=g.width;var m=g.height,p=Math.min(d/k,c/m);b+=(d-k*p)/2;e+=(c-m*p)/2;d=k*p;c=m*p}n&&(l.translate(2*b+d,0),l.scale(-1,1));f&&(l.translate(0,2*e+c),l.scale(1,-1));l.drawImage(g,b,e,d,c);l.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(b,e,d,c,k,g,m,f){k=this.rewriteImageSource(k);k=this.images[k];if(null!=k&&0<k.height&&0<k.width){var l=this.ctx;l.save();if(g){g=k.width;var n=k.height,p=Math.min(d/g,c/n);b+=(d-g*p)/2;e+=(c-n*p)/2;d=g*p;c=n*p}m&&(l.translate(2*b+d,0),l.scale(-1,1));f&&(l.translate(0,2*e+c),l.scale(1,-1));l.drawImage(k,b,e,d,c);l.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,e=this.ctx.shadowOffsetX,d=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=e;this.ctx.shadowOffsetY=d}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(b,e,d,c,g,k,n,f,l,m,p,q){if(null!=g&&0!=g.length){d=this.state.scale;0!=q&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(q*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==l){g=this.subCanvas[this.canvasIndex++];l=g.height;q=g.width;switch(n){case mxConstants.ALIGN_MIDDLE:e-=l/2/d;break;case mxConstants.ALIGN_BOTTOM:e-=l/d}switch(k){case mxConstants.ALIGN_CENTER:b-=q/2/d;break;case mxConstants.ALIGN_RIGHT:b-=q/d}this.ctx.save();
-if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(g.width/d),Math.round(g.height/d))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(g.width/d),Math.round(g.height/d)));this.ctx.scale(1/d,1/d);this.ctx.drawImage(g,
-Math.round(b*d),Math.round(e*d))}else{this.ctx.save();this.updateFont();q=document.createElement("div");q.innerHTML=g;q.style.position="absolute";q.style.top="-9999px";q.style.left="-9999px";q.style.fontFamily=this.state.fontFamily;q.style.fontWeight="bold";q.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(q);l=[q.offsetWidth,q.offsetHeight];document.body.removeChild(q);g=g.split("\n");q=l[1];this.ctx.textBaseline="top";l=e;switch(n){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";e-=(g.length-1)*q/2;l=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=q*(g.length-1),l=e-this.state.fontSize}n=[];q=[];for(d=0;d<g.length;d++)q[d]=b,n[d]=this.ctx.measureText(g[d]).width,null!=k&&k!=mxConstants.ALIGN_LEFT&&(q[d]-=n[d],k==mxConstants.ALIGN_CENTER&&(q[d]+=n[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=q[0];k=n[0];for(d=1;d<g.length;d++)b=Math.min(b,q[d]),k=Math.max(k,n[d]);this.ctx.save();
-b=Math.round(b)-.5;l=Math.round(l)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,l,k,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,l,k,this.state.fontSize*mxConstants.LINE_HEIGHT*g.length));this.ctx.restore()}for(d=0;d<g.length;d++)this.ctx.fillText(g[d],q[d],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+mxJsCanvas.prototype.text=function(b,e,d,c,k,g,m,f,l,n,p,q){if(null!=k&&0!=k.length){d=this.state.scale;0!=q&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(q*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==l){k=this.subCanvas[this.canvasIndex++];l=k.height;q=k.width;switch(m){case mxConstants.ALIGN_MIDDLE:e-=l/2/d;break;case mxConstants.ALIGN_BOTTOM:e-=l/d}switch(g){case mxConstants.ALIGN_CENTER:b-=q/2/d;break;case mxConstants.ALIGN_RIGHT:b-=q/d}this.ctx.save();
+if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(k.width/d),Math.round(k.height/d))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(k.width/d),Math.round(k.height/d)));this.ctx.scale(1/d,1/d);this.ctx.drawImage(k,
+Math.round(b*d),Math.round(e*d))}else{this.ctx.save();this.updateFont();q=document.createElement("div");q.innerHTML=k;q.style.position="absolute";q.style.top="-9999px";q.style.left="-9999px";q.style.fontFamily=this.state.fontFamily;q.style.fontWeight="bold";q.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(q);l=[q.offsetWidth,q.offsetHeight];document.body.removeChild(q);k=k.split("\n");q=l[1];this.ctx.textBaseline="top";l=e;switch(m){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";e-=(k.length-1)*q/2;l=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=q*(k.length-1),l=e-this.state.fontSize}m=[];q=[];for(d=0;d<k.length;d++)q[d]=b,m[d]=this.ctx.measureText(k[d]).width,null!=g&&g!=mxConstants.ALIGN_LEFT&&(q[d]-=m[d],g==mxConstants.ALIGN_CENTER&&(q[d]+=m[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=q[0];g=m[0];for(d=1;d<k.length;d++)b=Math.min(b,q[d]),g=Math.max(g,m[d]);this.ctx.save();
+b=Math.round(b)-.5;l=Math.round(l)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,l,g,this.state.fontSize*mxConstants.LINE_HEIGHT*k.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,l,g,this.state.fontSize*mxConstants.LINE_HEIGHT*k.length));this.ctx.restore()}for(d=0;d<k.length;d++)this.ctx.fillText(k[d],q[d],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};DrawioClient=function(b,e){mxEventSource.call(this);this.ui=b;this.cookieName=e;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(b){this.user=b;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+b.toUTCString()}};
DrawioClient.prototype.getPersistentToken=function(b){var e=null;isLocalStorage&&(e=localStorage.getItem("."+this.cookieName),null==e&&b&&(e=sessionStorage.getItem("."+this.cookieName)));if(null==e&&"undefined"!=typeof Storage){var d=document.cookie;b=this.cookieName+"=";var c=d.indexOf(b);0<=c&&(c+=b.length,e=d.indexOf(";",c),0>e?e=d.length:postCookie=d.substring(e),e=d.substring(c,e),e=0<e.length?e:null,null!=e&&isLocalStorage&&(d=new Date,d.setYear(d.getFullYear()-1),document.cookie=b+"; expires="+
-d.toUTCString(),localStorage.setItem("."+this.cookieName,e)))}return e};DrawioClient.prototype.setPersistentToken=function(b,e){try{if(null!=b)if(isLocalStorage)e?sessionStorage.setItem("."+this.cookieName,b):localStorage.setItem("."+this.cookieName,b);else{if("undefined"!=typeof Storage){var d=new Date;d.setYear(d.getFullYear()+10);var c=this.cookieName+"="+b+"; path=/"+(e?"":"; expires="+d.toUTCString());"https"==document.location.protocol.toLowerCase()&&(c+=";secure");document.cookie=c}}else this.clearPersistentToken()}catch(g){this.ui.handleError(g)}};DrawioUser=function(b,e,d,c,g){this.id=b;this.email=e;this.displayName=d;this.pictureUrl=c;this.locale=g};DriveFile=function(b,e,d){DrawioFile.call(this,b,e);this.desc=d};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
+d.toUTCString(),localStorage.setItem("."+this.cookieName,e)))}return e};DrawioClient.prototype.setPersistentToken=function(b,e){try{if(null!=b)if(isLocalStorage)e?sessionStorage.setItem("."+this.cookieName,b):localStorage.setItem("."+this.cookieName,b);else{if("undefined"!=typeof Storage){var d=new Date;d.setYear(d.getFullYear()+10);var c=this.cookieName+"="+b+"; path=/"+(e?"":"; expires="+d.toUTCString());"https"==document.location.protocol.toLowerCase()&&(c+=";secure");document.cookie=c}}else this.clearPersistentToken()}catch(k){this.ui.handleError(k)}};DrawioUser=function(b,e,d,c,k){this.id=b;this.email=e;this.displayName=d;this.pictureUrl=c;this.locale=k};DriveFile=function(b,e,d){DrawioFile.call(this,b,e);this.desc=d};mxUtils.extend(DriveFile,DrawioFile);DriveFile.prototype.saveDelay=0;DriveFile.prototype.allChangesSavedKey="allChangesSavedInDrive";DriveFile.prototype.getSize=function(){return this.desc.fileSize};DriveFile.prototype.isRestricted=function(){return null!=this.desc.userPermission&&null!=this.desc.labels&&"reader"==this.desc.userPermission.role&&this.desc.labels.restricted};
DriveFile.prototype.isConflict=function(b){return null!=b&&null!=b.error&&412==b.error.code};DriveFile.prototype.getCurrentUser=function(){return null!=this.ui.drive?this.ui.drive.user:null};DriveFile.prototype.getMode=function(){return App.MODE_GOOGLE};
DriveFile.prototype.getPublicUrl=function(b){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 d=0;d<e.items.length;d++)if("anyoneWithLink"===e.items[d].id||"anyone"===e.items[d].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(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(b,e,d,c,g){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,e,d,c,g)}),d,c,g])};
-DriveFile.prototype.saveFile=function(b,e,d,c,g,k){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(b,f){var l=mxUtils.bind(this,function(k,n){try{var m=this.desc;this.ui.drive.saveFile(this,n,mxUtils.bind(this,function(b,g){try{this.savingFile=!1,0!=b?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=Math.round(Math.min(1E4,
-Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=b,null!=f?this.fileSaved(g,m,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d(b)}),c,f):null!=d&&d(b)):null!=c&&c(b)}catch(v){if(this.savingFile=!1,null!=c)c(v);else throw v;}}),mxUtils.bind(this,function(b,d){try{this.savingFile=!1,this.isConflict(b)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(d,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();
-this.setShadowModified(!1);l(k,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(b)}catch(v){if(this.savingFile=!1,null!=c)c(v);else throw v;}}),g,g,k,null,b)}catch(t){if(this.savingFile=!1,null!=c)c(t);else throw t;}});l(k,e)}))):null!=d&&d()}catch(n){if(null!=c)c(n);else throw n;}};
+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(b,e,d,c,k){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,e,d,c,k)}),d,c,k])};
+DriveFile.prototype.saveFile=function(b,e,d,c,k,g){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(b,f){var l=mxUtils.bind(this,function(g,m){try{var n=this.desc;this.ui.drive.saveFile(this,m,mxUtils.bind(this,function(b,g){try{this.savingFile=!1,0!=b?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),this.autosaveDelay=Math.round(Math.min(1E4,
+Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=b,null!=f?this.fileSaved(g,n,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d(b)}),c,f):null!=d&&d(b)):null!=c&&c(b)}catch(v){if(this.savingFile=!1,null!=c)c(v);else throw v;}}),mxUtils.bind(this,function(b,d){try{this.savingFile=!1,this.isConflict(b)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(d,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();
+this.setShadowModified(!1);l(g,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(b)}catch(v){if(this.savingFile=!1,null!=c)c(v);else throw v;}}),k,k,g,null,b)}catch(t){if(this.savingFile=!1,null!=c)c(t);else throw t;}});l(g,e)}))):null!=d&&d()}catch(m){if(null!=c)c(m);else throw m;}};
DriveFile.prototype.copyFile=function(b,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,b,e)}catch(d){e(d)}}),e,!0)};
DriveFile.prototype.makeCopy=function(b,e,d){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,d),mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.backupPatch=null;this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))};DriveFile.prototype.saveAs=function(b,e,d){this.ui.drive.copyFile(this.getId(),b,e,d)};
-DriveFile.prototype.rename=function(b,e,d){var c=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(g){this.hasSameExtension(b,this.getTitle())?(this.desc=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(g)):(this.desc=g,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,d))}),d)};
+DriveFile.prototype.rename=function(b,e,d){var c=this.getCurrentEtag();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(k){this.hasSameExtension(b,this.getTitle())?(this.desc=k,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(k)):(this.desc=k,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,d))}),d)};
DriveFile.prototype.move=function(b,e,d){this.ui.drive.moveFile(this.getId(),b,mxUtils.bind(this,function(b){this.desc=b;this.descriptorChanged();null!=e&&e(b)}),d)};DriveFile.prototype.share=function(){this.ui.drive.showPermissions(this.getId())};DriveFile.prototype.getTitle=function(){return this.desc.title};DriveFile.prototype.getHash=function(){return"G"+this.getId()};DriveFile.prototype.getId=function(){return this.desc.id};
DriveFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&this.desc.editable};DriveFile.prototype.isSyncSupported=function(){return!0};DriveFile.prototype.isRevisionHistorySupported=function(){return!0};
DriveFile.prototype.getRevisions=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/revisions"},mxUtils.bind(this,function(d){for(var c=0;c<d.items.length;c++)mxUtils.bind(this,function(b){b.title=b.originalFilename;b.getXml=mxUtils.bind(this,function(c,d){this.ui.drive.getXmlFile(b,mxUtils.bind(this,function(b){c(b.getData())}),d)});b.getUrl=mxUtils.bind(this,function(c){return this.ui.getUrl(window.location.pathname+"?rev="+b.id+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=
@@ -11094,286 +11098,287 @@ c?"&page="+c:""))+window.location.hash})})(d.items[c]);b(d.items)}),e)};DriveFil
DriveFile.prototype.getDescriptor=function(){return this.desc};DriveFile.prototype.setDescriptor=function(b){this.desc=b};DriveFile.prototype.getDescriptorSecret=function(b){return this.ui.drive.getCustomProperty(b,"secret")};DriveFile.prototype.setDescriptorRevisionId=function(b,e){b.headRevisionId=e};DriveFile.prototype.getDescriptorRevisionId=function(b){return b.headRevisionId};DriveFile.prototype.getDescriptorEtag=function(b){return b.etag};
DriveFile.prototype.setDescriptorEtag=function(b,e){b.etag=e};DriveFile.prototype.loadPatchDescriptor=function(b,e){this.ui.drive.executeRequest({url:"/files/"+this.getId()+"?supportsAllDrives=true&fields="+this.ui.drive.catchupFields},mxUtils.bind(this,function(d){b(d)}),e)};DriveFile.prototype.patchDescriptor=function(b,e){b.headRevisionId=e.headRevisionId;b.modifiedDate=e.modifiedDate;DrawioFile.prototype.patchDescriptor.apply(this,arguments)};
DriveFile.prototype.loadDescriptor=function(b,e){this.ui.drive.loadDescriptor(this.getId(),b,e)};DriveFile.prototype.commentsSupported=function(){return!0};
-DriveFile.prototype.getComments=function(b,e){function d(b,e,n){if(e.deleted)return null;n=new DriveComment(b,e.commentId||e.replyId,e.content,e.modifiedDate,e.createdDate,"resolved"==e.status,e.author.isAuthenticatedUser?c:new DrawioUser(e.author.permissionId,e.author.emailAddress,e.author.displayName,e.author.picture.url),n);for(var f=0;null!=e.replies&&f<e.replies.length;f++)n.addReplyDirect(d(b,e.replies[f],e.commentId));return n}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
-this.getId()+"/comments"},mxUtils.bind(this,function(c){for(var e=[],g=0;g<c.items.length;g++){var f=d(this,c.items[g]);null!=f&&e.push(f)}b(e)}),e)};DriveFile.prototype.addComment=function(b,e,d){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(b){e(b.commentId)}),d)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
+DriveFile.prototype.getComments=function(b,e){function d(b,e,m){if(e.deleted)return null;m=new DriveComment(b,e.commentId||e.replyId,e.content,e.modifiedDate,e.createdDate,"resolved"==e.status,e.author.isAuthenticatedUser?c:new DrawioUser(e.author.permissionId,e.author.emailAddress,e.author.displayName,e.author.picture.url),m);for(var f=0;null!=e.replies&&f<e.replies.length;f++)m.addReplyDirect(d(b,e.replies[f],e.commentId));return m}var c=this.ui.getCurrentUser();this.ui.drive.executeRequest({url:"/files/"+
+this.getId()+"/comments"},mxUtils.bind(this,function(c){for(var e=[],k=0;k<c.items.length;k++){var f=d(this,c.items[k]);null!=f&&e.push(f)}b(e)}),e)};DriveFile.prototype.addComment=function(b,e,d){b={content:b.content};this.ui.drive.executeRequest({url:"/files/"+this.getId()+"/comments",method:"POST",params:b},mxUtils.bind(this,function(b){e(b.commentId)}),d)};DriveFile.prototype.canReplyToReplies=function(){return!1};DriveFile.prototype.canComment=function(){return this.desc.canComment};
DriveFile.prototype.newComment=function(b,e){return new DriveComment(this,null,b,Date.now(),Date.now(),!1,e)};DriveLibrary=function(b,e,d){DriveFile.call(this,b,e,d)};mxUtils.extend(DriveLibrary,DriveFile);DriveLibrary.prototype.isAutosave=function(){return!0};DriveLibrary.prototype.save=function(b,e,d){this.ui.drive.saveFile(this,b,mxUtils.bind(this,function(b){this.desc=b;null!=e&&e(b)}),d)};DriveLibrary.prototype.open=function(){};(function(){var b=null,e={};window.DriveClient=function(b,c){null==c&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(c=!0);mxEventSource.call(this);DrawioClient.call(this,b,"gDriveAuthInfo");this.isExtAuth=c;this.ui=b;this.xmlMimeType="application/vnd.jgraph.mxfile";this.mimeType="application/vnd.jgraph.mxfile.realtime";this.ui.editor.chromeless&&!this.ui.editor.editable&&"1"!=urlParams.rt&&"1"!=urlParams.extAuth?(this.cookieName="gDriveViewerAuthInfo",this.token=this.getPersistentToken(),
this.appId=window.DRAWIO_GOOGLE_VIEWER_APP_ID||"850530949725",this.clientId=window.DRAWIO_GOOGLE_VIEWER_CLIENT_ID||"850530949725.apps.googleusercontent.com",this.scopes=["https://www.googleapis.com/auth/drive.readonly","https://www.googleapis.com/auth/userinfo.profile"]):(this.appId=window.DRAWIO_GOOGLE_APP_ID||"671128082532",this.clientId=window.DRAWIO_GOOGLE_CLIENT_ID||"671128082532-jhphbq6d0e1gnsus9mn7vf8a6fjn10mp.apps.googleusercontent.com");this.mimeTypes=this.xmlMimeType+",application/mxe,application/mxr,application/vnd.jgraph.mxfile.realtime,application/vnd.jgraph.mxfile.rtlegacy";
var d=JSON.parse(this.token);null!=d&&null!=d.current&&(this.userId=d.current.userId,this.authCalled=!1)};mxUtils.extend(DriveClient,mxEventSource);mxUtils.extend(DriveClient,DrawioClient);DriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/google";DriveClient.prototype.GDriveBaseUrl="https://www.googleapis.com/drive/v2";DriveClient.prototype.scopes=["https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive.install","https://www.googleapis.com/auth/userinfo.profile"];
DriveClient.prototype.allFields="kind,id,parents,headRevisionId,etag,title,mimeType,modifiedDate,editable,copyable,canComment,labels,properties,downloadUrl,webContentLink,userPermission,fileSize";DriveClient.prototype.catchupFields="etag,headRevisionId,modifiedDate,properties(key,value)";DriveClient.prototype.enableThumbnails=!0;DriveClient.prototype.thumbnailWidth=1E3;DriveClient.prototype.maxThumbnailSize=2E6;DriveClient.prototype.placeholderThumbnail="iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAACN1BMVEXwhwXvhgX4iwXzhwXgbQzvhgXhbAzocgzqcwzldAoAAADhbgvjcQnmdgrlbgDwhgXsfwXufgjwhgXwgQfziAXxgADibgz4iwX4jAX3iwTpcwr1igXoewjsfgj3igX4iwXqcQv4jAX3iwXtfQnndQrvhAbibArwhwXgbQz//////v39jwX6jQX+/v7fagHfawzdVQDwhADgbhPgbhXwhwPocQ3uvKvwiA/faQDscgzxiAT97+XgciTgcSP6jAXgbQ3gcCHwiRfpcQzwhwfeXQD77ef74NLvhgTvegD66uPgbAf66+TvfADwjCzgcCfwiSD67ObhcjjwiBHhczvwiyrgbxj///777ujgcSHgcB/xiRzgbhveWgDeVwDhdEDgbRDqfgffYgDfXwD97+bvfQDxiz7//vvwiRr118rrcgztggbfZgDfZAD++PT98+3gbBPsgAb99vD33tPgcB7icAvuhAX//Pn66N/00sTyy7vuuqbjekLwhwzkcgr88er449n++vfutp/kh1vgcBvhbwvmdwnwgwDwgADeWQD87eLxxrTssJjqpIf0roHmjWTkhFP759n63czvvanomnjnlHDhczD22cr4y6/wwa/3xKX2wJ3rqpH0tY7qp4vpnoDymlbjf0vxjjntcwzldAroegj/kgX12s7518PzqnnnkWfynmLieUjpewjrdAD40Lj1uZTzpm3idTbiciLydQzzfwnyiQTsfgD3xqnzp3TxlkzgbCrdTwDdSwBLKUlNAAAAJ3RSTlP8/b2X/YH8wb+FAIuIggJbQin5opAM9+a/ubaubyD78NjSyr2WgRp4sjN4AAAI70lEQVR42u2cZ38SQRDGT8WGvfde4E4BxVMRRaKiUURRlJhQRDCCSgQVO/bee++9994+nMt5ywoezFJd/fm8uITi3p9n5mbYkcCpO6rVnVu2YEXd+3dRIySuo7pLv4GjGNKg7j3UHTl1l14PajmG9OFBnx7Ird4PumpYEtf1QXc112l0M7OGKXEfeg3guo3iNIyJG92Jaz61mYYxcaNacs1H/8f6j6X5j1WI/mMVIsawRFEzI49SjwOqAJa43emclk8Rp2c7AFZ+LDGyvXE2kmO2Q1Lq17RSd6ND48QIwFVuLNHTOPbEpTOz8ujMpccHGz0AV5mxIo4TpwUeUPj0YwfAVVYs0Tn7VZjnBUA8v+n6CyfERY8FR/DEJj7MQ6oL85vOvfDUAsuVC8s19s5yXuAppOPnvPk4EeSCsehCeBVTwVzHfE6RcFUQa4an8Qw91kpbw2oz4aoc1sSxniO0WAI/J24wriabmEpizZtM79bc+fr4/tUarEpiLabGElJYRsOGjbJfjGDpJCxtmosRLOEnVpqLESzZLYlLg65H1rAkLo2GESwcROwXI1jELcS1Y6OGQSzEVaupZQJLDiLhYtCtFBcbbslYhOueqKllDwtzwVhTq4RFuBh0C3EdEBl0C3OBWNUrEISLvSD+5GLQLYmLoSqfwcUiFuaqzhYDxiJc981lxqqdVsCGbHPcQLBgrtK3rwLt9tWqhblKxxI9hW3267U5ZHhuBrCKzXl4NIJTS5FrmbmMWGIEDZIouOp0/O6boYQ2jxBXWcdu13fzRILuF/2Ku+aGr96uBbhALHo5Z38+XcfXyVRZVx/+Ed513ldDCCCu0rFE0Xlo2mu5TAj8ki0XV0q6ePHilhi+d/15b9ACQGGusg3AFzc+XSMBCPzu89+CNlnB7zfD8t1z4iaLXUvDVT6sGdMOnv5pi47f6r9Qk9YF3xZ0l8S11UfMArlgLMpZM6bamYy6rWnta9q7TrZrzZPgPgoqg3atubY8WK6D8lQXHfb4p/wSK7vFfxmxSsAPQ96AlZ4LxoLNeompdkUDGQVznL5mLr4ar5ESD3PBWHA9fbpbjlT4pq1Bm6H6w9dwfOd69ePouNDYt3S3ULPGZ96S3YqtAW/Tepz1E8bgAANc+xEXhAX36ut1cslcd6rJq81SIvgEe7lmL3kY5iqxVYvOI9isswp22KeMOcrriJlWai5giwHl+yec73Ma9Mbfz+qOJndKz6hLpR5V1uPxavFuTTt0K1XfpbNeO0wKeUaR2IPBN5sMRlqu1eY8bsFmPeIFUpi0CjIGTLvSZY2EGeYSi3VL9Dgeb0I+SQl9MlcZT4TObZKzfmfS5NZSx1GsLQ5r+8Sxp7ERR/1TtDlUn2qNuGXCrZGM5URlLDiEVzDVkje5fdjXdDsm27XpXChBz4XG0UpYcDOMYaxjGc3wtyJxFtu1PohaI71f2K2imqEONcN4nrMZ9TWbMf81wg9z3VNwC26Gr3enY4ObobLqbccFefuz5AKONpVfzQp2y3NoVvrN32GLNl9orA22lTiM+Nqg5CJY1DueOjkwsdtNgAP7gidR2SWVhFqt3o9QwoKHIuiwDcwX+xT/UWztSlvCaqXGmtQBY1GadQmfh6anuE0XlkhhRFs3tGGkd+tuIVhiJN0M+brj0mlAu46lX0bcbizVLbgZrgwl4JhYA+NQa9TJQUetsSJYHscJvAVct7eJKoUbQudxPYmdirqzsYsIojhjoitD01yadH287J+vpZF1/uGt2K4ttinjshQo2C2XMzI2U64X6WY4tyZq99a7wZS3eA3BpNyrUPn1x00Z0uM1ACzilOfg7EN3VmRo8dN16WYYerYw6G9qCOSDCjQ0jQkufRbalt65LVyapaA/2mClxhK3Rxy3rsyavDxDR/DL5sMLFiyYu/7sXps7z8VldPv2Xl6PnjlTwOOuJQuytH7CXpvXCOQWoZrYeHWd4nw2Q+v22OLGnFSG0Nk1PCi0xjgjpVvTGi8hht9F+ARBGq8dtXmtOSLoDm1FhUSHnihkTecESalHkPAaWVhtFbA8jqvQGBmbt8fWkKtNn0Xw9GvAWK6DX9bBVHjzqtyvvcG9a+jXyC5oKoKV/a4YFG7Yij2ofszlgtaA3ZoRwW+pIOH3w0qZFURNh3oNtKsDsAr9LNvMC0pj93H6hTPpX9ocg8FIgTVvcgFYC03jFLBMi6ix0MDAoi8/lh7Cgt2q0VfNrSX0ayhjTa2IW0tKdotNrMq4NbPkILKZW+xdiSoGgshogfh7Ul7FcIEoFevfrPLC3+XWf6y/CEvHZoFQqlts9sQigqjLxFpQCJauakFcsqhKPXH79rGb6bE2B5Qmu0b91zn0WJtN8Wys9tgtIqfjEf2SWw7XKI8gHuKQ0X0eDsQSI44TaGBN6dYN5dlI/eFj9I7f8GWtoUJYOIgkiq6Ds/gw5T7dZDUqTrfscbLbB9eIB7JmEKsUgiii/4uO8ToBfJlhfif5tEGWEsGTMT4Mr6HDa0BBlP5Y88lcnkdkCtLhnyjMM0+Gcn2WzW6xnd/J8zn+LZq4SUeEvUBaA8LCs6Tk1p1AetXt3JoMWexWZSyr3RK6vSUGrRHbmkRUVgCLpP1HW/L4tgl5tO140mdKKFFhrkTUdxta4xleA8DCXC6n/vCYvPJFa9zAWL4m6qNaA8IiqjW73lreWnJrSj0AJYFZpvwq6RZRzjVUGEtB5tX7DdoqCXaL+PXHuEjdYsuvVqva4Sqv6NdabdW4YLeIKsoFYzHGhYPIGBd2izGuVpPaSVgAV7VEsOQgsuUXdosxLuwWxLVMW0WRK5ExLiiIpN4vq2YYVTiIbPmFgii5xRiXimCBqmIcVSS3WMqvdMqz5VcKqzdKeca4UrnVT/ryR6bi2Opuf64TwYJlfl4FLqu2Zxeux5BRXZnisvZ8103NqTtzoziuGa24+wZVRdVK9W7wyNSX1nYeOmrU6JSmjp6KhH5BR+kGvk++Ld0c/X66rPH4SEQeGl+kpq8a33eAumPqK347durWpzm9hrWhUevi1Hd4ZzVC+gGMHY0TYnDOYwAAAABJRU5ErkJggg==".replace(/\+/g,
"-").replace(/\//g,"_");DriveClient.prototype.placeholderMimeType="image/png";DriveClient.prototype.libraryMimeType="application/vnd.jgraph.mxlibrary";DriveClient.prototype.newAppHostname="www.draw.io";DriveClient.prototype.extension=".drawio";DriveClient.prototype.tokenRefreshInterval=0;DriveClient.prototype.lastTokenRefresh=0;DriveClient.prototype.maxRetries=5;DriveClient.prototype.staleEtagMaxRetries=3;DriveClient.prototype.coolOff=1E3;DriveClient.prototype.mimeTypeCheckCoolOff=6E4;DriveClient.prototype.user=
null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(b){this.user=b;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=b.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(b){this.userId=b;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=
-function(){return this.user};DriveClient.prototype.getUsersList=function(){var b=[],c=JSON.parse(this.getPersistentToken(!0)),e=null;if(null!=c){null!=c.current&&(e=c.current.userId,b.push(c[e].user),b[0].isCurrent=!0);for(var k in c)"current"!=k&&k!=e&&b.push(c[k].user)}return b};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
+function(){return this.user};DriveClient.prototype.getUsersList=function(){var b=[],c=JSON.parse(this.getPersistentToken(!0)),e=null;if(null!=c){null!=c.current&&(e=c.current.userId,b.push(c[e].user),b[0].isCurrent=!0);for(var g in c)"current"!=g&&g!=e&&b.push(c[g].user)}return b};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();
this.setUser(null);b=null};DriveClient.prototype.execute=function(b){var c=mxUtils.bind(this,function(c){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(c,d){this.authorize(!1,mxUtils.bind(this,function(){null!=d&&d();b()}),mxUtils.bind(this,function(b){var c=mxResources.get("cannotLogin");null!=b&&null!=b.error&&403==b.error.code&&null!=b.error.data&&0<b.error.data.length&&"domainPolicy"==b.error.data[0].reason&&(c=b.error.message);this.logout();this.ui.showError(mxResources.get("error"),
-c,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),c)}))});this.authorize(!0,b,c)};DriveClient.prototype.executeRequest=function(d,c,e){try{var g=!0,n=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var l=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=d;null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,
-function(){g=!1;null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:l})}),this.ui.timeout);var k=null,p=!1;"string"===typeof d.params?k=d.params:null!=d.params&&(k=JSON.stringify(d.params),p=!0);var q=d.fullUrl||this.GDriveBaseUrl+d.url;p&&(q+=(0<q.indexOf("?")?"&":"?")+"alt=json");var t=new mxXmlRequest(q,k,d.method||"GET");t.setRequestHeaders=mxUtils.bind(this,function(c,e){if(null!=d.headers)for(var f in d.headers)c.setRequestHeader(f,d.headers[f]);else null!=d.contentType?
-c.setRequestHeader("Content-Type",d.contentType):p&&c.setRequestHeader("Content-Type","application/json");c.setRequestHeader("Authorization","Bearer "+b)});t.send(mxUtils.bind(this,function(b){try{if(window.clearTimeout(n),g){var k;try{k=JSON.parse(b.getText())}catch(z){k=null}if(200<=b.getStatus()&&299>=b.getStatus())null!=c&&c(k);else{var m=null!=k&&null!=k.error?null!=k.error.data?k.error.data:k.error.errors:null,p=null!=m&&0<m.length?m[0].reason:null;null==e||null==k||null==k.error||-1!=k.error.code&&
-(403!=k.error.code||"domainPolicy"!=p&&"The requested mime type change is forbidden."!=k.error.message)?null!=k&&null!=k.error&&(401==k.error.code||403==k.error.code&&"rateLimitExceeded"!=p)?403==k.error.code&&this.retryAuth||401==k.error.code&&this.retryAuth&&"authError"==p?(null!=e&&e(k),this.retryAuth=!1):(this.retryAuth=!0,this.execute(l)):null!=k&&null!=k.error&&412!=k.error.code&&404!=k.error.code&&400!=k.error.code&&this.currentRequest==d&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(l,
-Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=e&&e(k):e(k)}}}catch(z){if(null!=e)e(z);else throw z;}}))}catch(u){if(null!=e)e(u);else throw u;}});null!=b&&this.authCalled?l():this.execute(l)}catch(m){if(null!=e)e(m);else throw m;}};DriveClient.prototype.createAuthWin=function(b){return window.open(b?b:"about:blank","gdauth",["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())};
-DriveClient.prototype.authorize=function(b,c,e,k,n){this.isExtAuth&&!b?window.parent.driveAuth(mxUtils.bind(this,function(b){this.updateAuthInfo(b,!0,!0,c,e)}),e):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?this.authorizeStep2(d.getText(),b,c,e,k,n):null!=e&&e(d)}),e)};DriveClient.prototype.updateAuthInfo=function(d,c,e,k,n){b=d.access_token;delete d.access_token;d.expires=Date.now()+1E3*parseInt(d.expires_in);
-d.remember=c;this.resetTokenRefresh(d);this.authCalled=!0;if(e||null==this.user){var f=JSON.stringify(d);this.updateUser(mxUtils.bind(this,function(){var b=JSON.parse(f);this.setPersistentToken(b,!c);null!=k&&k()}),n)}else null!=k&&(this.setPersistentToken(d,!c),k())};DriveClient.prototype.authorizeStep2=function(b,c,e,k,n,f){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var d=
-JSON.parse(this.getPersistentToken(!0));d&&null!=d.current&&(this.userId=d.current.userId)}if(c&&null==this.userId)null!=k&&k();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+b)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?(b=JSON.parse(b.getText()),this.updateAuthInfo(b,!0,!1,e,k)):(0!=b.getStatus()&&this.logout(),null!=k&&k(b))}),k);else{var g=
-"https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(n?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+b+(this.sameWinRedirectUrl?"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(g),
-f=null):null==f?f=this.createAuthWin(g):f.location=g;null!=f&&(window.onGoogleDriveCallback=mxUtils.bind(this,function(b,c){window.onGoogleDriveCallback=null;try{null==b?null!=k&&k({message:mxResources.get("accessDenied")}):this.updateAuthInfo(b,n,!0,e,k)}catch(t){null!=k&&k(t)}finally{null!=c&&c.close()}}),f.focus())}}catch(p){if(null!=k)k(p);else throw p;}};DriveClient.prototype.resetTokenRefresh=function(b){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=
+c,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),c)}))});this.authorize(!0,b,c)};DriveClient.prototype.executeRequest=function(d,c,e){try{var g=!0,k=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var l=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=d;null!=k&&window.clearTimeout(k);k=window.setTimeout(mxUtils.bind(this,
+function(){g=!1;null!=e&&e({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:l})}),this.ui.timeout);var m=null,p=!1;"string"===typeof d.params?m=d.params:null!=d.params&&(m=JSON.stringify(d.params),p=!0);var q=d.fullUrl||this.GDriveBaseUrl+d.url;p&&(q+=(0<q.indexOf("?")?"&":"?")+"alt=json");var t=new mxXmlRequest(q,m,d.method||"GET");t.setRequestHeaders=mxUtils.bind(this,function(c,e){if(null!=d.headers)for(var f in d.headers)c.setRequestHeader(f,d.headers[f]);else null!=d.contentType?
+c.setRequestHeader("Content-Type",d.contentType):p&&c.setRequestHeader("Content-Type","application/json");c.setRequestHeader("Authorization","Bearer "+b)});t.send(mxUtils.bind(this,function(b){try{if(window.clearTimeout(k),g){var m;try{m=JSON.parse(b.getText())}catch(z){m=null}if(200<=b.getStatus()&&299>=b.getStatus())null!=c&&c(m);else{var n=null!=m&&null!=m.error?null!=m.error.data?m.error.data:m.error.errors:null,p=null!=n&&0<n.length?n[0].reason:null;null==e||null==m||null==m.error||-1!=m.error.code&&
+(403!=m.error.code||"domainPolicy"!=p&&"The requested mime type change is forbidden."!=m.error.message)?null!=m&&null!=m.error&&(401==m.error.code||403==m.error.code&&"rateLimitExceeded"!=p)?403==m.error.code&&this.retryAuth||401==m.error.code&&this.retryAuth&&"authError"==p?(null!=e&&e(m),this.retryAuth=!1):(this.retryAuth=!0,this.execute(l)):null!=m&&null!=m.error&&412!=m.error.code&&404!=m.error.code&&400!=m.error.code&&this.currentRequest==d&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(l,
+Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=e&&e(m):e(m)}}}catch(z){if(null!=e)e(z);else throw z;}}))}catch(u){if(null!=e)e(u);else throw u;}});null!=b&&this.authCalled?l():this.execute(l)}catch(n){if(null!=e)e(n);else throw n;}};DriveClient.prototype.createAuthWin=function(b){return window.open(b?b:"about:blank","gdauth",["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())};
+DriveClient.prototype.authorize=function(b,c,e,g,m){this.isExtAuth&&!b?window.parent.driveAuth(mxUtils.bind(this,function(b){this.updateAuthInfo(b,!0,!0,c,e)}),e):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?this.authorizeStep2(d.getText(),b,c,e,g,m):null!=e&&e(d)}),e)};DriveClient.prototype.updateAuthInfo=function(d,c,e,g,m){b=d.access_token;delete d.access_token;d.expires=Date.now()+1E3*parseInt(d.expires_in);
+d.remember=c;this.resetTokenRefresh(d);this.authCalled=!0;if(e||null==this.user){var f=JSON.stringify(d);this.updateUser(mxUtils.bind(this,function(){var b=JSON.parse(f);this.setPersistentToken(b,!c);null!=g&&g()}),m)}else null!=g&&(this.setPersistentToken(d,!c),g())};DriveClient.prototype.authorizeStep2=function(b,c,e,g,m,f){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var d=
+JSON.parse(this.getPersistentToken(!0));d&&null!=d.current&&(this.userId=d.current.userId)}if(c&&null==this.userId)null!=g&&g();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+b)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?(b=JSON.parse(b.getText()),this.updateAuthInfo(b,!0,!1,e,g)):(0!=b.getStatus()&&this.logout(),null!=g&&g(b))}),g);else{var k=
+"https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(m?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+b+(this.sameWinRedirectUrl?"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(k),
+f=null):null==f?f=this.createAuthWin(k):f.location=k;null!=f&&(window.onGoogleDriveCallback=mxUtils.bind(this,function(b,c){window.onGoogleDriveCallback=null;try{null==b?null!=g&&g({message:mxResources.get("accessDenied")}):this.updateAuthInfo(b,m,!0,e,g)}catch(t){null!=g&&g(t)}finally{null!=c&&c.close()}}),f.focus())}}catch(p){if(null!=g)g(p);else throw p;}};DriveClient.prototype.resetTokenRefresh=function(b){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=
null);null!=b&&null==b.error&&0<b.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(b.expires_in),this.lastTokenRefresh=(new Date).getTime(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*b.expires_in))};DriveClient.prototype.checkToken=function(b){var c=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,
function(){b();c&&this.fireEvent(new mxEventObject("disconnected"))})):b()};DriveClient.prototype.updateUser=function(d,c){try{var e={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(b){var e=JSON.parse(b);this.executeRequest({url:"/about"},mxUtils.bind(this,function(b){var c=mxResources.get("notAvailable"),f=c,g=null;null!=b&&null!=b.user&&(c=b.user.emailAddress,f=b.user.displayName,g=null!=b.user.picture?b.user.picture.url:
-null);this.setUser(new DrawioUser(e.id,c,f,g,e.locale));this.userId=e.id;null!=d&&d()}),c)}),c,null,null,null,null,e)}catch(k){if(null!=c)c(k);else throw k;}};DriveClient.prototype.copyFile=function(b,c,e,k){null!=b&&null!=c&&this.executeRequest({url:"/files/"+b+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},e,k)};DriveClient.prototype.renameFile=function(b,c,e,k){null!=
-b&&null!=c&&this.executeRequest(this.createDriveRequest(b,{title:c}),e,k)};DriveClient.prototype.moveFile=function(b,c,e,k){null!=b&&null!=c&&this.executeRequest(this.createDriveRequest(b,{parents:[{kind:"drive#fileLink",id:c}]}),e,k)};DriveClient.prototype.createDriveRequest=function(b,c){return{url:"/files/"+b+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(b,c,e){return this.getFile(b,
-c,e,!0,!0)};DriveClient.prototype.loadDescriptor=function(b,c,e,k){this.executeRequest({url:"/files/"+b+"?supportsAllDrives=true&fields="+(null!=k?k:this.allFields)},c,e)};DriveClient.prototype.listFiles=function(b,c,e,k,n){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(b?" and (title contains '"+b+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(e?" and ('me' in owners)":""))+
-"&orderBy=modifiedDate desc,title"},k,n)};DriveClient.prototype.getCustomProperty=function(b,c){var d=b.properties,e=null;if(null!=d)for(var n=0;n<d.length;n++)if(d[n].key==c){e=d[n].value;break}return e};DriveClient.prototype.getFile=function(d,c,e,k,n){k=null!=k?k:!1;n=null!=n?n:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+d+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(b){b.title=b.originalFilename;b.headRevisionId=b.id;b.id=d;this.getXmlFile(b,
-c,e)}),e):this.loadDescriptor(d,mxUtils.bind(this,function(d){try{if(null!=this.user){var f=/\.png$/i.test(d.title);/\.v(dx|sdx?)$/i.test(d.title)||/\.gliffy$/i.test(d.title)||!this.ui.useCanvasForExport&&f?this.ui.convertFile(d.downloadUrl,d.title,d.mimeType,this.extension,c,e,null,{Authorization:"Bearer "+b}):k||n||d.mimeType==this.libraryMimeType||d.mimeType==this.xmlMimeType?this.getXmlFile(d,c,e,!0,n):this.getXmlFile(d,c,e)}else e({message:mxResources.get("loggedOut")})}catch(m){if(null!=e)e(m);
-else throw m;}}),e)};DriveClient.prototype.isGoogleRealtimeMimeType=function(b){return null!=b&&"application/vnd.jgraph.mxfile."==b.substring(0,30)};DriveClient.prototype.getXmlFile=function(d,c,e,k,n){try{var f={Authorization:"Bearer "+b},g=d.downloadUrl;if(null==g)null!=e&&e({message:mxResources.get("exportOptionsDisabledDetails")});else{var m=0,p=mxUtils.bind(this,function(){this.ui.editor.loadUrl(g,mxUtils.bind(this,function(b){try{if(null==b)e({message:mxResources.get("invalidOrMissingFile")});
-else if(d.mimeType==this.libraryMimeType||n)d.mimeType!=this.libraryMimeType||n?c(new DriveLibrary(this.ui,b,d)):e({message:mxResources.get("notADiagramFile")});else{var f=!1;if(/\.png$/i.test(d.title)){var k=b.lastIndexOf(",");if(0<k){var l=this.ui.extractGraphModelFromPng(b);if(null!=l&&0<l.length)b=l;else try{var l=b.substring(k+1),m=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(l):atob(l),p=this.ui.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0);null==p||0<p.getElementsByTagName("parsererror").length?
-f=!0:b=m}catch(z){f=!0}}}else/\.pdf$/i.test(d.title)?(l=Editor.extractGraphModelFromPdf(b),null!=l&&0<l.length&&(f=!0,b=l)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(m=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,g)?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?c(new LocalFile(this.ui,
-b.responseText,d.title+this.extension,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}catch(y){if(null!=e)e(y);else throw y;}}),d.title):c(f?new LocalFile(this.ui,b,d.title,!0):new DriveFile(this.ui,b,d))}}catch(z){if(null!=e)e(z);else throw z;}}),mxUtils.bind(this,function(b,c){if(m<this.maxRetries&&null!=c&&403==c.getStatus())m++,window.setTimeout(p,2*m*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=e)e(b);else throw b;}),null!=d.mimeType&&"image/"==d.mimeType.substring(0,
-6)&&"image/svg"!=d.mimeType.substring(0,9)||/\.png$/i.test(d.title)||/\.jpe?g$/i.test(d.title)||/\.pdf$/i.test(d.title),null,null,null,f)});p()}}catch(q){if(null!=e)e(q);else throw q;}};DriveClient.prototype.saveFile=function(b,c,e,k,n,f,l,m,p){try{var d=0;b.saveLevel=1;var g=mxUtils.bind(this,function(c){if(null!=k)k(c);else throw c;try{if(!b.isConflict(c)){var d="sl_"+b.saveLevel+"-error_"+(b.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
-b.getHash()+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}}catch(J){}}),u=mxUtils.bind(this,function(b){g(b);try{EditorUi.logError(b.message,null,null,
-b)}catch(F){}});if(b.isEditable()&&null!=b.desc){var v=(new Date).getTime(),x=b.desc.etag,A=b.desc.modifiedDate,z=b.desc.headRevisionId,y=this.ui.useCanvasForExport&&/(\.png)$/i.test(b.getTitle());f=null!=f?f:!1;var B=null,C=!1,D={mimeType:b.desc.mimeType,title:b.getTitle()};if(this.isGoogleRealtimeMimeType(D.mimeType))D.mimeType=this.xmlMimeType,B=b.desc,C=c=!0;else if("application/octet-stream"==D.mimeType||"1"==urlParams["override-mime"]&&D.mimeType!=this.xmlMimeType)D.mimeType=this.xmlMimeType;
-var E=mxUtils.bind(this,function(k,n,q){try{b.saveLevel=3;b.constructor==DriveFile&&(null==m&&(m=[]),null==b.getChannelId()&&m.push({key:"channel",value:Editor.guid(32)}),null==b.getChannelKey()&&m.push({key:"key",value:Editor.guid(32)}),m.push({key:"secret",value:null!=p?p:Editor.guid(32)}));q||(null!=k||f||(k=this.placeholderThumbnail,n=this.placeholderMimeType),null!=k&&null!=n&&(D.thumbnail={image:k,mimeType:n}));var t=b.getData(),F=mxUtils.bind(this,function(d){try{if(b.saveDelay=(new Date).getTime()-
-v,b.saveLevel=11,null==d)g({message:mxResources.get("errorSavingFile")+": Empty response"});else{var f=(new Date(d.modifiedDate)).getTime()-(new Date(A)).getTime();if(0>=f||x==d.etag||c&&z==d.headRevisionId){b.saveLevel=12;var k=[];0>=f&&k.push("invalid modified time");x==d.etag&&k.push("stale etag");c&&z==d.headRevisionId&&k.push("stale revision");var l=k.join(", ");g({message:mxResources.get("errorSavingFile")+": "+l},d);try{EditorUi.logError("Critical: Error saving to Google Drive "+b.desc.id,
+null);this.setUser(new DrawioUser(e.id,c,f,g,e.locale));this.userId=e.id;null!=d&&d()}),c)}),c,null,null,null,null,e)}catch(g){if(null!=c)c(g);else throw g;}};DriveClient.prototype.copyFile=function(b,c,e,g){null!=b&&null!=c&&this.executeRequest({url:"/files/"+b+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},e,g)};DriveClient.prototype.renameFile=function(b,c,e,g){null!=
+b&&null!=c&&this.executeRequest(this.createDriveRequest(b,{title:c}),e,g)};DriveClient.prototype.moveFile=function(b,c,e,g){null!=b&&null!=c&&this.executeRequest(this.createDriveRequest(b,{parents:[{kind:"drive#fileLink",id:c}]}),e,g)};DriveClient.prototype.createDriveRequest=function(b,c){return{url:"/files/"+b+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(b,c,e){return this.getFile(b,
+c,e,!0,!0)};DriveClient.prototype.loadDescriptor=function(b,c,e,g){this.executeRequest({url:"/files/"+b+"?supportsAllDrives=true&fields="+(null!=g?g:this.allFields)},c,e)};DriveClient.prototype.listFiles=function(b,c,e,g,m){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+"') "+(b?" and (title contains '"+b+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(e?" and ('me' in owners)":""))+
+"&orderBy=modifiedDate desc,title"},g,m)};DriveClient.prototype.getCustomProperty=function(b,c){var d=b.properties,e=null;if(null!=d)for(var m=0;m<d.length;m++)if(d[m].key==c){e=d[m].value;break}return e};DriveClient.prototype.getFile=function(d,c,e,g,m){g=null!=g?g:!1;m=null!=m?m:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+d+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(b){b.title=b.originalFilename;b.headRevisionId=b.id;b.id=d;this.getXmlFile(b,
+c,e)}),e):this.loadDescriptor(d,mxUtils.bind(this,function(d){try{if(null!=this.user){var f=/\.png$/i.test(d.title);/\.v(dx|sdx?)$/i.test(d.title)||/\.gliffy$/i.test(d.title)||!this.ui.useCanvasForExport&&f?this.ui.convertFile(d.downloadUrl,d.title,d.mimeType,this.extension,c,e,null,{Authorization:"Bearer "+b}):g||m||d.mimeType==this.libraryMimeType||d.mimeType==this.xmlMimeType?this.getXmlFile(d,c,e,!0,m):this.getXmlFile(d,c,e)}else e({message:mxResources.get("loggedOut")})}catch(n){if(null!=e)e(n);
+else throw n;}}),e)};DriveClient.prototype.isGoogleRealtimeMimeType=function(b){return null!=b&&"application/vnd.jgraph.mxfile."==b.substring(0,30)};DriveClient.prototype.getXmlFile=function(d,c,e,g,m){try{var f={Authorization:"Bearer "+b},k=d.downloadUrl;if(null==k)null!=e&&e({message:mxResources.get("exportOptionsDisabledDetails")});else{var n=0,p=mxUtils.bind(this,function(){this.ui.editor.loadUrl(k,mxUtils.bind(this,function(b){try{if(null==b)e({message:mxResources.get("invalidOrMissingFile")});
+else if(d.mimeType==this.libraryMimeType||m)d.mimeType!=this.libraryMimeType||m?c(new DriveLibrary(this.ui,b,d)):e({message:mxResources.get("notADiagramFile")});else{var f=!1;if(/\.png$/i.test(d.title)){var g=b.lastIndexOf(",");if(0<g){var l=this.ui.extractGraphModelFromPng(b);if(null!=l&&0<l.length)b=l;else try{var l=b.substring(g+1),n=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(l):atob(l),p=this.ui.editor.extractGraphModel(mxUtils.parseXml(n).documentElement,!0);null==p||0<p.getElementsByTagName("parsererror").length?
+f=!0:b=n}catch(z){f=!0}}}else/\.pdf$/i.test(d.title)?(l=Editor.extractGraphModelFromPdf(b),null!=l&&0<l.length&&(f=!0,b=l)):"data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)&&(n=b.substring(22),b=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,k)?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?c(new LocalFile(this.ui,
+b.responseText,d.title+this.extension,!0)):null!=e&&e({message:mxResources.get("errorLoadingFile")}))}catch(y){if(null!=e)e(y);else throw y;}}),d.title):c(f?new LocalFile(this.ui,b,d.title,!0):new DriveFile(this.ui,b,d))}}catch(z){if(null!=e)e(z);else throw z;}}),mxUtils.bind(this,function(b,c){if(n<this.maxRetries&&null!=c&&403==c.getStatus())n++,window.setTimeout(p,2*n*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=e)e(b);else throw b;}),null!=d.mimeType&&"image/"==d.mimeType.substring(0,
+6)&&"image/svg"!=d.mimeType.substring(0,9)||/\.png$/i.test(d.title)||/\.jpe?g$/i.test(d.title)||/\.pdf$/i.test(d.title),null,null,null,f)});p()}}catch(q){if(null!=e)e(q);else throw q;}};DriveClient.prototype.saveFile=function(b,c,e,g,m,f,l,n,p){try{var d=0;b.saveLevel=1;var k=mxUtils.bind(this,function(c){if(null!=g)g(c);else throw c;try{if(!b.isConflict(c)){var d="sl_"+b.saveLevel+"-error_"+(b.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
+b.getHash()+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}}catch(J){}}),u=mxUtils.bind(this,function(b){k(b);try{EditorUi.logError(b.message,null,null,
+b)}catch(E){}});if(b.isEditable()&&null!=b.desc){var v=(new Date).getTime(),x=b.desc.etag,A=b.desc.modifiedDate,z=b.desc.headRevisionId,y=this.ui.useCanvasForExport&&/(\.png)$/i.test(b.getTitle());f=null!=f?f:!1;var B=null,C=!1,D={mimeType:b.desc.mimeType,title:b.getTitle()};if(this.isGoogleRealtimeMimeType(D.mimeType))D.mimeType=this.xmlMimeType,B=b.desc,C=c=!0;else if("application/octet-stream"==D.mimeType||"1"==urlParams["override-mime"]&&D.mimeType!=this.xmlMimeType)D.mimeType=this.xmlMimeType;
+var G=mxUtils.bind(this,function(g,m,q){try{b.saveLevel=3;b.constructor==DriveFile&&(null==n&&(n=[]),null==b.getChannelId()&&n.push({key:"channel",value:Editor.guid(32)}),null==b.getChannelKey()&&n.push({key:"key",value:Editor.guid(32)}),n.push({key:"secret",value:null!=p?p:Editor.guid(32)}));q||(null!=g||f||(g=this.placeholderThumbnail,m=this.placeholderMimeType),null!=g&&null!=m&&(D.thumbnail={image:g,mimeType:m}));var t=b.getData(),E=mxUtils.bind(this,function(d){try{if(b.saveDelay=(new Date).getTime()-
+v,b.saveLevel=11,null==d)k({message:mxResources.get("errorSavingFile")+": Empty response"});else{var f=(new Date(d.modifiedDate)).getTime()-(new Date(A)).getTime();if(0>=f||x==d.etag||c&&z==d.headRevisionId){b.saveLevel=12;var g=[];0>=f&&g.push("invalid modified time");x==d.etag&&g.push("stale etag");c&&z==d.headRevisionId&&g.push("stale revision");var l=g.join(", ");k({message:mxResources.get("errorSavingFile")+": "+l},d);try{EditorUi.logError("Critical: Error saving to Google Drive "+b.desc.id,
null,"from-"+z+"."+A+"-"+this.ui.hashValue(x)+"-to-"+d.headRevisionId+"."+d.modifiedDate+"-"+this.ui.hashValue(d.etag)+(0<l.length?"-errors-"+l:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync"))}catch(R){}}else if(b.saveLevel=null,e(d,t),null!=B){this.executeRequest({url:"/files/"+B.id+"/revisions/"+B.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(b){b.pinned=!0;this.executeRequest({url:"/files/"+B.id+"/revisions/"+
-B.headRevisionId,method:"PUT",params:b})})));try{EditorUi.logEvent({category:b.convertedFrom+"-CONVERT-FILE-"+b.getHash(),action:"from_"+B.id+"."+B.headRevisionId+"-to_"+b.desc.id+"."+b.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=b.sync?"-client_"+b.sync.clientId:"nosync")})}catch(R){}}}}catch(R){u(R)}}),E=mxUtils.bind(this,function(e,f){b.saveLevel=4;try{null!=m&&(D.properties=m);var n=l||b.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
-null:b.getCurrentEtag(),p=mxUtils.bind(this,function(k){b.saveLevel=5;try{var l=b.desc.mimeType!=this.xmlMimeType&&b.desc.mimeType!=this.mimeType&&b.desc.mimeType!=this.libraryMimeType,m=!0,p=null;try{p=window.setTimeout(mxUtils.bind(this,function(){m=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(ea){}this.executeRequest(this.createUploadRequest(b.getId(),D,e,c||k||l,f,k?null:n,C),mxUtils.bind(this,function(b){window.clearTimeout(p);m&&F(b)}),mxUtils.bind(this,function(c){window.clearTimeout(p);
-if(m){b.saveLevel=6;try{b.isConflict(c)?this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){b.saveLevel=7;try{if(null!=e&&e.etag==n)if(d<this.staleEtagMaxRetries){d++;var f=2*d*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(q,f);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",d,"delay",f)}else{q(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+b.getHash(),action:"rev_"+
-b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}catch(fa){}}else"1"==urlParams.test&&e.headRevisionId==z&&EditorUi.debug("DriveClient: Remote Etag Changed","local",n,
-"remote",e.etag,"rev",b.desc.headRevisionId,"response",[e],"file",[b]),g(c,e)}catch(fa){u(fa)}}),mxUtils.bind(this,function(){g(c)})):g(c)}catch(la){u(la)}}}))}catch(ea){u(ea)}}),q=mxUtils.bind(this,function(c){b.saveLevel=9;if(c||null==n)p(c);else{var d=!0,e=null;try{e=window.setTimeout(mxUtils.bind(this,function(){d=!1;g({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(ca){}this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(e);
-if(d){b.saveLevel=10;try{null!=f&&f.headRevisionId==z?("1"==urlParams.test&&n!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",n,"to",f.etag,"rev",b.desc.headRevisionId,"response",[f],"file",[b]),n=f.etag,p(c)):g({error:{code:412}},f)}catch(ea){u(ea)}}}),mxUtils.bind(this,function(c){window.clearTimeout(e);d&&(b.saveLevel=11,g(c))}))}});if(y&&null==k){b.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var b=this.thumbnailWidth/t.width,c=document.createElement("canvas");
-c.width=this.thumbnailWidth;c.height=Math.floor(t.height*b);c.getContext("2d").drawImage(t,0,0,c.width,c.height);var d=c.toDataURL(),d=d.substring(d.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");D.thumbnail={image:d,mimeType:"image/png"};q(!1)}catch(ca){try{q(!1)}catch(ea){u(ea)}}});t.src="data:image/png;base64,"+e}else q(!1)}catch(Y){u(Y)}});if(y){var G=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){E(b,!0)}),g,this.ui.getCurrentFile()!=
-b?t:null,G.scale,G.border)}else E(t,!1)}catch(S){u(S)}});try{b.saveLevel=2,(f||y||b.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=D.mimeType&&"application/vnd.jgraph.mxfile"!=D.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c=c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(J){c=null}E(c,
-"image/png")}catch(J){u(J)}})))&&E(null,null,b.constructor!=DriveLibrary)}catch(G){u(G)}}else this.ui.editor.graph.reset(),g({message:mxResources.get("readOnly")})}catch(G){u(G)}};DriveClient.prototype.insertFile=function(b,c,e,k,n,f,l){f=null!=f?f:this.xmlMimeType;b={mimeType:f,title:b};null!=e&&(b.parents=[{kind:"drive#fileLink",id:e}]);this.executeRequest(this.createUploadRequest(null,b,c,!1,l),mxUtils.bind(this,function(b){f==this.libraryMimeType?k(new DriveLibrary(this.ui,c,b)):0==b?null!=n&&
-n({message:mxResources.get("errorSavingFile")}):k(new DriveFile(this.ui,c,b))}),n)};DriveClient.prototype.createUploadRequest=function(b,c,e,k,n,f,l){n=null!=n?n:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(d["If-Match"]=f);b={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=b?"/"+b:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=b?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
-JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=e?n?e:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(e):Graph.base64EncodeUnicode(e):"")+"\r\n---------314159265358979323846--"};k||(b.fullUrl+="&newRevision=false");l&&(b.fullUrl+="&pinned=true");return b};DriveClient.prototype.createLinkPicker=function(){var d=e.linkPicker;if(null==d||e.linkPickerToken!=b){e.linkPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
-c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),d=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(c).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED)}return d};DriveClient.prototype.pickFile=function(d,c,g){this.filePickerCallback=
-null!=d?d:mxUtils.bind(this,function(b){this.ui.loadFile("G"+b)});this.filePicked=mxUtils.bind(this,function(b){b.action==google.picker.Action.PICKED&&this.filePickerCallback(b.docs[0].id,b.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var d=c?"genericPicker":"filePicker",n=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(b).className&&(mxEvent.removeListener(document,
-"click",n),this[d].setVisible(!1),g&&g())});if(null==e[d]||e[d+"Token"]!=b){e[d+"Token"]=b;var f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),l=(new google.picker.DocsView).setIncludeFolders(!0),m=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),p=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(f.setMimeTypes("*/*"),l.setMimeTypes("*/*"),m.setMimeTypes("*/*")):(f.setMimeTypes(this.mimeTypes),l.setMimeTypes(this.mimeTypes),
-m.setMimeTypes(this.mimeTypes));e[d]=(new google.picker.PickerBuilder).setOAuthToken(e[d+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(l).addView(m).addView(google.picker.ViewId.RECENTLY_PICKED).addView(p);if(urlParams.gPickerSize){var q=urlParams.gPickerSize.split(",");e[d]=e[d].setSize(q[0],q[1])}urlParams.topBaseUrl&&(e[d]=e[d].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[d]=e[d].setCallback(mxUtils.bind(this,
-function(b){if(b.action==google.picker.Action.PICKED||b.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",n),g&&b.action==google.picker.Action.CANCEL&&g();b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",n);e[d].setVisible(!0)}catch(t){this.ui.spinner.stop(),this.ui.handleError(t)}}))};DriveClient.prototype.pickFolder=function(d,c){this.folderPickerCallback=d;var g=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,
+B.headRevisionId,method:"PUT",params:b})})));try{EditorUi.logEvent({category:b.convertedFrom+"-CONVERT-FILE-"+b.getHash(),action:"from_"+B.id+"."+B.headRevisionId+"-to_"+b.desc.id+"."+b.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=b.sync?"-client_"+b.sync.clientId:"nosync")})}catch(R){}}}}catch(R){u(R)}}),M=mxUtils.bind(this,function(e,f){b.saveLevel=4;try{null!=n&&(D.properties=n);var m=l||b.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
+null:b.getCurrentEtag(),p=mxUtils.bind(this,function(g){b.saveLevel=5;try{var l=b.desc.mimeType!=this.xmlMimeType&&b.desc.mimeType!=this.mimeType&&b.desc.mimeType!=this.libraryMimeType,n=!0,p=null;try{p=window.setTimeout(mxUtils.bind(this,function(){n=!1;k({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(ea){}this.executeRequest(this.createUploadRequest(b.getId(),D,e,c||g||l,f,g?null:m,C),mxUtils.bind(this,function(b){window.clearTimeout(p);n&&E(b)}),mxUtils.bind(this,function(c){window.clearTimeout(p);
+if(n){b.saveLevel=6;try{b.isConflict(c)?this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(e){b.saveLevel=7;try{if(null!=e&&e.etag==m)if(d<this.staleEtagMaxRetries){d++;var f=2*d*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(q,f);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",d,"delay",f)}else{q(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+b.getHash(),action:"rev_"+
+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+(b.changeListenerEnabled?"":"-nolisten")+(b.inConflictState?"-conflict":"")+(b.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=b.sync?"-client_"+b.sync.clientId:"-nosync")})}catch(fa){}}else"1"==urlParams.test&&e.headRevisionId==z&&EditorUi.debug("DriveClient: Remote Etag Changed","local",m,
+"remote",e.etag,"rev",b.desc.headRevisionId,"response",[e],"file",[b]),k(c,e)}catch(fa){u(fa)}}),mxUtils.bind(this,function(){k(c)})):k(c)}catch(la){u(la)}}}))}catch(ea){u(ea)}}),q=mxUtils.bind(this,function(c){b.saveLevel=9;if(c||null==m)p(c);else{var d=!0,e=null;try{e=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(ca){}this.executeRequest({url:"/files/"+b.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(e);
+if(d){b.saveLevel=10;try{null!=f&&f.headRevisionId==z?("1"==urlParams.test&&m!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",m,"to",f.etag,"rev",b.desc.headRevisionId,"response",[f],"file",[b]),m=f.etag,p(c)):k({error:{code:412}},f)}catch(ea){u(ea)}}}),mxUtils.bind(this,function(c){window.clearTimeout(e);d&&(b.saveLevel=11,k(c))}))}});if(y&&null==g){b.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var b=this.thumbnailWidth/t.width,c=document.createElement("canvas");
+c.width=this.thumbnailWidth;c.height=Math.floor(t.height*b);c.getContext("2d").drawImage(t,0,0,c.width,c.height);var d=c.toDataURL(),d=d.substring(d.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");D.thumbnail={image:d,mimeType:"image/png"};q(!1)}catch(ca){try{q(!1)}catch(ea){u(ea)}}});t.src="data:image/png;base64,"+e}else q(!1)}catch(Y){u(Y)}});if(y){var G=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){M(b,!0)}),k,this.ui.getCurrentFile()!=
+b?t:null,G.scale,G.border)}else M(t,!1)}catch(S){u(S)}});try{b.saveLevel=2,(f||y||b.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=D.mimeType&&"application/vnd.jgraph.mxfile"!=D.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(b){try{var c=null;try{null!=b&&(c=b.toDataURL("image/png")),null!=c&&(c=c.length>this.maxThumbnailSize?null:c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(J){c=null}G(c,
+"image/png")}catch(J){u(J)}})))&&G(null,null,b.constructor!=DriveLibrary)}catch(H){u(H)}}else this.ui.editor.graph.reset(),k({message:mxResources.get("readOnly")})}catch(H){u(H)}};DriveClient.prototype.insertFile=function(b,c,e,g,m,f,l){f=null!=f?f:this.xmlMimeType;b={mimeType:f,title:b};null!=e&&(b.parents=[{kind:"drive#fileLink",id:e}]);this.executeRequest(this.createUploadRequest(null,b,c,!1,l),mxUtils.bind(this,function(b){f==this.libraryMimeType?g(new DriveLibrary(this.ui,c,b)):0==b?null!=m&&
+m({message:mxResources.get("errorSavingFile")}):g(new DriveFile(this.ui,c,b))}),m)};DriveClient.prototype.createUploadRequest=function(b,c,e,g,m,f,l){m=null!=m?m:!1;var d={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(d["If-Match"]=f);b={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=b?"/"+b:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=b?"PUT":"POST",headers:d,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=e?m?e:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(e):Graph.base64EncodeUnicode(e):"")+"\r\n---------314159265358979323846--"};g||(b.fullUrl+="&newRevision=false");l&&(b.fullUrl+="&pinned=true");return b};DriveClient.prototype.createLinkPicker=function(){var d=e.linkPicker;if(null==d||e.linkPickerToken!=b){e.linkPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
+c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),k=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),d=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(c).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED)}return d};DriveClient.prototype.pickFile=function(d,c,k){this.filePickerCallback=
+null!=d?d:mxUtils.bind(this,function(b){this.ui.loadFile("G"+b)});this.filePicked=mxUtils.bind(this,function(b){b.action==google.picker.Action.PICKED&&this.filePickerCallback(b.docs[0].id,b.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var d=c?"genericPicker":"filePicker",m=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(b).className&&(mxEvent.removeListener(document,
+"click",m),this[d].setVisible(!1),k&&k())});if(null==e[d]||e[d+"Token"]!=b){e[d+"Token"]=b;var f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),l=(new google.picker.DocsView).setIncludeFolders(!0),n=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),p=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(f.setMimeTypes("*/*"),l.setMimeTypes("*/*"),n.setMimeTypes("*/*")):(f.setMimeTypes(this.mimeTypes),l.setMimeTypes(this.mimeTypes),
+n.setMimeTypes(this.mimeTypes));e[d]=(new google.picker.PickerBuilder).setOAuthToken(e[d+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(l).addView(n).addView(google.picker.ViewId.RECENTLY_PICKED).addView(p);if(urlParams.gPickerSize){var q=urlParams.gPickerSize.split(",");e[d]=e[d].setSize(q[0],q[1])}urlParams.topBaseUrl&&(e[d]=e[d].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[d]=e[d].setCallback(mxUtils.bind(this,
+function(b){if(b.action==google.picker.Action.PICKED||b.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,"click",m),k&&b.action==google.picker.Action.CANCEL&&k();b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",m);e[d].setVisible(!0)}catch(t){this.ui.spinner.stop(),this.ui.handleError(t)}}))};DriveClient.prototype.pickFolder=function(d,c){this.folderPickerCallback=d;var k=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,
mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(b).className&&(mxEvent.removeListener(document,"click",c),e.folderPicker.setVisible(!1))});if(null==e.folderPicker||e.folderPickerToken!=b){e.folderPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),
-f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(f).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
-if(urlParams.gPickerSize){var m=urlParams.gPickerSize.split(",");e.folderPicker=e.folderPicker.setSize(m[0],m[1])}urlParams.topBaseUrl&&(e.folderPicker=e.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.folderPicker=e.folderPicker.setCallback(mxUtils.bind(this,function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);this.folderPickerCallback(b)})).build()}mxEvent.addListener(document,"click",c);e.folderPicker.setVisible(!0)}catch(p){this.ui.spinner.stop(),
-this.ui.handleError(p)}}))}catch(k){this.ui.handleError(k)}});c?g():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){g()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};DriveClient.prototype.pickLibrary=function(d){this.filePickerCallback=d;this.filePicked=mxUtils.bind(this,function(b){b.action==google.picker.Action.PICKED?
+f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),k=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(f).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
+if(urlParams.gPickerSize){var n=urlParams.gPickerSize.split(",");e.folderPicker=e.folderPicker.setSize(n[0],n[1])}urlParams.topBaseUrl&&(e.folderPicker=e.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.folderPicker=e.folderPicker.setCallback(mxUtils.bind(this,function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);this.folderPickerCallback(b)})).build()}mxEvent.addListener(document,"click",c);e.folderPicker.setVisible(!0)}catch(p){this.ui.spinner.stop(),
+this.ui.handleError(p)}}))}catch(g){this.ui.handleError(g)}});c?k():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){k()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)};DriveClient.prototype.pickLibrary=function(d){this.filePickerCallback=d;this.filePicked=mxUtils.bind(this,function(b){b.action==google.picker.Action.PICKED?
this.filePickerCallback(b.docs[0].id):b.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(b){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(b).className&&(mxEvent.removeListener(document,"click",c),e.libraryPicker.setVisible(!1))});if(null==e.libraryPicker||e.libraryPickerToken!=
-b){e.libraryPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),k=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),n=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
-f=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(k).addView(n).addView(google.picker.ViewId.RECENTLY_PICKED).addView(f);if(urlParams.gPickerSize){var l=urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(l[0],l[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));
-e.libraryPicker=e.libraryPicker.setCallback(mxUtils.bind(this,function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",c);e.libraryPicker.setVisible(!0)}catch(m){this.ui.spinner.stop(),this.ui.handleError(m)}}))};DriveClient.prototype.showPermissions=function(d){var c=mxUtils.bind(this,function(){var b=new ConfirmDialog(this.ui,
+b){e.libraryPickerToken=b;var d=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),g=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),m=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
+f=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(d).addView(g).addView(m).addView(google.picker.ViewId.RECENTLY_PICKED).addView(f);if(urlParams.gPickerSize){var l=urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(l[0],l[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));
+e.libraryPicker=e.libraryPicker.setCallback(mxUtils.bind(this,function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",c);e.libraryPicker.setVisible(!0)}catch(n){this.ui.spinner.stop(),this.ui.handleError(n)}}))};DriveClient.prototype.showPermissions=function(d){var c=mxUtils.bind(this,function(){var b=new ConfirmDialog(this.ui,
mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){this.ui.editor.graph.openLink("https://drive.google.com/open?id="+d)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(b.container,360,190,!0,!0);b.init()});this.sharingFailed?c():this.checkToken(mxUtils.bind(this,function(){try{var e=new gapi.drive.share.ShareClient(this.appId);e.setOAuthToken(b);e.setItemIds([d]);e.showSettingsDialog();"MutationObserver"in window&&(null!=
this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(b){for(var d=!1,e=0;e<b.length;e++)for(var g=0;g<b[e].addedNodes.length;g++){var k=b[e].addedNodes[g];"BUTTON"==k.nodeName&&"ok"==k.getAttribute("name")&&null!=k.parentNode&&null!=k.parentNode.parentNode&&"dialog"==k.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,k.click(),c(),d=!0):"DIV"==k.nodeName&&"shr-q-shr-r-shr-xb"==k.className&&
-(d=!0)}d&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(k){this.ui.handleError(k)}}))};DriveClient.prototype.clearPersistentToken=function(){var b=JSON.parse(this.getPersistentToken(!0))||{};delete b.current;delete b[this.userId];for(var c in b){b.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(b))};DriveClient.prototype.setPersistentToken=function(b,c){var d=
+(d=!0)}d&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(g){this.ui.handleError(g)}}))};DriveClient.prototype.clearPersistentToken=function(){var b=JSON.parse(this.getPersistentToken(!0))||{};delete b.current;delete b[this.userId];for(var c in b){b.current={userId:c,expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(b))};DriveClient.prototype.setPersistentToken=function(b,c){var d=
JSON.parse(this.getPersistentToken(!0))||{};b.userId=this.userId;d.current=b;d[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(d),c)}})();DropboxFile=function(b,e,d){DrawioFile.call(this,b,e);this.stat=d};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};
-DropboxFile.prototype.getRevisions=function(b,e){var d=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});d.then(mxUtils.bind(this,function(c){try{for(var d=[],k=c.entries.length-1;0<=k;k--)mxUtils.bind(this,function(b){d.push({modifiedDate:b.client_modified,fileSize:b.size,getXml:mxUtils.bind(this,function(c,d){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:b.rev},c,d)}),getUrl:mxUtils.bind(this,function(c){return this.ui.getUrl(window.location.pathname+"?rev="+
-b.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=c?"&page="+c:""))+window.location.hash})})})(c.entries[k]);b(d)}catch(n){e(n)}}));d["catch"](function(b){e(b)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,d,c,g){this.doSave(this.getTitle(),b,e,d,c,g)};DropboxFile.prototype.saveAs=function(b,e,d){this.doSave(b,!1,e,d)};
-DropboxFile.prototype.doSave=function(b,e,d,c,g,k){var n=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=n;this.saveFile(b,e,d,c,g,k)}),c,g,k])};
+DropboxFile.prototype.getRevisions=function(b,e){var d=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});d.then(mxUtils.bind(this,function(c){try{for(var d=[],g=c.entries.length-1;0<=g;g--)mxUtils.bind(this,function(b){d.push({modifiedDate:b.client_modified,fileSize:b.size,getXml:mxUtils.bind(this,function(c,d){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:b.rev},c,d)}),getUrl:mxUtils.bind(this,function(c){return this.ui.getUrl(window.location.pathname+"?rev="+
+b.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=c?"&page="+c:""))+window.location.hash})})})(c.entries[g]);b(d)}catch(m){e(m)}}));d["catch"](function(b){e(b)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,d,c,k){this.doSave(this.getTitle(),b,e,d,c,k)};DropboxFile.prototype.saveAs=function(b,e,d){this.doSave(b,!1,e,d)};
+DropboxFile.prototype.doSave=function(b,e,d,c,k,g){var m=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=m;this.saveFile(b,e,d,c,k,g)}),c,k,g])};
DropboxFile.prototype.saveFile=function(b,e,d,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(e){if(e)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var g=mxUtils.bind(this,function(e){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(b,e,mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=b;this.contentChanged();
-null!=d&&d()}),mxUtils.bind(this,function(b){this.savingFile=!1;null!=c&&c(b)}),f)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var n=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){g(this.ui.base64ToBlob(b,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,n.scale,n.border)}else g(this.getData())}catch(f){if(this.savingFile=!1,null!=c)c(f);else throw f;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b,
+null!=d&&d()}),mxUtils.bind(this,function(b){this.savingFile=!1;null!=c&&c(b)}),f)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var k=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){g(this.ui.base64ToBlob(b,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,k.scale,k.border)}else g(this.getData())}catch(f){if(this.savingFile=!1,null!=c)c(f);else throw f;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b,
e)):null!=d&&d()};DropboxFile.prototype.rename=function(b,e,d){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=e&&e()):(this.stat=c,this.descriptorChanged(),this.save(!0,e,d))}),d)};DropboxLibrary=function(b,e,d){DropboxFile.call(this,b,e,d)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(b){DrawioClient.call(this,b,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/dropbox";
-DropboxClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(e,d,c){var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),n=this.client.usersGetCurrentAccount();
-n.then(mxUtils.bind(this,function(b){window.clearTimeout(k);g&&(this.setUser(new DrawioUser(b.account_id,b.email,b.name.display_name)),e())}));n["catch"](mxUtils.bind(this,function(f){window.clearTimeout(k);g&&(null==f||401!==f.status||c?d({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,d,!0)}),d)))}))};DropboxClient.prototype.authenticate=function(b,d){(new mxXmlRequest(this.redirectUri+
-"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),b,d):null!=d&&d(c)}),d)};DropboxClient.prototype.authenticateStep2=function(e,d,c){if(null==window.onDropboxCallback){var g=mxUtils.bind(this,function(){var k=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,
-function(e){200<=e.getStatus()&&299>=e.getStatus()?(b=JSON.parse(e.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),d()):(this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==e.getStatus()?g():c({message:mxResources.get("accessDenied"),retry:g}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,f){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+(n?"&token_access_type=offline":"")+"&redirect_uri="+
-encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(e,m){if(k){window.onDropboxCallback=null;k=!1;try{null==e?c({message:mxResources.get("accessDenied"),retry:g}):(null!=f&&f(),b=e.access_token,this.client.setAccessToken(b),this.setUser(null),n&&this.setPersistentToken("remembered"),d())}catch(p){c(p)}finally{null!=m&&m.close()}}else null!=
-m&&m.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:g})}),mxUtils.bind(this,function(){k&&(window.onDropboxCallback=null,k=!1,c({message:mxResources.get("accessDenied"),retry:g}))}))});g()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,d,c){var g=mxUtils.bind(this,function(n){var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;c({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout),m=e();m.then(mxUtils.bind(this,function(b){window.clearTimeout(l);
-f&&null!=d&&d(b)}));m["catch"](mxUtils.bind(this,function(d){window.clearTimeout(l);f&&(null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,n?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){k(!0)},c)})}):this.authenticate(function(){g(!0)},c)))}))}),k=mxUtils.bind(this,function(b){null==this.user?this.updateUser(function(){k(!0)},
-c,b):g(b)});null==b?this.authenticate(function(){k(!0)},c):k(!1)};DropboxClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!0)};DropboxClient.prototype.getFile=function(e,d,c,g){g=null!=g?g:!1;var k=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&k){var n=mxUtils.bind(this,function(){var b=e.split("/");this.ui.convertFile(e,0<b.length?b[b.length-1]:e,null,this.extension,d,c)});null!=b?n():this.authenticate(n,
-c)}else n={path:"/"+e},null!=urlParams.rev&&(n.rev=urlParams.rev),this.readFile(n,mxUtils.bind(this,function(b,c){var f=null;if(0<(k?b.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(b);null!=l&&0<l.length?b=l:f=new LocalFile(this,b,e,!0)}d(null!=f?f:g?new DropboxLibrary(this.ui,b,c):new DropboxFile(this.ui,b,c))}),c,k)};DropboxClient.prototype.readFile=function(e,d,c,g){var k=mxUtils.bind(this,function(f){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT})}),
-this.ui.timeout),p=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});p.then(mxUtils.bind(this,function(b){}));p["catch"](function(b){window.clearTimeout(m);l&&null!=b&&409==b.status&&(l=!1,c({message:mxResources.get("fileNotFound")}))});p=this.client.filesDownload(e);p.then(mxUtils.bind(this,function(b){window.clearTimeout(m);if(l){l=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){d(e.result,b)});g?e.readAsDataURL(b.fileBlob):e.readAsText(b.fileBlob)}catch(u){c(u)}}}));
-p["catch"](mxUtils.bind(this,function(d){window.clearTimeout(m);l&&(l=!1,null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,f?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},c)})}):this.authenticate(function(){k(!0)},c)))}))}),n=mxUtils.bind(this,function(b){null==this.user?this.updateUser(function(){n(!0)},c,b):k(b)});null==
-b?this.authenticate(function(){n(!0)},c):n(!1)};DropboxClient.prototype.checkExists=function(b,d,c){var e=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+b.toLowerCase(),include_deleted:!1})});this.executePromise(e,mxUtils.bind(this,function(e){c?d(!1,!0,e):this.ui.confirm(mxResources.get("replaceIt",[b]),function(){d(!0,!0,e)},function(){d(!1,!0,e)})}),function(b){d(!0,!1)})};DropboxClient.prototype.renameFile=function(b,d,c,g){if(/[\\\/:\?\*"\|]/.test(d))g({message:mxResources.get("dropboxCharsNotAllowed")});
-else{if(null!=b&&null!=d){var e=b.stat.path_display.substring(1),n=e.lastIndexOf("/");0<n&&(d=e.substring(0,n+1)+d)}null!=b&&null!=d&&b.stat.path_lower.substring(1)!==d.toLowerCase()?this.checkExists(d,mxUtils.bind(this,function(e,k,n){e?(e=mxUtils.bind(this,function(e){e=mxUtils.bind(this,function(){return this.client.filesMove({from_path:b.stat.path_display,to_path:"/"+d,autorename:!1})});this.executePromise(e,c,g)}),k&&n.path_lower.substring(1)!==d.toLowerCase()?(k=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+
-d.toLowerCase()})}),this.executePromise(k,e,g)):e()):g()})):g({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(b,d,c,g){this.insertFile(b,d,c,g,!0)};DropboxClient.prototype.insertFile=function(b,d,c,g,k){k=null!=k?k:!1;this.checkExists(b,mxUtils.bind(this,function(e){e?this.saveFile(b,d,mxUtils.bind(this,function(b){k?c(new DropboxLibrary(this.ui,d,b)):c(new DropboxFile(this.ui,d,b))}),g):g()}))};DropboxClient.prototype.saveFile=function(b,d,c,g,k){if(/[\\\/:\?\*"\|]/.test(b))g({message:mxResources.get("dropboxCharsNotAllowed")});
-else if(15E7<=d.length)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 150 MB)"});else{k=null!=k?k:"";var e=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+k+b,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([d],{type:"text/plain"})})});this.executePromise(e,c,g)}};DropboxClient.prototype.pickLibrary=function(b){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(d){if(this.ui.spinner.spin(document.body,
-mxResources.get("loading"))){var c=mxUtils.bind(this,function(b){this.ui.spinner.stop();this.ui.handleError(b)}),e=d[0].link.indexOf(this.appPath);if(0<e){var k=decodeURIComponent(d[0].link.substring(e+this.appPath.length-1));this.readFile({path:k},mxUtils.bind(this,function(e,f){if(null!=f&&f.id==d[0].id)try{this.ui.spinner.stop(),b(k.substring(1),new DropboxLibrary(this.ui,e,f))}catch(l){this.ui.handleError(l)}else this.createLibrary(d[0],b,c)}),c)}else this.createLibrary(d[0],b,c)}})})};DropboxClient.prototype.createLibrary=
-function(b,d,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[b.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(b.link,mxUtils.bind(this,function(e){this.insertFile(b.name,e,mxUtils.bind(this,function(b){try{this.ui.spinner.stop(),d(b.getHash().substring(1),b)}catch(n){c(n)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(b,d){null!=Dropbox.choose?(b=null!=b?b:mxUtils.bind(this,
-function(b,d){this.ui.loadFile(null!=b?"D"+encodeURIComponent(b):d.getHash(),null,d)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(d)this.ui.spinner.stop(),b(c[0].link);else{var e=mxUtils.bind(this,function(b){this.ui.spinner.stop();this.ui.handleError(b)}),k=mxUtils.bind(this,function(c,d){this.ui.spinner.stop();b(c,d)}),n=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||
-/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&n)k(c[0].link);else{var f=c[0].link.indexOf(this.appPath);if(0<f){var l=decodeURIComponent(c[0].link.substring(f+this.appPath.length-1));this.readFile({path:l},mxUtils.bind(this,function(d,f){if(null!=f&&f.id==c[0].id){var g=n?d.lastIndexOf(","):-1;this.ui.spinner.stop();var m=null;0<g&&(g=this.ui.extractGraphModelFromPng(d),null!=g&&0<g.length?d=g:m=new LocalFile(this,d,l,!0));b(l.substring(1),null!=m?m:new DropboxFile(this.ui,d,f))}else this.createFile(c[0],
-k,e)}),e,n)}else this.createFile(c[0],k,e)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(b,d,c){var e=/(\.png)$/i.test(b.name);this.ui.editor.loadUrl(b.link,mxUtils.bind(this,function(g){null!=g&&0<g.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[b.name]),mxUtils.bind(this,function(){var k=e?g.lastIndexOf(","):-1;0<k&&(k=this.ui.extractGraphModelFromPng(g.substring(k+
+DropboxClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(e,d,c){var k=!0,g=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),m=this.client.usersGetCurrentAccount();
+m.then(mxUtils.bind(this,function(b){window.clearTimeout(g);k&&(this.setUser(new DrawioUser(b.account_id,b.email,b.name.display_name)),e())}));m["catch"](mxUtils.bind(this,function(f){window.clearTimeout(g);k&&(null==f||401!==f.status||c?d({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,d,!0)}),d)))}))};DropboxClient.prototype.authenticate=function(b,d){(new mxXmlRequest(this.redirectUri+
+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),b,d):null!=d&&d(c)}),d)};DropboxClient.prototype.authenticateStep2=function(e,d,c){if(null==window.onDropboxCallback){var k=mxUtils.bind(this,function(){var g=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,
+function(e){200<=e.getStatus()&&299>=e.getStatus()?(b=JSON.parse(e.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),d()):(this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==e.getStatus()?k():c({message:mxResources.get("accessDenied"),retry:k}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,f){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+(m?"&token_access_type=offline":"")+"&redirect_uri="+
+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(e,n){if(g){window.onDropboxCallback=null;g=!1;try{null==e?c({message:mxResources.get("accessDenied"),retry:k}):(null!=f&&f(),b=e.access_token,this.client.setAccessToken(b),this.setUser(null),m&&this.setPersistentToken("remembered"),d())}catch(p){c(p)}finally{null!=n&&n.close()}}else null!=
+n&&n.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:k})}),mxUtils.bind(this,function(){g&&(window.onDropboxCallback=null,g=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,d,c){var k=mxUtils.bind(this,function(m){var f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;c({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),n=e();n.then(mxUtils.bind(this,function(b){window.clearTimeout(l);
+f&&null!=d&&d(b)}));n["catch"](mxUtils.bind(this,function(d){window.clearTimeout(l);f&&(null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,m?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){g(!0)},c)})}):this.authenticate(function(){k(!0)},c)))}))}),g=mxUtils.bind(this,function(b){null==this.user?this.updateUser(function(){g(!0)},
+c,b):k(b)});null==b?this.authenticate(function(){g(!0)},c):g(!1)};DropboxClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!0)};DropboxClient.prototype.getFile=function(e,d,c,k){k=null!=k?k:!1;var g=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&g){var m=mxUtils.bind(this,function(){var b=e.split("/");this.ui.convertFile(e,0<b.length?b[b.length-1]:e,null,this.extension,d,c)});null!=b?m():this.authenticate(m,
+c)}else m={path:"/"+e},null!=urlParams.rev&&(m.rev=urlParams.rev),this.readFile(m,mxUtils.bind(this,function(b,c){var f=null;if(0<(g?b.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(b);null!=l&&0<l.length?b=l:f=new LocalFile(this,b,e,!0)}d(null!=f?f:k?new DropboxLibrary(this.ui,b,c):new DropboxFile(this.ui,b,c))}),c,g)};DropboxClient.prototype.readFile=function(e,d,c,k){var g=mxUtils.bind(this,function(f){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT})}),
+this.ui.timeout),p=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});p.then(mxUtils.bind(this,function(b){}));p["catch"](function(b){window.clearTimeout(n);l&&null!=b&&409==b.status&&(l=!1,c({message:mxResources.get("fileNotFound")}))});p=this.client.filesDownload(e);p.then(mxUtils.bind(this,function(b){window.clearTimeout(n);if(l){l=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){d(e.result,b)});k?e.readAsDataURL(b.fileBlob):e.readAsText(b.fileBlob)}catch(u){c(u)}}}));
+p["catch"](mxUtils.bind(this,function(d){window.clearTimeout(n);l&&(l=!1,null==d||500!=d.status&&400!=d.status&&401!=d.status?c({message:mxResources.get("error")+" "+d.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,f?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){g(!0)},c)))}))}),m=mxUtils.bind(this,function(b){null==this.user?this.updateUser(function(){m(!0)},c,b):g(b)});null==
+b?this.authenticate(function(){m(!0)},c):m(!1)};DropboxClient.prototype.checkExists=function(b,d,c){var e=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+b.toLowerCase(),include_deleted:!1})});this.executePromise(e,mxUtils.bind(this,function(e){c?d(!1,!0,e):this.ui.confirm(mxResources.get("replaceIt",[b]),function(){d(!0,!0,e)},function(){d(!1,!0,e)})}),function(b){d(!0,!1)})};DropboxClient.prototype.renameFile=function(b,d,c,k){if(/[\\\/:\?\*"\|]/.test(d))k({message:mxResources.get("dropboxCharsNotAllowed")});
+else{if(null!=b&&null!=d){var e=b.stat.path_display.substring(1),m=e.lastIndexOf("/");0<m&&(d=e.substring(0,m+1)+d)}null!=b&&null!=d&&b.stat.path_lower.substring(1)!==d.toLowerCase()?this.checkExists(d,mxUtils.bind(this,function(e,g,m){e?(e=mxUtils.bind(this,function(e){e=mxUtils.bind(this,function(){return this.client.filesMove({from_path:b.stat.path_display,to_path:"/"+d,autorename:!1})});this.executePromise(e,c,k)}),g&&m.path_lower.substring(1)!==d.toLowerCase()?(g=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+
+d.toLowerCase()})}),this.executePromise(g,e,k)):e()):k()})):k({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(b,d,c,k){this.insertFile(b,d,c,k,!0)};DropboxClient.prototype.insertFile=function(b,d,c,k,g){g=null!=g?g:!1;this.checkExists(b,mxUtils.bind(this,function(e){e?this.saveFile(b,d,mxUtils.bind(this,function(b){g?c(new DropboxLibrary(this.ui,d,b)):c(new DropboxFile(this.ui,d,b))}),k):k()}))};DropboxClient.prototype.saveFile=function(b,d,c,k,g){if(/[\\\/:\?\*"\|]/.test(b))k({message:mxResources.get("dropboxCharsNotAllowed")});
+else if(15E7<=d.length)k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(d.length)+" / 150 MB)"});else{g=null!=g?g:"";var e=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+g+b,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([d],{type:"text/plain"})})});this.executePromise(e,c,k)}};DropboxClient.prototype.pickLibrary=function(b){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(d){if(this.ui.spinner.spin(document.body,
+mxResources.get("loading"))){var c=mxUtils.bind(this,function(b){this.ui.spinner.stop();this.ui.handleError(b)}),e=d[0].link.indexOf(this.appPath);if(0<e){var g=decodeURIComponent(d[0].link.substring(e+this.appPath.length-1));this.readFile({path:g},mxUtils.bind(this,function(e,f){if(null!=f&&f.id==d[0].id)try{this.ui.spinner.stop(),b(g.substring(1),new DropboxLibrary(this.ui,e,f))}catch(l){this.ui.handleError(l)}else this.createLibrary(d[0],b,c)}),c)}else this.createLibrary(d[0],b,c)}})})};DropboxClient.prototype.createLibrary=
+function(b,d,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[b.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(b.link,mxUtils.bind(this,function(e){this.insertFile(b.name,e,mxUtils.bind(this,function(b){try{this.ui.spinner.stop(),d(b.getHash().substring(1),b)}catch(m){c(m)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(b,d){null!=Dropbox.choose?(b=null!=b?b:mxUtils.bind(this,
+function(b,d){this.ui.loadFile(null!=b?"D"+encodeURIComponent(b):d.getHash(),null,d)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(d)this.ui.spinner.stop(),b(c[0].link);else{var e=mxUtils.bind(this,function(b){this.ui.spinner.stop();this.ui.handleError(b)}),g=mxUtils.bind(this,function(c,d){this.ui.spinner.stop();b(c,d)}),m=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||
+/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&m)g(c[0].link);else{var f=c[0].link.indexOf(this.appPath);if(0<f){var l=decodeURIComponent(c[0].link.substring(f+this.appPath.length-1));this.readFile({path:l},mxUtils.bind(this,function(d,f){if(null!=f&&f.id==c[0].id){var k=m?d.lastIndexOf(","):-1;this.ui.spinner.stop();var n=null;0<k&&(k=this.ui.extractGraphModelFromPng(d),null!=k&&0<k.length?d=k:n=new LocalFile(this,d,l,!0));b(l.substring(1),null!=n?n:new DropboxFile(this.ui,d,f))}else this.createFile(c[0],
+g,e)}),e,m)}else this.createFile(c[0],g,e)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(b,d,c){var e=/(\.png)$/i.test(b.name);this.ui.editor.loadUrl(b.link,mxUtils.bind(this,function(g){null!=g&&0<g.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[b.name]),mxUtils.bind(this,function(){var k=e?g.lastIndexOf(","):-1;0<k&&(k=this.ui.extractGraphModelFromPng(g.substring(k+
1)),null!=k&&0<k.length&&(g=k));this.insertFile(b.name,g,mxUtils.bind(this,function(c){d(b.name,c)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,e)}})();OneDriveFile=function(b,e,d){DrawioFile.call(this,b,e);this.meta=d};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=300;
OneDriveFile.prototype.share=function(){var b=this.meta.webUrl,b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType)var e=this.meta.parentReference.path,e=e.substring(e.indexOf("/root:")+6),d=this.meta.webUrl,b=d.substring(0,d.length-e.length-
-this.meta.name.length-(0<e.length?1:0)),d=d.substring(d.indexOf("/",8)),b=b+"/Forms/AllItems.aspx?id="+d+"&parent="+d.substring(0,d.lastIndexOf("/"));else if("business"==this.meta.parentReference.driveType)var b=this.meta["@microsoft.graph.downloadUrl"],c=b.indexOf("/_layouts/15/download.aspx?"),e=d=this.meta.webUrl,d=d.substring(8),d=d.substring(d.indexOf("/")),e=e.substring(0,e.lastIndexOf("/")),e=e.substring(e.indexOf("/",8)),b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+d+"&parent="+e}catch(g){}this.ui.editor.graph.openLink(b)};
+this.meta.name.length-(0<e.length?1:0)),d=d.substring(d.indexOf("/",8)),b=b+"/Forms/AllItems.aspx?id="+d+"&parent="+d.substring(0,d.lastIndexOf("/"));else if("business"==this.meta.parentReference.driveType)var b=this.meta["@microsoft.graph.downloadUrl"],c=b.indexOf("/_layouts/15/download.aspx?"),e=d=this.meta.webUrl,d=d.substring(8),d=d.substring(d.indexOf("/")),e=e.substring(0,e.lastIndexOf("/")),e=e.substring(e.indexOf("/",8)),b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+d+"&parent="+e}catch(k){}this.ui.editor.graph.openLink(b)};
OneDriveFile.prototype.getId=function(){return this.getIdOf(this.meta)};OneDriveFile.prototype.getParentId=function(){return this.getIdOf(this.meta,!0)};OneDriveFile.prototype.getIdOf=function(b,e){return(null!=b.parentReference&&null!=b.parentReference.driveId?b.parentReference.driveId+"/":"")+(null!=e?b.parentReference.id:b.id)};OneDriveFile.prototype.getChannelId=function(){return"W-"+DrawioFile.prototype.getChannelId.apply(this,arguments)};OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.getId())};
OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0};OneDriveFile.prototype.isOptimisticSync=function(){return!0};OneDriveFile.prototype.isSyncSupported=function(){return!0};OneDriveFile.prototype.getSize=function(){return this.meta.size};
OneDriveFile.prototype.isConflict=function(b){return null!=b&&(412==b.getStatus()||409==b.getStatus())};OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?this.ui.oneDrive.user:null};OneDriveFile.prototype.loadDescriptor=function(b,e){this.ui.oneDrive.executeRequest(this.ui.oneDrive.getItemURL(this.getId()),mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?b(JSON.parse(d.getText())):null!=e&&e()}),e)};
OneDriveFile.prototype.getLatestVersion=function(b,e){this.ui.oneDrive.getFile(this.getId(),b,e)};OneDriveFile.prototype.getDescriptor=function(){return this.meta};OneDriveFile.prototype.setDescriptor=function(b){this.meta=b};OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,e){b.eTag=e};
OneDriveFile.prototype.loadPatchDescriptor=function(b,e){var d=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(d+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):e(this.ui.oneDrive.parseRequestText(c))}),e)};
-OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,e,d,c,g){this.doSave(this.getTitle(),b,e,d,c,g)};OneDriveFile.prototype.saveAs=function(b,e,d){this.doSave(b,!1,e,d)};
-OneDriveFile.prototype.doSave=function(b,e,d,c,g,k){var n=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=n;this.saveFile(b,e,d,c,g,k)}),c,g,k])};
-OneDriveFile.prototype.saveFile=function(b,e,d,c,g,k){if(!this.isEditable())null!=d&&d();else if(!this.savingFile)if(this.getTitle()==b){var n=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var b=k||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),e=this.meta;this.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(b,f){this.setModified(this.getShadowModified());
-this.savingFile=!1;this.meta=b;this.fileSaved(f,e,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d()}),c)}),mxUtils.bind(this,function(b,d){try{this.savingFile=!1,this.isConflict(d)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();n()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
-c(b)}catch(q){if(this.savingFile=!1,null!=c)c(q);else throw q;}}),b)}catch(m){if(this.savingFile=!1,null!=c)c(m);else throw m;}});n()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(b)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
-OneDriveFile.prototype.rename=function(b,e,d){var c=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(g){this.hasSameExtension(b,this.getTitle())?(this.meta=g,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(g)):(this.meta=g,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,d))}),d)};
-OneDriveFile.prototype.move=function(b,e,d){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(b){this.meta=b;this.descriptorChanged();null!=e&&e(b)}),d)};OneDriveLibrary=function(b,e,d){OneDriveFile.call(this,b,e,d)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,e,d){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(b){this.desc=b;null!=e&&e(b)}),d)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(b,d,c,g){null==d&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(d=!0);null==c&&(c=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0);null==g&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(g=!0);DrawioClient.call(this,b,d?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=d;this.inlinePicker=c;this.noLogout=g;b=JSON.parse(this.token);null!=b&&(this.endpointHint=null!=b.endpointHint?b.endpointHint.replace("/Documents",
+OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,e,d,c,k){this.doSave(this.getTitle(),b,e,d,c,k)};OneDriveFile.prototype.saveAs=function(b,e,d){this.doSave(b,!1,e,d)};
+OneDriveFile.prototype.doSave=function(b,e,d,c,k,g){var m=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=m;this.saveFile(b,e,d,c,k,g)}),c,k,g])};
+OneDriveFile.prototype.saveFile=function(b,e,d,c,k,g){if(!this.isEditable())null!=d&&d();else if(!this.savingFile)if(this.getTitle()==b){var m=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var b=g||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),e=this.meta;this.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(b,f){this.setModified(this.getShadowModified());
+this.savingFile=!1;this.meta=b;this.fileSaved(f,e,mxUtils.bind(this,function(){this.contentChanged();null!=d&&d()}),c)}),mxUtils.bind(this,function(b,d){try{this.savingFile=!1,this.isConflict(d)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();m()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
+c(b)}catch(q){if(this.savingFile=!1,null!=c)c(q);else throw q;}}),b)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}});m()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(b)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
+OneDriveFile.prototype.rename=function(b,e,d){var c=this.getCurrentEtag();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(k){this.hasSameExtension(b,this.getTitle())?(this.meta=k,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(k)):(this.meta=k,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,d))}),d)};
+OneDriveFile.prototype.move=function(b,e,d){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(b){this.meta=b;this.descriptorChanged();null!=e&&e(b)}),d)};OneDriveLibrary=function(b,e,d){OneDriveFile.call(this,b,e,d)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,e,d){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(b){this.desc=b;null!=e&&e(b)}),d)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(b,d,c,k){null==d&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(d=!0);null==c&&(c=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0);null==k&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(k=!0);DrawioClient.call(this,b,d?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=d;this.inlinePicker=c;this.noLogout=k;b=JSON.parse(this.token);null!=b&&(this.endpointHint=null!=b.endpointHint?b.endpointHint.replace("/Documents",
"/_layouts/15/onedrive.aspx"):b.endpointHint)};mxUtils.extend(OneDriveClient,DrawioClient);OneDriveClient.prototype.clientId=window.DRAWIO_MSGRAPH_CLIENT_ID||("test.draw.io"==window.location.hostname?"2e598409-107f-4b59-89ca-d7723c8e00a4":"45c10911-200f-4e27-a666-9e9fca147395");OneDriveClient.prototype.clientId="app.diagrams.net"==window.location.hostname?"b5ff67d6-3155-4fca-965a-59a3655c4476":OneDriveClient.prototype.clientId;OneDriveClient.prototype.clientId="viewer.diagrams.net"==window.location.hostname?
"417a451a-a343-4788-b6c1-901e63182565":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all sites.read.all";OneDriveClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/microsoft";OneDriveClient.prototype.pickerRedirectUri=window.location.protocol+"//"+window.location.host+"/onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=OneDriveClient.prototype.defEndpointHint;
OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=function(b){if(null==b||""===b)return!1;for(var d=0;d<this.invalidFilenameRegExs.length;d++)if(this.invalidFilenameRegExs[d].test(b))return!1;
-return!0};OneDriveClient.prototype.get=function(e,d,c){e=new mxXmlRequest(e,null,"GET");e.setRequestHeaders=mxUtils.bind(this,function(c,d){c.setRequestHeader("Authorization","Bearer "+b)});e.send(d,c);return e};OneDriveClient.prototype.updateUser=function(b,d,c){var e=!0,k=window.setTimeout(mxUtils.bind(this,function(){e=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(g){window.clearTimeout(k);e&&(200>g.getStatus()||300<=g.getStatus()?c?d({message:mxResources.get("accessDenied")}):
-(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(b,d,!0)}),d)):(g=JSON.parse(g.getText()),this.setUser(new DrawioUser(g.id,null,g.displayName)),b()))}),mxUtils.bind(this,function(b){window.clearTimeout(k);e&&d(b)}))};OneDriveClient.prototype.resetTokenRefresh=function(b){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<b&&(this.tokenRefreshInterval=1E3*b,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,
+return!0};OneDriveClient.prototype.get=function(e,d,c){e=new mxXmlRequest(e,null,"GET");e.setRequestHeaders=mxUtils.bind(this,function(c,d){c.setRequestHeader("Authorization","Bearer "+b)});e.send(d,c);return e};OneDriveClient.prototype.updateUser=function(b,d,c){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.get(this.baseUrl+"/me",mxUtils.bind(this,function(k){window.clearTimeout(g);e&&(200>k.getStatus()||300<=k.getStatus()?c?d({message:mxResources.get("accessDenied")}):
+(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(b,d,!0)}),d)):(k=JSON.parse(k.getText()),this.setUser(new DrawioUser(k.id,null,k.displayName)),b()))}),mxUtils.bind(this,function(b){window.clearTimeout(g);e&&d(b)}))};OneDriveClient.prototype.resetTokenRefresh=function(b){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<b&&(this.tokenRefreshInterval=1E3*b,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,
function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*b))};OneDriveClient.prototype.authenticate=function(b,d,c){if(this.isExtAuth)window.parent.oneDriveAuth(mxUtils.bind(this,function(c){this.updateAuthInfo(c,!0,null==this.endpointHint,b,d)}),d,null!=window.urlParams&&"1"==urlParams.odAuthCancellable);else(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?this.authenticateStep2(e.getText(),b,d,c):null!=
-d&&d(e)}),d)};OneDriveClient.prototype.updateAuthInfo=function(e,d,c,g,k){c&&this.setUser(null);b=e.access_token;delete e.access_token;e.expiresOn=Date.now()+1E3*e.expires_in;this.tokenExpiresOn=e.expiresOn;e.remember=d;this.setPersistentToken(JSON.stringify(e),!d);this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){g()}),k):g()};OneDriveClient.prototype.authenticateStep2=function(e,d,c,g){if(null==window.onOneDriveCallback){var k=mxUtils.bind(this,function(){var n=
-!0,f=JSON.parse(this.getPersistentToken(!0));null!=f?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?this.updateAuthInfo(JSON.parse(e.getText()),f.remember,!1,d,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=e.getStatus()||g?c({message:mxResources.get("accessDenied"),retry:k}):k())}),c):this.ui.showAuthDialog(this,
-!0,mxUtils.bind(this,function(b,f){var g="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+(b?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),g=window.open(g,"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!=g&&(window.onOneDriveCallback=mxUtils.bind(this,function(e,g){if(n){window.onOneDriveCallback=null;n=!1;try{null==e?c({message:mxResources.get("accessDenied"),retry:k}):(null!=f&&f(),this.updateAuthInfo(e,b,!0,d,c))}catch(u){c(u)}finally{null!=g&&g.close()}}else null!=g&&g.close()}),g.focus())}),mxUtils.bind(this,function(){n&&(window.onOneDriveCallback=null,n=!1,c({message:mxResources.get("accessDenied"),
-retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(b,d){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var e=JSON.parse(c.getText());0<e.webUrl.indexOf(".sharepoint.com")?this.endpointHint=e.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));b();return}}catch(n){}d({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),d)};OneDriveClient.prototype.executeRequest=function(e,d,c){var g=mxUtils.bind(this,function(b){var k=!0,f=window.setTimeout(mxUtils.bind(this,function(){k=!1;c({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(e){window.clearTimeout(f);k&&(200<=e.getStatus()&&299>=e.getStatus()||404==e.getStatus()?(null==
-this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),d(e)):b||401!==e.getStatus()&&400!==e.getStatus()?c(this.parseRequestText(e)):this.authenticate(function(){g(!0)},c,b))}),mxUtils.bind(this,function(b){window.clearTimeout(f);k&&c(b)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){g(!0)},c):g(!1)};OneDriveClient.prototype.checkToken=function(e){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,this.emptyFn):e()};OneDriveClient.prototype.getItemRef=
+d&&d(e)}),d)};OneDriveClient.prototype.updateAuthInfo=function(e,d,c,k,g){c&&this.setUser(null);b=e.access_token;delete e.access_token;e.expiresOn=Date.now()+1E3*e.expires_in;this.tokenExpiresOn=e.expiresOn;e.remember=d;this.setPersistentToken(JSON.stringify(e),!d);this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){k()}),g):k()};OneDriveClient.prototype.authenticateStep2=function(e,d,c,k){if(null==window.onOneDriveCallback){var g=mxUtils.bind(this,function(){var m=
+!0,f=JSON.parse(this.getPersistentToken(!0));null!=f?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?this.updateAuthInfo(JSON.parse(e.getText()),f.remember,!1,d,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=e.getStatus()||k?c({message:mxResources.get("accessDenied"),retry:g}):g())}),c):this.ui.showAuthDialog(this,
+!0,mxUtils.bind(this,function(b,f){var k="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes+(b?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),k=window.open(k,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+
+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=k&&(window.onOneDriveCallback=mxUtils.bind(this,function(e,k){if(m){window.onOneDriveCallback=null;m=!1;try{null==e?c({message:mxResources.get("accessDenied"),retry:g}):(null!=f&&f(),this.updateAuthInfo(e,b,!0,d,c))}catch(u){c(u)}finally{null!=k&&k.close()}}else null!=k&&k.close()}),k.focus())}),mxUtils.bind(this,function(){m&&(window.onOneDriveCallback=null,m=!1,c({message:mxResources.get("accessDenied"),
+retry:g}))}))});g()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(b,d){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=c.getStatus()&&299>=c.getStatus()){var e=JSON.parse(c.getText());0<e.webUrl.indexOf(".sharepoint.com")?this.endpointHint=e.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var g=JSON.parse(this.getPersistentToken(!0));null!=g&&(g.endpointHint=this.endpointHint,
+this.setPersistentToken(JSON.stringify(g),!g.remember));b();return}}catch(m){}d({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),d)};OneDriveClient.prototype.executeRequest=function(e,d,c){var k=mxUtils.bind(this,function(b){var g=!0,f=window.setTimeout(mxUtils.bind(this,function(){g=!1;c({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(e){window.clearTimeout(f);g&&(200<=e.getStatus()&&299>=e.getStatus()||404==e.getStatus()?(null==
+this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),d(e)):b||401!==e.getStatus()&&400!==e.getStatus()?c(this.parseRequestText(e)):this.authenticate(function(){k(!0)},c,b))}),mxUtils.bind(this,function(b){window.clearTimeout(f);g&&c(b)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){k(!0)},c):k(!1)};OneDriveClient.prototype.checkToken=function(e){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,this.emptyFn):e()};OneDriveClient.prototype.getItemRef=
function(b){var d=b.split("/");return 1<d.length?{driveId:d[0],id:d[1]}:{id:b}};OneDriveClient.prototype.getItemURL=function(b,d){var c=b.split("/");if(1<c.length){var e=c[1];return(d?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)}return(d?"":this.baseUrl)+"/me/drive/items/"+b};OneDriveClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(b){var d=b.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');
-0<d&&(b=b.substring(0,d));return b};OneDriveClient.prototype.getFile=function(b,d,c,g,k){k=null!=k?k:!1;this.executeRequest(this.getItemURL(b),mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){var e=JSON.parse(b.getText()),g=/\.png$/i.test(e.name);if(/\.v(dx|sdx?)$/i.test(e.name)||/\.gliffy$/i.test(e.name)||/\.pdf$/i.test(e.name)||!this.ui.useCanvasForExport&&g)this.ui.convertFile(e["@microsoft.graph.downloadUrl"],e.name,null!=e.file?e.file.mimeType:null,this.extension,d,c);
-else{var n=!0,p=window.setTimeout(mxUtils.bind(this,function(){n=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(e["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(b){try{if(window.clearTimeout(p),n){/\.html$/i.test(e.name)&&(b=this.removeExtraHtmlContent(b));var f=null;if(0<(g?b.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(b);null!=l&&0<l.length?b=l:f=new LocalFile(this.ui,b,e.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)){var m=
-b.substring(22);b=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,e["@microsoft.graph.downloadUrl"])?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?d(new LocalFile(this.ui,b.responseText,e.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=c)c(A);else throw A;}}),e.name):
-null!=f?d(f):k?d(new OneDriveLibrary(this.ui,b,e)):d(new OneDriveFile(this.ui,b,e))}}catch(x){if(null!=c)c(x);else throw x;}}),mxUtils.bind(this,function(b){window.clearTimeout(p);n&&c(this.parseRequestText(b))}),g||null!=e.file&&null!=e.file.mimeType&&("image/"==e.file.mimeType.substring(0,6)&&"image/svg"!=e.file.mimeType.substring(0,9)||"application/pdf"==e.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied")+(null!=this.user?" ("+this.user.displayName+")":"")}):
-c(this.parseRequestText(b))}),c)};OneDriveClient.prototype.renameFile=function(b,d,c,g){null!=b&&null!=d&&(this.isValidFilename(d)?this.checkExists(b.getParentId(),d,!1,mxUtils.bind(this,function(e){e?this.writeFile(this.getItemURL(b.getId()),JSON.stringify({name:d}),"PATCH","application/json",c,g):g()})):g({message:this.invalidFilenameRegExs[0].test(d)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(b,d,c,g){d=
-this.getItemRef(d);var e=this.getItemRef(b);d.driveId!=e.driveId?g({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(b),JSON.stringify({parentReference:d}),"PATCH","application/json",c,g)};OneDriveClient.prototype.insertLibrary=function(b,d,c,g,k){this.insertFile(b,d,c,g,!0,k)};OneDriveClient.prototype.insertFile=function(b,d,c,g,k,n){this.isValidFilename(b)?(k=null!=k?k:!1,this.checkExists(n,b,!0,mxUtils.bind(this,
-function(e){if(e){e="/me/drive/root";null!=n&&(e=this.getItemURL(n,!0));var f=mxUtils.bind(this,function(b){k?c(new OneDriveLibrary(this.ui,d,b)):c(new OneDriveFile(this.ui,d,b))});e=this.baseUrl+e+"/children/"+encodeURIComponent(b)+"/content";4E6<=d.length?this.writeFile(e,"","PUT",null,mxUtils.bind(this,function(b){this.writeLargeFile(this.getItemURL(b.id),d,f,g)}),g):this.writeFile(e,d,"PUT",null,f,g)}else g()}))):g({message:this.invalidFilenameRegExs[0].test(b)?mxResources.get("oneDriveCharsNotAllowed"):
-mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(b,d,c,g){var e="/me/drive/root";null!=b&&(e=this.getItemURL(b,!0));this.executeRequest(this.baseUrl+e+"/children/"+encodeURIComponent(d),mxUtils.bind(this,function(b){404==b.getStatus()?g(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[d]),function(){g(!0)},function(){g(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),
-function(){g(!1)}))}),function(b){g(!1)},!0)};OneDriveClient.prototype.saveFile=function(b,d,c,g){try{var e=b.getData(),n=mxUtils.bind(this,function(f){var k=mxUtils.bind(this,function(b){d(b,e)}),l=this.getItemURL(b.getId());4E6<=f.length?this.writeLargeFile(l,f,k,c,g):this.writeFile(l+"/content/",f,"PUT",null,k,c,g)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)){var f=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){n(this.ui.base64ToBlob(b,
-"image/png"))}),c,this.ui.getCurrentFile()!=b?e:null,f.scale,f.border)}else n(e)}catch(l){c(l)}};OneDriveClient.prototype.writeLargeFile=function(e,d,c,g,k){try{if(null!=d){var n=mxUtils.bind(this,function(b,e,f){try{f=f||0;var k=!0,l=null,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;g({code:App.ERROR_TIMEOUT})}),this.ui.timeout),m=d.substr(e,4194304),p=new mxXmlRequest(b,m,"PUT");p.setRequestHeaders=mxUtils.bind(this,function(b,c){b.setRequestHeader("Content-Length",m.length);b.setRequestHeader("Content-Range",
-"bytes "+e+"-"+(e+m.length-1)+"/"+d.length)});p.send(mxUtils.bind(this,function(p){window.clearTimeout(l);if(k){var q=p.getStatus();200<=q&&299>=q?(q=e+m.length,q==d.length?c(JSON.parse(p.getText())):n(b,q,f)):500<=q&&599>=q&&2>f?(f++,n(b,e,f)):g(this.parseRequestText(p),p)}}),mxUtils.bind(this,function(b){window.clearTimeout(l);k&&g(this.parseRequestText(b))}))}catch(x){g(x)}}),f=mxUtils.bind(this,function(c){try{var d=!0,l=null;try{l=window.setTimeout(mxUtils.bind(this,function(){d=!1;g({code:App.ERROR_TIMEOUT})}),
-this.ui.timeout)}catch(t){}var q=new mxXmlRequest(e+"/createUploadSession","{}","POST");q.setRequestHeaders=mxUtils.bind(this,function(c,d){c.setRequestHeader("Content-Type","application/json");c.setRequestHeader("Authorization","Bearer "+b);null!=k&&c.setRequestHeader("If-Match",k)});q.send(mxUtils.bind(this,function(b){window.clearTimeout(l);d&&(200<=b.getStatus()&&299>=b.getStatus()?(b=JSON.parse(b.getText()),n(b.uploadUrl,0)):c||401!==b.getStatus()?g(this.parseRequestText(b),b):this.authenticate(function(){f(!0)},
-g,c))}),mxUtils.bind(this,function(b){window.clearTimeout(l);d&&g(this.parseRequestText(b))}))}catch(t){g(t)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){f(!0)},g):f(!1)}else g({message:mxResources.get("unknownError")})}catch(l){g(l)}};OneDriveClient.prototype.writeFile=function(e,d,c,g,k,n,f){try{if(null!=e&&null!=d){var l=mxUtils.bind(this,function(m){try{var p=!0,q=null;try{q=window.setTimeout(mxUtils.bind(this,function(){p=!1;n({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(u){}var t=
-new mxXmlRequest(e,d,c);t.setRequestHeaders=mxUtils.bind(this,function(c,d){c.setRequestHeader("Content-Type",g||" ");c.setRequestHeader("Authorization","Bearer "+b);null!=f&&c.setRequestHeader("If-Match",f)});t.send(mxUtils.bind(this,function(b){window.clearTimeout(q);p&&(200<=b.getStatus()&&299>=b.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),k(JSON.parse(b.getText()))):m||401!==b.getStatus()?n(this.parseRequestText(b),b):this.authenticate(function(){l(!0)},n,m))}),
-mxUtils.bind(this,function(b){window.clearTimeout(q);p&&n(this.parseRequestText(b))}))}catch(u){n(u)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},n):l(!1)}else n({message:mxResources.get("unknownError")})}catch(m){n(m)}};OneDriveClient.prototype.parseRequestText=function(b){var d={message:mxResources.get("unknownError")};try{d=JSON.parse(b.getText()),d.status=b.getStatus(),d.error&&(d.error.status=d.status,d.error.code=d.status)}catch(c){}return d};OneDriveClient.prototype.pickLibrary=
-function(b){this.pickFile(function(d){b(d)})};OneDriveClient.prototype.createInlinePicker=function(b,d){return mxUtils.bind(this,function(){var c=null,e=document.createElement("div");e.style.width="550px";e.style.height="435px";e.style.position="relative";var k=new CustomDialog(this.ui,e,mxUtils.bind(this,function(){var e=c.getSelectedItem();if(null!=e){if(d&&"object"==typeof e.folder){b({value:[e]});return}if(!e.folder){b(OneDriveFile.prototype.getIdOf(e));return}}return mxResources.get("invalidSel",
-null,"Invalid selection")}),null,mxResources.get(d?"save":"open"),null,null,null,null,!0);this.ui.showDialog(k.container,550,500,!0,!0);c=new mxODPicker(e,null,mxUtils.bind(this,function(b,c,d){this.executeRequest(this.baseUrl+b,function(b){c(JSON.parse(b.getText()))},d)}),mxUtils.bind(this,function(b,c,d,e){this.executeRequest(this.baseUrl+"/drives/"+c+"/items/"+b,function(b){d(JSON.parse(b.getText()))},e)}),null,null,function(c){d?b({value:[c]}):b(OneDriveFile.prototype.getIdOf(c))},mxUtils.bind(this,
-function(b){this.ui.showError(mxResources.get("error"),b)}),d)})};OneDriveClient.prototype.pickFolder=function(e,d){var c=mxUtils.bind(this,function(b){this.ui.showError(mxResources.get("error"),b&&b.message?b.message:b)}),g=mxUtils.bind(this,function(d){var g=this.inlinePicker?this.createInlinePicker(e,!0):mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,
+0<d&&(b=b.substring(0,d));return b};OneDriveClient.prototype.getFile=function(b,d,c,k,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(b),mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){var e=JSON.parse(b.getText()),k=/\.png$/i.test(e.name);if(/\.v(dx|sdx?)$/i.test(e.name)||/\.gliffy$/i.test(e.name)||/\.pdf$/i.test(e.name)||!this.ui.useCanvasForExport&&k)this.ui.convertFile(e["@microsoft.graph.downloadUrl"],e.name,null!=e.file?e.file.mimeType:null,this.extension,d,c);
+else{var m=!0,p=window.setTimeout(mxUtils.bind(this,function(){m=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(e["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(b){try{if(window.clearTimeout(p),m){/\.html$/i.test(e.name)&&(b=this.removeExtraHtmlContent(b));var f=null;if(0<(k?b.lastIndexOf(","):-1)){var l=this.ui.extractGraphModelFromPng(b);null!=l&&0<l.length?b=l:f=new LocalFile(this.ui,b,e.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==b.substring(0,32)){var n=
+b.substring(22);b=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(b,e["@microsoft.graph.downloadUrl"])?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?d(new LocalFile(this.ui,b.responseText,e.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=c)c(A);else throw A;}}),e.name):
+null!=f?d(f):g?d(new OneDriveLibrary(this.ui,b,e)):d(new OneDriveFile(this.ui,b,e))}}catch(x){if(null!=c)c(x);else throw x;}}),mxUtils.bind(this,function(b){window.clearTimeout(p);m&&c(this.parseRequestText(b))}),k||null!=e.file&&null!=e.file.mimeType&&("image/"==e.file.mimeType.substring(0,6)&&"image/svg"!=e.file.mimeType.substring(0,9)||"application/pdf"==e.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied")+(null!=this.user?" ("+this.user.displayName+")":"")}):
+c(this.parseRequestText(b))}),c)};OneDriveClient.prototype.renameFile=function(b,d,c,k){null!=b&&null!=d&&(this.isValidFilename(d)?this.checkExists(b.getParentId(),d,!1,mxUtils.bind(this,function(e){e?this.writeFile(this.getItemURL(b.getId()),JSON.stringify({name:d}),"PATCH","application/json",c,k):k()})):k({message:this.invalidFilenameRegExs[0].test(d)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(b,d,c,k){d=
+this.getItemRef(d);var e=this.getItemRef(b);d.driveId!=e.driveId?k({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(b),JSON.stringify({parentReference:d}),"PATCH","application/json",c,k)};OneDriveClient.prototype.insertLibrary=function(b,d,c,k,g){this.insertFile(b,d,c,k,!0,g)};OneDriveClient.prototype.insertFile=function(b,d,c,k,g,m){this.isValidFilename(b)?(g=null!=g?g:!1,this.checkExists(m,b,!0,mxUtils.bind(this,
+function(e){if(e){e="/me/drive/root";null!=m&&(e=this.getItemURL(m,!0));var f=mxUtils.bind(this,function(b){g?c(new OneDriveLibrary(this.ui,d,b)):c(new OneDriveFile(this.ui,d,b))});e=this.baseUrl+e+"/children/"+encodeURIComponent(b)+"/content";4E6<=d.length?this.writeFile(e,"","PUT",null,mxUtils.bind(this,function(b){this.writeLargeFile(this.getItemURL(b.id),d,f,k)}),k):this.writeFile(e,d,"PUT",null,f,k)}else k()}))):k({message:this.invalidFilenameRegExs[0].test(b)?mxResources.get("oneDriveCharsNotAllowed"):
+mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(b,d,c,k){var e="/me/drive/root";null!=b&&(e=this.getItemURL(b,!0));this.executeRequest(this.baseUrl+e+"/children/"+encodeURIComponent(d),mxUtils.bind(this,function(b){404==b.getStatus()?k(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[d]),function(){k(!0)},function(){k(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),
+function(){k(!1)}))}),function(b){k(!1)},!0)};OneDriveClient.prototype.saveFile=function(b,d,c,k){try{var e=b.getData(),m=mxUtils.bind(this,function(f){var g=mxUtils.bind(this,function(b){d(b,e)}),l=this.getItemURL(b.getId());4E6<=f.length?this.writeLargeFile(l,f,g,c,k):this.writeFile(l+"/content/",f,"PUT",null,g,c,k)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)){var f=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){m(this.ui.base64ToBlob(b,
+"image/png"))}),c,this.ui.getCurrentFile()!=b?e:null,f.scale,f.border)}else m(e)}catch(l){c(l)}};OneDriveClient.prototype.writeLargeFile=function(e,d,c,k,g){try{if(null!=d){var m=mxUtils.bind(this,function(b,e,f){try{f=f||0;var g=!0,l=null,l=window.setTimeout(mxUtils.bind(this,function(){g=!1;k({code:App.ERROR_TIMEOUT})}),this.ui.timeout),n=d.substr(e,4194304),p=new mxXmlRequest(b,n,"PUT");p.setRequestHeaders=mxUtils.bind(this,function(b,c){b.setRequestHeader("Content-Length",n.length);b.setRequestHeader("Content-Range",
+"bytes "+e+"-"+(e+n.length-1)+"/"+d.length)});p.send(mxUtils.bind(this,function(p){window.clearTimeout(l);if(g){var q=p.getStatus();200<=q&&299>=q?(q=e+n.length,q==d.length?c(JSON.parse(p.getText())):m(b,q,f)):500<=q&&599>=q&&2>f?(f++,m(b,e,f)):k(this.parseRequestText(p),p)}}),mxUtils.bind(this,function(b){window.clearTimeout(l);g&&k(this.parseRequestText(b))}))}catch(x){k(x)}}),f=mxUtils.bind(this,function(c){try{var d=!0,l=null;try{l=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT})}),
+this.ui.timeout)}catch(t){}var q=new mxXmlRequest(e+"/createUploadSession","{}","POST");q.setRequestHeaders=mxUtils.bind(this,function(c,d){c.setRequestHeader("Content-Type","application/json");c.setRequestHeader("Authorization","Bearer "+b);null!=g&&c.setRequestHeader("If-Match",g)});q.send(mxUtils.bind(this,function(b){window.clearTimeout(l);d&&(200<=b.getStatus()&&299>=b.getStatus()?(b=JSON.parse(b.getText()),m(b.uploadUrl,0)):c||401!==b.getStatus()?k(this.parseRequestText(b),b):this.authenticate(function(){f(!0)},
+k,c))}),mxUtils.bind(this,function(b){window.clearTimeout(l);d&&k(this.parseRequestText(b))}))}catch(t){k(t)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){f(!0)},k):f(!1)}else k({message:mxResources.get("unknownError")})}catch(l){k(l)}};OneDriveClient.prototype.writeFile=function(e,d,c,k,g,m,f){try{if(null!=e&&null!=d){var l=mxUtils.bind(this,function(n){try{var p=!0,q=null;try{q=window.setTimeout(mxUtils.bind(this,function(){p=!1;m({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(u){}var t=
+new mxXmlRequest(e,d,c);t.setRequestHeaders=mxUtils.bind(this,function(c,d){c.setRequestHeader("Content-Type",k||" ");c.setRequestHeader("Authorization","Bearer "+b);null!=f&&c.setRequestHeader("If-Match",f)});t.send(mxUtils.bind(this,function(b){window.clearTimeout(q);p&&(200<=b.getStatus()&&299>=b.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),g(JSON.parse(b.getText()))):n||401!==b.getStatus()?m(this.parseRequestText(b),b):this.authenticate(function(){l(!0)},m,n))}),
+mxUtils.bind(this,function(b){window.clearTimeout(q);p&&m(this.parseRequestText(b))}))}catch(u){m(u)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},m):l(!1)}else m({message:mxResources.get("unknownError")})}catch(n){m(n)}};OneDriveClient.prototype.parseRequestText=function(b){var d={message:mxResources.get("unknownError")};try{d=JSON.parse(b.getText()),d.status=b.getStatus(),d.error&&(d.error.status=d.status,d.error.code=d.status)}catch(c){}return d};OneDriveClient.prototype.pickLibrary=
+function(b){this.pickFile(function(d){b(d)})};OneDriveClient.prototype.createInlinePicker=function(b,d){return mxUtils.bind(this,function(){var c=null,e=document.createElement("div");e.style.width="550px";e.style.height="435px";e.style.position="relative";var g=new CustomDialog(this.ui,e,mxUtils.bind(this,function(){var e=c.getSelectedItem();if(null!=e){if(d&&"object"==typeof e.folder){b({value:[e]});return}if(!e.folder){b(OneDriveFile.prototype.getIdOf(e));return}}return mxResources.get("invalidSel",
+null,"Invalid selection")}),null,mxResources.get(d?"save":"open"),null,null,null,null,!0);this.ui.showDialog(g.container,550,500,!0,!0);c=new mxODPicker(e,null,mxUtils.bind(this,function(b,c,d){this.executeRequest(this.baseUrl+b,function(b){c(JSON.parse(b.getText()))},d)}),mxUtils.bind(this,function(b,c,d,e){this.executeRequest(this.baseUrl+"/drives/"+c+"/items/"+b,function(b){d(JSON.parse(b.getText()))},e)}),null,null,function(c){d?b({value:[c]}):b(OneDriveFile.prototype.getIdOf(c))},mxUtils.bind(this,
+function(b){this.ui.showError(mxResources.get("error"),b)}),d)})};OneDriveClient.prototype.pickFolder=function(e,d){var c=mxUtils.bind(this,function(b){this.ui.showError(mxResources.get("error"),b&&b.message?b.message:b)}),k=mxUtils.bind(this,function(d){var g=this.inlinePicker?this.createInlinePicker(e,!0):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:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(c){e(c);mxClient.IS_IE11&&(b=c.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});d?g():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){e({value:[{id:"root",name:"root",parentReference:{driveId:"me"}}]})}),g,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});
-null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){g(!1)}),c):g(d)};OneDriveClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(b){this.ui.loadFile("W"+encodeURIComponent(b))});var d=mxUtils.bind(this,function(b){this.ui.showError(mxResources.get("error"),b&&b.message?b.message:b)}),c=this.inlinePicker?this.createInlinePicker(e):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?
+null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){k(!1)}),c):k(d)};OneDriveClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(b){this.ui.loadFile("W"+encodeURIComponent(b))});var d=mxUtils.bind(this,function(b){this.ui.showError(mxResources.get("error"),b&&b.message?b.message:b)}),c=this.inlinePicker?this.createInlinePicker(e):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?
null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,function(c){null!=c&&null!=c.value&&0<c.value.length&&(mxClient.IS_IE11&&(b=c.accessToken),e(OneDriveFile.prototype.getIdOf(c.value[0]),c))}),cancel:mxUtils.bind(this,function(){}),error:d});null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,
function(){this.inlinePicker?(this.ui.hideDialog(),c()):this.ui.showDialog((new BtnDialog(this.ui,this,mxResources.get("open"),mxUtils.bind(this,function(){this.ui.hideDialog();c()}))).container,300,140,!0,!0)}),d):c()};OneDriveClient.prototype.logout=function(){if(isLocalStorage){var e=localStorage.getItem("odpickerv7cache");null!=e&&'{"odsdkLoginHint":{'==e.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}window.open("https://login.microsoftonline.com/common/oauth2/v2.0/logout","logout",
"width=525,height=525,status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes");this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null}})();GitHubFile=function(b,e,d){DrawioFile.call(this,b,e);this.meta=d;this.peer=this.ui.gitHub};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.share=function(){this.ui.editor.graph.openLink("https://github.com/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/settings/access")};
GitHubFile.prototype.getId=function(){return encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+this.getId())};
GitHubFile.prototype.getPublicUrl=function(b){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(e){b(200<=e.getStatus()&&299>=e.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){b(null)})):b(null)};GitHubFile.prototype.isConflict=function(b){return null!=b&&409==b.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};
GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(b,e){this.peer.getFile(this.getId(),b,e)};GitHubFile.prototype.isCompressedStorage=function(){return!1};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(b){this.meta=b};GitHubFile.prototype.getDescriptorEtag=function(b){return b.sha};GitHubFile.prototype.setDescriptorEtag=function(b,e){b.sha=e};
-GitHubFile.prototype.save=function(b,e,d,c,g,k){this.doSave(this.getTitle(),e,d,c,g,k)};GitHubFile.prototype.saveAs=function(b,e,d){this.doSave(b,e,d)};GitHubFile.prototype.doSave=function(b,e,d,c,g,k){var n=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=n;this.saveFile(b,!1,e,d,c,g,k)}),d,c,g])};
-GitHubFile.prototype.saveFile=function(b,e,d,c,g,k,n){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var f=mxUtils.bind(this,function(e){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var f=this.getCurrentEtag(),g=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,b);this.fileSaved(g,f,mxUtils.bind(this,function(){this.contentChanged();
-null!=d&&d()}),c)}),mxUtils.bind(this,function(b){this.savingFile=!1;this.isConflict(b)?(this.inConflictState=!0,null!=c&&c({commitMessage:e})):null!=c&&c(b)}),k,e)}catch(q){if(this.savingFile=!1,null!=c)c(q);else throw q;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(f){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
-d&&d();this.ui.fileLoaded(b)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,f,e)}))});null!=n?f(n):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(b){f(b)}),c)}else null!=d&&d()};GitHubLibrary=function(b,e,d){GitHubFile.call(this,b,e,d)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(b,d){DrawioClient.call(this,b,d||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+
-"//"+window.location.host+"/github2";GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,d,c){var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),n=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),f=this.authToken+" "+b;n.setRequestHeaders=function(b,c){b.setRequestHeader("Authorization",
-f)};n.send(mxUtils.bind(this,function(){window.clearTimeout(k);g&&(401===n.getStatus()?c?d({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,d,!0)}),d)):200>n.getStatus()||300<=n.getStatus()?d({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(n.getText()))),e()))}),d)};GitHubClient.prototype.createUser=function(b){return new DrawioUser(b.id,b.email,b.name)};GitHubClient.prototype.authenticate=
-function(b,d){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),b,d):null!=d&&d(c)}),d)};GitHubClient.prototype.authenticateStep2=function(e,d,c){if(null==window.onGitHubCallback){var g=mxUtils.bind(this,function(){var k=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,f){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&scope="+
-this.scope+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(e,m){k?(window.onGitHubCallback=null,k=!1,null==e?c({message:mxResources.get("accessDenied"),retry:g}):(null!=f&&f(),b=e.access_token,this.setUser(null),n&&this.setPersistentToken("remembered"),d(),null!=m&&m.close())):null!=m&&m.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:g})}),mxUtils.bind(this,function(){k&&
-(window.onGitHubCallback=null,k=!1,c({message:mxResources.get("accessDenied"),retry:g}))}))});g()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(b,d){try{var c=JSON.parse(b.getText());null!=c&&null!=c.message&&(d=c.message)}catch(g){}return d};GitHubClient.prototype.executeRequest=function(e,d,c,g){var k=mxUtils.bind(this,function(f){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),p=this.authToken+
-" "+b;e.setRequestHeaders=function(b,c){b.setRequestHeader("Authorization",p)};e.send(mxUtils.bind(this,function(){window.clearTimeout(m);if(l)if(200<=e.getStatus()&&299>=e.getStatus()||g&&404==e.getStatus())d(e);else if(401===e.getStatus())f?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===e.getStatus()){var b=!1;try{var p=JSON.parse(e.getText());null!=p&&
-null!=p.errors&&0<p.errors.length&&(b="too_large"==p.errors[0].code)}catch(u){}c({message:mxResources.get(b?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(b){window.clearTimeout(m);l&&c(b)}))}),n=mxUtils.bind(this,function(b){null==
-this.user?this.updateUser(function(){n(!0)},c,b):k(b)});null==b?this.authenticate(function(){n(!0)},c):n(!1)};GitHubClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!0)};GitHubClient.prototype.getSha=function(b,d,c,g,k,n){var e="&t="+(new Date).getTime();b=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+c+"?ref="+g+e,null,"HEAD");this.executeRequest(b,mxUtils.bind(this,function(b){try{k(b.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(m){n(m)}}),n)};GitHubClient.prototype.getFile=
-function(e,d,c,g,k){g=null!=g?g:!1;var n=e.split("/"),f=n[0],l=n[1],m=n[2];e=n.slice(3,n.length).join("/");n=/\.png$/i.test(e);if(!k&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&n))if(null!=b){k=this.baseUrl+"/repos/"+f+"/"+l+"/contents/"+e+"?ref="+m;var p={Authorization:"token "+b},n=e.split("/");this.ui.convertFile(k,0<n.length?n[n.length-1]:e,null,this.extension,d,c,null,p)}else c({message:mxResources.get("accessDenied")});else n="&t="+(new Date).getTime(),
-e=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+l+"/contents/"+e+"?ref="+m+n,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(b){try{d(this.createGitHubFile(f,l,m,JSON.parse(b.getText()),g))}catch(t){c(t)}}),c)};GitHubClient.prototype.createGitHubFile=function(b,d,c,g,k){b={org:b,repo:d,ref:c,name:g.name,path:g.path,sha:g.sha,html_url:g.html_url,download_url:g.download_url};d=g.content;"base64"===g.encoding&&(/\.jpe?g$/i.test(g.name)?d="data:image/jpeg;base64,"+d:/\.gif$/i.test(g.name)?
-d="data:image/gif;base64,"+d:/\.png$/i.test(g.name)?(g=this.ui.extractGraphModelFromPng(d),d=null!=g&&0<g.length?g:"data:image/png;base64,"+d):d=Base64.decode(d));return k?new GitHubLibrary(this.ui,d,b):new GitHubFile(this.ui,d,b)};GitHubClient.prototype.insertLibrary=function(b,d,c,g,k){this.insertFile(b,d,c,g,!0,k,!1)};GitHubClient.prototype.insertFile=function(b,d,c,g,k,n,f){k=null!=k?k:!1;n=n.split("/");var e=n[0],m=n[1],p=n[2],q=n.slice(3,n.length).join("/");0<q.length&&(q+="/");q+=b;this.checkExists(e+
-"/"+m+"/"+p+"/"+q,!0,mxUtils.bind(this,function(l,n){l?k?(f||(d=Base64.encode(d)),this.showCommitDialog(b,!0,mxUtils.bind(this,function(b){this.writeFile(e,m,p,q,b,d,n,mxUtils.bind(this,function(b){try{var d=JSON.parse(b.getText());c(this.createGitHubFile(e,m,p,d.content,k))}catch(z){g(z)}}),g)}),g)):c(new GitHubFile(this.ui,d,{org:e,repo:m,ref:p,name:b,path:q,sha:n,isNew:!0})):g()}))};GitHubClient.prototype.showCommitDialog=function(b,d,c,g){var e=this.ui.spinner.pause();b=new FilenameDialog(this.ui,
-mxResources.get(d?"addedFile":"updateFile",[b]),mxResources.get("ok"),mxUtils.bind(this,function(b){e();c(b)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){g()}),null,280);this.ui.showDialog(b.container,400,80,!0,!1);b.init()};GitHubClient.prototype.writeFile=function(b,d,c,g,k,n,f,l,m){n.length>=this.maxFileSize?m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(n.length)+" / 1 MB)"}):(c={path:g,branch:decodeURIComponent(c),message:k,content:n},
-null!=f&&(c.sha=f),b=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+g,JSON.stringify(c),"PUT"),this.executeRequest(b,mxUtils.bind(this,function(b){l(b)}),mxUtils.bind(this,function(b){404==b.code&&(b.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,b.code=null);m(b)})))};GitHubClient.prototype.checkExists=function(b,d,c){var e=b.split("/"),k=e[0],n=e[1],f=e[2];b=e.slice(3,e.length).join("/");this.getSha(k,n,b,f,mxUtils.bind(this,function(e){if(d){var f=this.ui.spinner.pause();
-this.ui.confirm(mxResources.get("replaceIt",[b]),function(){f();c(!0,e)},function(){f();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(b){c(!0)}),null,!0)};GitHubClient.prototype.saveFile=function(b,d,c,g,k){var e=b.meta.org,f=b.meta.repo,l=b.meta.ref,m=b.meta.path,p=mxUtils.bind(this,function(g,n){this.writeFile(e,f,l,m,k,n,g,mxUtils.bind(this,function(c){delete b.meta.isNew;
-d(JSON.parse(c.getText()).content.sha)}),mxUtils.bind(this,function(b){c(b)}))}),q=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(m)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){p(b.meta.sha,c)}),c,this.ui.getCurrentFile()!=b?b.getData():null,d.scale,d.border)}else p(b.meta.sha,Base64.encode(b.getData()))});g?this.getSha(e,f,m,l,mxUtils.bind(this,function(c){b.meta.sha=c;q()}),c):q()};GitHubClient.prototype.pickLibrary=
-function(b){this.pickFile(b)};GitHubClient.prototype.pickFolder=function(b){this.showGitHubDialog(!1,b)};GitHubClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("H"+encodeURIComponent(b))});this.showGitHubDialog(!0,b)};GitHubClient.prototype.showGitHubDialog=function(b,d){var c=null,e=null,k=null,n=null,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,
-mxResources.get(b?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.border="1px solid lightgray";m.style.boxSizing="border-box";m.style.padding="4px";m.style.overflow="auto";m.style.lineHeight="1.2em";m.style.height="274px";f.appendChild(m);var p=document.createElement("div");p.style.textOverflow="ellipsis";p.style.boxSizing="border-box";p.style.overflow=
-"hidden";p.style.padding="4px";p.style.width="100%";var q=new CustomDialog(this.ui,f,mxUtils.bind(this,function(){d(c+"/"+e+"/"+encodeURIComponent(k)+"/"+n)}));this.ui.showDialog(q.container,420,370,!0,!0);b&&q.okButton.parentNode.removeChild(q.okButton);var t=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=p.cloneNode(),b.style.padding=
-d,b.appendChild(f),f=b);return f}),u=mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(t(c+"/"+e,mxUtils.bind(this,function(){n=null;B()}),null,!0));b||(mxUtils.write(d," / "),d.appendChild(t(decodeURIComponent(k),mxUtils.bind(this,function(){n=null;y()}),null,!0)));if(null!=n&&0<n.length){var f=n.split("/");for(b=0;b<f.length;b++)(function(b){mxUtils.write(d," / ");d.appendChild(t(f[b],mxUtils.bind(this,function(){n=f.slice(0,b+1).join("/");
-z()}),null,!0))})(b)}m.appendChild(d)}),v=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(n=k=e=c=null,B()):this.ui.hideDialog()}),null,{})}),x=null,A=null,z=mxUtils.bind(this,function(f){null==f&&(m.innerHTML="",f=1);var g=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+e+"/contents/"+n+"?ref="+encodeURIComponent(k)+"&per_page=100&page="+f,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));q.okButton.removeAttribute("disabled");
-null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){z(f+1)});mxEvent.addListener(x,"click",l);this.executeRequest(g,mxUtils.bind(this,function(g){this.ui.spinner.stop();1==f&&(u(),m.appendChild(t("../ [Up]",mxUtils.bind(this,function(){if(""==n)n=null,B();else{var b=n.split("/");
-n=b.slice(0,b.length-1).join("/");z()}}),"4px")));var l=JSON.parse(g.getText());if(null==l||0==l.length)mxUtils.write(m,mxResources.get("noFiles"));else{var y=!0,q=0;g=mxUtils.bind(this,function(f){for(var g=0;g<l.length;g++)mxUtils.bind(this,function(g,l){if(f==("dir"==g.type)){var B=p.cloneNode();B.style.backgroundColor=y?Editor.isDarkMode()?"#000000":"#eeeeee":"";y=!y;var u=document.createElement("img");u.src=IMAGE_PATH+"/"+("dir"==g.type?"folder.png":"file.png");u.setAttribute("align","absmiddle");
-u.style.marginRight="4px";u.style.marginTop="-4px";u.width=20;B.appendChild(u);B.appendChild(t(g.name+("dir"==g.type?"/":""),mxUtils.bind(this,function(){"dir"==g.type?(n=g.path,z()):b&&"file"==g.type&&(this.ui.hideDialog(),d(c+"/"+e+"/"+encodeURIComponent(k)+"/"+g.path))})));m.appendChild(B);q++}})(l[g],g)});g(!0);b&&g(!1)}}),v,!0)}),y=mxUtils.bind(this,function(b,d){null==b&&(m.innerHTML="",b=1);var f=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+e+"/branches?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var g=mxUtils.bind(this,function(){y(b+1)});mxEvent.addListener(x,"click",g);this.executeRequest(f,mxUtils.bind(this,function(c){this.ui.spinner.stop();1==b&&(u(!0),m.appendChild(t("../ [Up]",mxUtils.bind(this,
-function(){n=null;B()}),"4px")));c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(m,mxResources.get("noFiles"));else if(1==c.length&&d)k=c[0].name,n="",z();else{for(var e=0;e<c.length;e++)mxUtils.bind(this,function(b,c){var d=p.cloneNode();d.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";d.appendChild(t(b.name,mxUtils.bind(this,function(){k=b.name;n="";z()})));m.appendChild(d)})(c[e],e);100==c.length&&(m.appendChild(x),A=function(){m.scrollTop>=m.scrollHeight-
-m.offsetHeight&&g()},mxEvent.addListener(m,"scroll",A))}}),v)}),B=mxUtils.bind(this,function(b){null==b&&(m.innerHTML="",b=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=A&&mxEvent.removeListener(m,"scroll",A);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,
-mxResources.get("more")+"...");var f=mxUtils.bind(this,function(){B(b+1)});mxEvent.addListener(x,"click",f);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(m,mxResources.get("noFiles"));else{1==b&&(m.appendChild(t(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(b){if(null!=b){var d=b.split("/");
-if(1<d.length){b=d[0];var f=d[1];3>d.length?(c=b,e=f,n=k=null,y()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(b+"/"+f+"/"+d,mxUtils.bind(this,function(b){this.ui.spinner.stop();c=b.meta.org;e=b.meta.repo;k=decodeURIComponent(b.meta.ref);n="";z()}),mxUtils.bind(this,function(b){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(b.container,300,80,!0,!1);b.init()}))),mxUtils.br(m),mxUtils.br(m));for(var g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){var f=p.cloneNode();f.style.backgroundColor=0==d%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";f.appendChild(t(b.full_name,mxUtils.bind(this,function(){c=b.owner.login;e=b.name;n="";y(null,!0)})));m.appendChild(f)})(d[g],g)}100==d.length&&(m.appendChild(x),A=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&f()},mxEvent.addListener(m,
+GitHubFile.prototype.save=function(b,e,d,c,k,g){this.doSave(this.getTitle(),e,d,c,k,g)};GitHubFile.prototype.saveAs=function(b,e,d){this.doSave(b,e,d)};GitHubFile.prototype.doSave=function(b,e,d,c,k,g){var m=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=m;this.saveFile(b,!1,e,d,c,k,g)}),d,c,k])};
+GitHubFile.prototype.saveFile=function(b,e,d,c,k,g,m){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var f=mxUtils.bind(this,function(e){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var f=this.getCurrentEtag(),k=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,b);this.fileSaved(k,f,mxUtils.bind(this,function(){this.contentChanged();
+null!=d&&d()}),c)}),mxUtils.bind(this,function(b){this.savingFile=!1;this.isConflict(b)?(this.inConflictState=!0,null!=c&&c({commitMessage:e})):null!=c&&c(b)}),g,e)}catch(q){if(this.savingFile=!1,null!=c)c(q);else throw q;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(f){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;null!=
+d&&d();this.ui.fileLoaded(b)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,f,e)}))});null!=m?f(m):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(b){f(b)}),c)}else null!=d&&d()};GitHubLibrary=function(b,e,d){GitHubFile.call(this,b,e,d)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(b,d){DrawioClient.call(this,b,d||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+
+"//"+window.location.host+"/github2";GitHubClient.prototype.maxFileSize=1E6;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,d,c){var k=!0,g=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),m=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),f=this.authToken+" "+b;m.setRequestHeaders=function(b,c){b.setRequestHeader("Authorization",
+f)};m.send(mxUtils.bind(this,function(){window.clearTimeout(g);k&&(401===m.getStatus()?c?d({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,d,!0)}),d)):200>m.getStatus()||300<=m.getStatus()?d({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(m.getText()))),e()))}),d)};GitHubClient.prototype.createUser=function(b){return new DrawioUser(b.id,b.email,b.name)};GitHubClient.prototype.authenticate=
+function(b,d){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),b,d):null!=d&&d(c)}),d)};GitHubClient.prototype.authenticateStep2=function(e,d,c){if(null==window.onGitHubCallback){var k=mxUtils.bind(this,function(){var g=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,f){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&scope="+
+this.scope+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(e,n){g?(window.onGitHubCallback=null,g=!1,null==e?c({message:mxResources.get("accessDenied"),retry:k}):(null!=f&&f(),b=e.access_token,this.setUser(null),m&&this.setPersistentToken("remembered"),d(),null!=n&&n.close())):null!=n&&n.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:k})}),mxUtils.bind(this,function(){g&&
+(window.onGitHubCallback=null,g=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(b,d){try{var c=JSON.parse(b.getText());null!=c&&null!=c.message&&(d=c.message)}catch(k){}return d};GitHubClient.prototype.executeRequest=function(e,d,c,k){var g=mxUtils.bind(this,function(f){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout),p=this.authToken+
+" "+b;e.setRequestHeaders=function(b,c){b.setRequestHeader("Authorization",p)};e.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(l)if(200<=e.getStatus()&&299>=e.getStatus()||k&&404==e.getStatus())d(e);else if(401===e.getStatus())f?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){g(!0)},c);else if(403===e.getStatus()){var b=!1;try{var p=JSON.parse(e.getText());null!=p&&
+null!=p.errors&&0<p.errors.length&&(b="too_large"==p.errors[0].code)}catch(u){}c({message:mxResources.get(b?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(b){window.clearTimeout(n);l&&c(b)}))}),m=mxUtils.bind(this,function(b){null==
+this.user?this.updateUser(function(){m(!0)},c,b):g(b)});null==b?this.authenticate(function(){m(!0)},c):m(!1)};GitHubClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!0)};GitHubClient.prototype.getSha=function(b,d,c,k,g,m){var e="&t="+(new Date).getTime();b=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+c+"?ref="+k+e,null,"HEAD");this.executeRequest(b,mxUtils.bind(this,function(b){try{g(b.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(n){m(n)}}),m)};GitHubClient.prototype.getFile=
+function(e,d,c,k,g){k=null!=k?k:!1;var m=e.split("/"),f=m[0],l=m[1],n=m[2];e=m.slice(3,m.length).join("/");m=/\.png$/i.test(e);if(!g&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&m))if(null!=b){g=this.baseUrl+"/repos/"+f+"/"+l+"/contents/"+e+"?ref="+n;var p={Authorization:"token "+b},m=e.split("/");this.ui.convertFile(g,0<m.length?m[m.length-1]:e,null,this.extension,d,c,null,p)}else c({message:mxResources.get("accessDenied")});else m="&t="+(new Date).getTime(),
+e=new mxXmlRequest(this.baseUrl+"/repos/"+f+"/"+l+"/contents/"+e+"?ref="+n+m,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(b){try{d(this.createGitHubFile(f,l,n,JSON.parse(b.getText()),k))}catch(t){c(t)}}),c)};GitHubClient.prototype.createGitHubFile=function(b,d,c,k,g){b={org:b,repo:d,ref:c,name:k.name,path:k.path,sha:k.sha,html_url:k.html_url,download_url:k.download_url};d=k.content;"base64"===k.encoding&&(/\.jpe?g$/i.test(k.name)?d="data:image/jpeg;base64,"+d:/\.gif$/i.test(k.name)?
+d="data:image/gif;base64,"+d:/\.png$/i.test(k.name)?(k=this.ui.extractGraphModelFromPng(d),d=null!=k&&0<k.length?k:"data:image/png;base64,"+d):d=Base64.decode(d));return g?new GitHubLibrary(this.ui,d,b):new GitHubFile(this.ui,d,b)};GitHubClient.prototype.insertLibrary=function(b,d,c,k,g){this.insertFile(b,d,c,k,!0,g,!1)};GitHubClient.prototype.insertFile=function(b,d,c,k,g,m,f){g=null!=g?g:!1;m=m.split("/");var e=m[0],n=m[1],p=m[2],q=m.slice(3,m.length).join("/");0<q.length&&(q+="/");q+=b;this.checkExists(e+
+"/"+n+"/"+p+"/"+q,!0,mxUtils.bind(this,function(l,m){l?g?(f||(d=Base64.encode(d)),this.showCommitDialog(b,!0,mxUtils.bind(this,function(b){this.writeFile(e,n,p,q,b,d,m,mxUtils.bind(this,function(b){try{var d=JSON.parse(b.getText());c(this.createGitHubFile(e,n,p,d.content,g))}catch(z){k(z)}}),k)}),k)):c(new GitHubFile(this.ui,d,{org:e,repo:n,ref:p,name:b,path:q,sha:m,isNew:!0})):k()}))};GitHubClient.prototype.showCommitDialog=function(b,d,c,k){var e=this.ui.spinner.pause();b=new FilenameDialog(this.ui,
+mxResources.get(d?"addedFile":"updateFile",[b]),mxResources.get("ok"),mxUtils.bind(this,function(b){e();c(b)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){k()}),null,280);this.ui.showDialog(b.container,400,80,!0,!1);b.init()};GitHubClient.prototype.writeFile=function(b,d,c,k,g,m,f,l,n){m.length>=this.maxFileSize?n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(m.length)+" / 1 MB)"}):(c={path:k,branch:decodeURIComponent(c),message:g,content:m},
+null!=f&&(c.sha=f),b=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+d+"/contents/"+k,JSON.stringify(c),"PUT"),this.executeRequest(b,mxUtils.bind(this,function(b){l(b)}),mxUtils.bind(this,function(b){404==b.code&&(b.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,b.code=null);n(b)})))};GitHubClient.prototype.checkExists=function(b,d,c){var e=b.split("/"),g=e[0],m=e[1],f=e[2];b=e.slice(3,e.length).join("/");this.getSha(g,m,b,f,mxUtils.bind(this,function(e){if(d){var f=this.ui.spinner.pause();
+this.ui.confirm(mxResources.get("replaceIt",[b]),function(){f();c(!0,e)},function(){f();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(b){c(!0)}),null,!0)};GitHubClient.prototype.saveFile=function(b,d,c,k,g){var e=b.meta.org,f=b.meta.repo,l=b.meta.ref,n=b.meta.path,p=mxUtils.bind(this,function(k,m){this.writeFile(e,f,l,n,g,m,k,mxUtils.bind(this,function(c){delete b.meta.isNew;
+d(JSON.parse(c.getText()).content.sha)}),mxUtils.bind(this,function(b){c(b)}))}),q=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(n)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){p(b.meta.sha,c)}),c,this.ui.getCurrentFile()!=b?b.getData():null,d.scale,d.border)}else p(b.meta.sha,Base64.encode(b.getData()))});k?this.getSha(e,f,n,l,mxUtils.bind(this,function(c){b.meta.sha=c;q()}),c):q()};GitHubClient.prototype.pickLibrary=
+function(b){this.pickFile(b)};GitHubClient.prototype.pickFolder=function(b){this.showGitHubDialog(!1,b)};GitHubClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("H"+encodeURIComponent(b))});this.showGitHubDialog(!0,b)};GitHubClient.prototype.showGitHubDialog=function(b,d){var c=null,e=null,g=null,m=null,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,
+mxResources.get(b?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.border="1px solid lightgray";n.style.boxSizing="border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";f.appendChild(n);var p=document.createElement("div");p.style.textOverflow="ellipsis";p.style.boxSizing="border-box";p.style.overflow=
+"hidden";p.style.padding="4px";p.style.width="100%";var q=new CustomDialog(this.ui,f,mxUtils.bind(this,function(){d(c+"/"+e+"/"+encodeURIComponent(g)+"/"+m)}));this.ui.showDialog(q.container,420,370,!0,!0);b&&q.okButton.parentNode.removeChild(q.okButton);var t=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=p.cloneNode(),b.style.padding=
+d,b.appendChild(f),f=b);return f}),u=mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(t(c+"/"+e,mxUtils.bind(this,function(){m=null;B()}),null,!0));b||(mxUtils.write(d," / "),d.appendChild(t(decodeURIComponent(g),mxUtils.bind(this,function(){m=null;y()}),null,!0)));if(null!=m&&0<m.length){var f=m.split("/");for(b=0;b<f.length;b++)(function(b){mxUtils.write(d," / ");d.appendChild(t(f[b],mxUtils.bind(this,function(){m=f.slice(0,b+1).join("/");
+z()}),null,!0))})(b)}n.appendChild(d)}),v=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(m=g=e=c=null,B()):this.ui.hideDialog()}),null,{})}),x=null,A=null,z=mxUtils.bind(this,function(f){null==f&&(n.innerHTML="",f=1);var k=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+e+"/contents/"+m+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+f,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));q.okButton.removeAttribute("disabled");
+null!=A&&(mxEvent.removeListener(n,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){z(f+1)});mxEvent.addListener(x,"click",l);this.executeRequest(k,mxUtils.bind(this,function(k){this.ui.spinner.stop();1==f&&(u(),n.appendChild(t("../ [Up]",mxUtils.bind(this,function(){if(""==m)m=null,B();else{var b=m.split("/");
+m=b.slice(0,b.length-1).join("/");z()}}),"4px")));var l=JSON.parse(k.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var y=!0,q=0;k=mxUtils.bind(this,function(f){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k,l){if(f==("dir"==k.type)){var B=p.cloneNode();B.style.backgroundColor=y?Editor.isDarkMode()?"#000000":"#eeeeee":"";y=!y;var u=document.createElement("img");u.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");u.setAttribute("align","absmiddle");
+u.style.marginRight="4px";u.style.marginTop="-4px";u.width=20;B.appendChild(u);B.appendChild(t(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(m=k.path,z()):b&&"file"==k.type&&(this.ui.hideDialog(),d(c+"/"+e+"/"+encodeURIComponent(g)+"/"+k.path))})));n.appendChild(B);q++}})(l[k],k)});k(!0);b&&k(!1)}}),v,!0)}),y=mxUtils.bind(this,function(b,d){null==b&&(n.innerHTML="",b=1);var f=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+e+"/branches?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(n,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){y(b+1)});mxEvent.addListener(x,"click",k);this.executeRequest(f,mxUtils.bind(this,function(c){this.ui.spinner.stop();1==b&&(u(!0),n.appendChild(t("../ [Up]",mxUtils.bind(this,
+function(){m=null;B()}),"4px")));c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(n,mxResources.get("noFiles"));else if(1==c.length&&d)g=c[0].name,m="",z();else{for(var e=0;e<c.length;e++)mxUtils.bind(this,function(b,c){var d=p.cloneNode();d.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";d.appendChild(t(b.name,mxUtils.bind(this,function(){g=b.name;m="";z()})));n.appendChild(d)})(c[e],e);100==c.length&&(n.appendChild(x),A=function(){n.scrollTop>=n.scrollHeight-
+n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",A))}}),v)}),B=mxUtils.bind(this,function(b){null==b&&(n.innerHTML="",b=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=A&&mxEvent.removeListener(n,"scroll",A);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,
+mxResources.get("more")+"...");var f=mxUtils.bind(this,function(){B(b+1)});mxEvent.addListener(x,"click",f);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==b&&(n.appendChild(t(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(b){if(null!=b){var d=b.split("/");
+if(1<d.length){b=d[0];var f=d[1];3>d.length?(c=b,e=f,m=g=null,y()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(b+"/"+f+"/"+d,mxUtils.bind(this,function(b){this.ui.spinner.stop();c=b.meta.org;e=b.meta.repo;g=decodeURIComponent(b.meta.ref);m="";z()}),mxUtils.bind(this,function(b){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(b.container,300,80,!0,!1);b.init()}))),mxUtils.br(n),mxUtils.br(n));for(var k=0;k<d.length;k++)mxUtils.bind(this,function(b,d){var f=p.cloneNode();f.style.backgroundColor=0==d%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";f.appendChild(t(b.full_name,mxUtils.bind(this,function(){c=b.owner.login;e=b.name;m="";y(null,!0)})));n.appendChild(f)})(d[k],k)}100==d.length&&(n.appendChild(x),A=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&f()},mxEvent.addListener(n,
"scroll",A))}),v)});B()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,d){DrawioFile.call(this,b,e);this.meta=d;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(b,e,d){this.doSave(this.getTitle(),e,d)};TrelloFile.prototype.saveAs=function(b,e,d){this.doSave(b,e,d)};TrelloFile.prototype.doSave=function(b,e,d){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,d)}),d])};
-TrelloFile.prototype.saveFile=function(b,e,d,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(g){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=g;this.contentChanged();null!=d&&d();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,d,c))}),mxUtils.bind(this,
-function(b){this.savingFile=!1;null!=c&&c(b)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(g){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(g){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(g);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,d,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,g)}))):null!=d&&d()};TrelloLibrary=function(b,e,d){TrelloFile.call(this,b,e,d)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"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";
+TrelloFile.prototype.saveFile=function(b,e,d,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(k){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=k;this.contentChanged();null!=d&&d();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,d,c))}),mxUtils.bind(this,
+function(b){this.savingFile=!1;null!=c&&c(b)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(k){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(g){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(g);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,d,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,k)}))):null!=d&&d()};TrelloLibrary=function(b,e,d){TrelloFile.call(this,b,e,d)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
TrelloClient.prototype.authenticate=function(b,e,d){d&&this.logout();d=mxUtils.bind(this,function(c,d){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=d&&d();b()},error:function(){null!=d&&d();null!=e&&e(mxResources.get("loggedOut"))}})});this.isAuthorized()?d(!0):this.ui.showAuthDialog(this,!0,d)};TrelloClient.prototype.getLibrary=function(b,e,d){this.getFile(b,e,d,!1,!0)};
-TrelloClient.prototype.getFile=function(b,e,d,c,g){g=null!=g?g:!1;var k=mxUtils.bind(this,function(){var c=b.split(this.SEPARATOR),f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;d({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout);Trello.cards.get(c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(c){window.clearTimeout(l);if(f){var n=/\.png$/i.test(c.name),m={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(c.name)||
-/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&n?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(c.url),c.name,c.mimeType,this.extension,e,d,null,m):(f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(c.url),mxUtils.bind(this,function(d){window.clearTimeout(l);if(f){c.compoundId=b;if(0<(n?d.lastIndexOf(","):-1)){var k=this.ui.extractGraphModelFromPng(d);null!=k&&0<k.length&&
-(d=k)}g?e(new TrelloLibrary(this.ui,d,c)):e(new TrelloFile(this.ui,d,c))}}),mxUtils.bind(this,function(b,c){window.clearTimeout(l);f&&(401==c.status?this.authenticate(k,d,!0):d())}),n||null!=c.mimeType&&"image/"==c.mimeType.substring(0,6),null,null,null,m))}}),mxUtils.bind(this,function(b){window.clearTimeout(l);f&&(null!=b&&401==b.status?this.authenticate(k,d,!0):d())}))});this.authenticate(k,d)};TrelloClient.prototype.insertLibrary=function(b,e,d,c,g){this.insertFile(b,e,d,c,!0,g)};
-TrelloClient.prototype.insertFile=function(b,e,d,c,g,k){g=null!=g?g:!1;var n=mxUtils.bind(this,function(){var f=mxUtils.bind(this,function(f){this.writeFile(b,f,k,mxUtils.bind(this,function(b){g?d(new TrelloLibrary(this.ui,e,b)):d(new TrelloFile(this.ui,e,b))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){f(this.ui.base64ToBlob(b,"image/png"))}),c,e):f(e)});this.authenticate(n,c)};
-TrelloClient.prototype.saveFile=function(b,e,d){var c=b.meta.compoundId.split(this.SEPARATOR),g=mxUtils.bind(this,function(g){this.writeFile(b.meta.name,g,c[0],function(b){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(b)}),mxUtils.bind(this,function(b){null!=b&&401==b.status?this.authenticate(k,d,!0):d()}))},d)}),k=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){g(this.ui.base64ToBlob(b,
-"image/png"))}),d,this.ui.getCurrentFile()!=b?b.getData():null):g(b.getData())});this.authenticate(k,d)};
-TrelloClient.prototype.writeFile=function(b,e,d,c,g){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)g({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var k=mxUtils.bind(this,function(){var n=!0,f=window.setTimeout(mxUtils.bind(this,function(){n=!1;g({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout),l=new FormData;l.append("key",Trello.key());l.append("token",Trello.token());l.append("file","string"===typeof e?new Blob([e]):e,b);l.append("name",
-b);var m=new XMLHttpRequest;m.responseType="json";m.onreadystatechange=mxUtils.bind(this,function(){if(4===m.readyState&&(window.clearTimeout(f),n))if(200==m.status){var b=m.response;b.compoundId=d+this.SEPARATOR+b.id;c(b)}else 401==m.status?this.authenticate(k,g,!0):g()});m.open("POST",this.baseUrl+"cards/"+d+"/attachments");m.send(l)});this.authenticate(k,g)}else g({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
+TrelloClient.prototype.getFile=function(b,e,d,c,k){k=null!=k?k:!1;var g=mxUtils.bind(this,function(){var c=b.split(this.SEPARATOR),f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;d({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout);Trello.cards.get(c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(c){window.clearTimeout(l);if(f){var m=/\.png$/i.test(c.name),n={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(c.name)||
+/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&m?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(c.url),c.name,c.mimeType,this.extension,e,d,null,n):(f=!0,l=window.setTimeout(mxUtils.bind(this,function(){f=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(c.url),mxUtils.bind(this,function(d){window.clearTimeout(l);if(f){c.compoundId=b;if(0<(m?d.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(d);null!=g&&0<g.length&&
+(d=g)}k?e(new TrelloLibrary(this.ui,d,c)):e(new TrelloFile(this.ui,d,c))}}),mxUtils.bind(this,function(b,c){window.clearTimeout(l);f&&(401==c.status?this.authenticate(g,d,!0):d())}),m||null!=c.mimeType&&"image/"==c.mimeType.substring(0,6),null,null,null,n))}}),mxUtils.bind(this,function(b){window.clearTimeout(l);f&&(null!=b&&401==b.status?this.authenticate(g,d,!0):d())}))});this.authenticate(g,d)};TrelloClient.prototype.insertLibrary=function(b,e,d,c,k){this.insertFile(b,e,d,c,!0,k)};
+TrelloClient.prototype.insertFile=function(b,e,d,c,k,g){k=null!=k?k:!1;var m=mxUtils.bind(this,function(){var f=mxUtils.bind(this,function(f){this.writeFile(b,f,g,mxUtils.bind(this,function(b){k?d(new TrelloLibrary(this.ui,e,b)):d(new TrelloFile(this.ui,e,b))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){f(this.ui.base64ToBlob(b,"image/png"))}),c,e):f(e)});this.authenticate(m,c)};
+TrelloClient.prototype.saveFile=function(b,e,d){var c=b.meta.compoundId.split(this.SEPARATOR),k=mxUtils.bind(this,function(k){this.writeFile(b.meta.name,k,c[0],function(b){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(b)}),mxUtils.bind(this,function(b){null!=b&&401==b.status?this.authenticate(g,d,!0):d()}))},d)}),g=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){k(this.ui.base64ToBlob(b,
+"image/png"))}),d,this.ui.getCurrentFile()!=b?b.getData():null):k(b.getData())});this.authenticate(g,d)};
+TrelloClient.prototype.writeFile=function(b,e,d,c,k){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var g=mxUtils.bind(this,function(){var m=!0,f=window.setTimeout(mxUtils.bind(this,function(){m=!1;k({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),l=new FormData;l.append("key",Trello.key());l.append("token",Trello.token());l.append("file","string"===typeof e?new Blob([e]):e,b);l.append("name",
+b);var n=new XMLHttpRequest;n.responseType="json";n.onreadystatechange=mxUtils.bind(this,function(){if(4===n.readyState&&(window.clearTimeout(f),m))if(200==n.status){var b=n.response;b.compoundId=d+this.SEPARATOR+b.id;c(b)}else 401==n.status?this.authenticate(g,k,!0):k()});n.open("POST",this.baseUrl+"cards/"+d+"/attachments");n.send(l)});this.authenticate(g,k)}else k({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(b){this.ui.showError(mxResources.get("error"),b)}))};TrelloClient.prototype.pickFile=function(b,e){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("T"+encodeURIComponent(b))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(b){this.ui.showError(mxResources.get("error"),b,mxResources.get("ok"))}))};
-TrelloClient.prototype.showTrelloDialog=function(b,e){var d=null,c="@me",g=0,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var n=document.createElement("h3");mxUtils.write(n,b?mxResources.get("selectFile"):mxResources.get("selectCard"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="auto";f.style.height=
-"194px";k.appendChild(f);k=new CustomDialog(this.ui,k);this.ui.showDialog(k.container,340,290,!0,!0);k.okButton.parentNode.removeChild(k.okButton);var l=mxUtils.bind(this,function(b,c,d){g++;var e=document.createElement("div");e.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==g%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var f=document.createElement("a");f.style.cursor="pointer";if(null!=d){var k=document.createElement("img");
-k.src=d.url;k.width=d.width;k.height=d.height;k.style="border: 1px solid black;margin:5px;vertical-align:middle";f.appendChild(k)}mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e.appendChild(f);return e}),m=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),p=mxUtils.bind(this,function(){g=0;f.innerHTML="";this.ui.spinner.spin(f,mxResources.get("loading"));var b=mxUtils.bind(this,function(){Trello.cards.get(d+
+TrelloClient.prototype.showTrelloDialog=function(b,e){var d=null,c="@me",k=0,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="224px";var m=document.createElement("h3");mxUtils.write(m,b?mxResources.get("selectFile"):mxResources.get("selectCard"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="auto";f.style.height=
+"194px";g.appendChild(f);g=new CustomDialog(this.ui,g);this.ui.showDialog(g.container,340,290,!0,!0);g.okButton.parentNode.removeChild(g.okButton);var l=mxUtils.bind(this,function(b,c,d){k++;var e=document.createElement("div");e.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==k%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var f=document.createElement("a");f.style.cursor="pointer";if(null!=d){var g=document.createElement("img");
+g.src=d.url;g.width=d.width;g.height=d.height;g.style="border: 1px solid black;margin:5px;vertical-align:middle";f.appendChild(g)}mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e.appendChild(f);return e}),n=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),p=mxUtils.bind(this,function(){k=0;f.innerHTML="";this.ui.spinner.spin(f,mxResources.get("loading"));var b=mxUtils.bind(this,function(){Trello.cards.get(d+
"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(b){this.ui.spinner.stop();f.appendChild(l("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(f);null==b||0==b.length?mxUtils.write(f,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var c=0;c<b.length;c++)mxUtils.bind(this,function(b){f.appendChild(l(b.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(d+this.SEPARATOR+b.id)}),null!=b.previews?b.previews[0]:null))})(b[c])})()}),mxUtils.bind(this,function(c){401==
-c.status?this.authenticate(b,m,!0):null!=m&&m(c)}))});b()}),q=null,t=null,u=mxUtils.bind(this,function(k){null==k&&(g=0,f.innerHTML="",k=1);this.ui.spinner.spin(f,mxResources.get("loading"));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 n=mxUtils.bind(this,function(){mxEvent.removeListener(f,"scroll",t);u(k+1)});mxEvent.addListener(q,"click",n);var v=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:k-1},mxUtils.bind(this,function(g){this.ui.spinner.stop();g=null!=g?g.cards:null;if(null==g||0==g.length)mxUtils.write(f,mxResources.get("noFiles"));else{1==k&&(f.appendChild(l(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(b){null!=b&&(c=b,u())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(b.container,300,80,!0,!1);b.init()}))),mxUtils.br(f));for(var m=0;m<g.length;m++)mxUtils.bind(this,function(c){f.appendChild(l(c.name,mxUtils.bind(this,function(){b?(d=c.id,p()):(this.ui.hideDialog(),e(c.id))})))})(g[m]);100==g.length&&(f.appendChild(q),t=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&n()},mxEvent.addListener(f,"scroll",t))}}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(v,m,!0):null!=m&&m({message:b.responseText})}))});v()});u()};
+c.status?this.authenticate(b,n,!0):null!=n&&n(c)}))});b()}),q=null,t=null,u=mxUtils.bind(this,function(g){null==g&&(k=0,f.innerHTML="",g=1);this.ui.spinner.spin(f,mxResources.get("loading"));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 m=mxUtils.bind(this,function(){mxEvent.removeListener(f,"scroll",t);u(g+1)});mxEvent.addListener(q,"click",m);var v=mxUtils.bind(this,
+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:g-1},mxUtils.bind(this,function(k){this.ui.spinner.stop();k=null!=k?k.cards:null;if(null==k||0==k.length)mxUtils.write(f,mxResources.get("noFiles"));else{1==g&&(f.appendChild(l(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(b){null!=b&&(c=b,u())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(b.container,300,80,!0,!1);b.init()}))),mxUtils.br(f));for(var n=0;n<k.length;n++)mxUtils.bind(this,function(c){f.appendChild(l(c.name,mxUtils.bind(this,function(){b?(d=c.id,p()):(this.ui.hideDialog(),e(c.id))})))})(k[n]);100==k.length&&(f.appendChild(q),t=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&m()},mxEvent.addListener(f,"scroll",t))}}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(v,n,!0):null!=n&&n({message:b.responseText})}))});v()});u()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(b){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(b,e,d){GitHubFile.call(this,b,e,d);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+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(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};
GitLabFile.prototype.setDescriptorEtag=function(b,e){b.last_commit_id=e};GitLabLibrary=function(b,e,d){GitLabFile.call(this,b,e,d)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(b){GitHubClient.call(this,b,"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.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/gitlab";GitLabClient.prototype.authenticate=
-function(b,d){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),b,d):null!=d&&d(c)}),d)};GitLabClient.prototype.authenticateStep2=function(e,d,c){if(null==window.onGitLabCallback){var g=mxUtils.bind(this,function(){var k=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+
-e),null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?(b=JSON.parse(e.getText()).access_token,this.setToken(b),this.setUser(null),d()):(this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==e.getStatus()?g():c({message:mxResources.get("accessDenied"),retry:g}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,f){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+
-encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(e,m){k?(window.onGitLabCallback=null,k=!1,null==e?c({message:mxResources.get("accessDenied"),retry:g}):(null!=f&&f(),b=e.access_token,this.setToken(b),this.setUser(null),n&&this.setPersistentToken("remembered"),d(),null!=m&&m.close())):null!=m&&m.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),
-retry:g})}),mxUtils.bind(this,function(){k&&(window.onGitLabCallback=null,k=!1,c({message:mxResources.get("accessDenied"),retry:g}))}))});g()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,d,c,g){var k=mxUtils.bind(this,function(f){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),p=this.authToken+" "+b;e.setRequestHeaders=function(b,c){b.setRequestHeader("Authorization",
-p);b.setRequestHeader("PRIVATE_TOKEN",p);b.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(m);if(l)if(200<=e.getStatus()&&299>=e.getStatus()||g&&404==e.getStatus())d(e);else if(401===e.getStatus())f?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},c)})}):this.authenticate(function(){k(!0)},c);else if(403===e.getStatus()){var b=!1;try{var p=JSON.parse(e.getText());null!=p&&
-null!=p.errors&&0<p.errors.length&&(b="too_large"==p.errors[0].code)}catch(u){}c({message:mxResources.get(b?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(b){window.clearTimeout(m);l&&c(b)}))}),n=mxUtils.bind(this,function(b){null==this.user?this.updateUser(function(){n(!0)},
-c,b):k(b)});null==b?this.authenticate(function(){n(!0)},c):n(!1)};GitLabClient.prototype.getRefIndex=function(b,d,c,g,k,n){if(null!=k)c(b,k);else{var e=b.length-2,l=mxUtils.bind(this,function(){if(2>e)g({message:mxResources.get("fileNotFound")});else{var f=Math.max(e-1,0),k=b.slice(0,f).join("/"),f=b[f],q=b[e],t=b.slice(e+1,b.length).join("/"),k=this.baseUrl+"/projects/"+encodeURIComponent(k+"/"+f)+"/repository/"+(d?n?"branches?per_page=1&page=1&ref="+q:"tree?path="+t+"&ref="+q:"files/"+encodeURIComponent(t)+
-"?ref="+q),u=new mxXmlRequest(k,null,"HEAD");this.executeRequest(u,mxUtils.bind(this,function(){200==u.getStatus()?c(b,e):g({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==u.getStatus()?(e--,l()):g({message:mxResources.get("fileNotFound")})}))}});l()}};GitLabClient.prototype.getFile=function(e,d,c,g,k,n){g=null!=g?g:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(f,l){var n=Math.max(l-1,0),p=f.slice(0,n).join("/"),q=f[n],t=f[l];e=f.slice(l+1,f.length).join("/");
-n=/\.png$/i.test(e);if(!k&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&n))if(null!=b){var n="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/files/"+encodeURIComponent(e)+"?ref="+t;f=e.split("/");this.ui.convertFile(u+n,0<f.length?f[f.length-1]:e,null,this.extension,d,c,mxUtils.bind(this,function(b,c,d){b=new mxXmlRequest(b,null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){try{c(this.getFileContent(JSON.parse(b.getText())))}catch(y){d(y)}}),
-d)}))}else c({message:mxResources.get("accessDenied")});else n="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/files/"+encodeURIComponent(e)+"?ref="+t,n=new mxXmlRequest(u+n,null,"GET"),this.executeRequest(n,mxUtils.bind(this,function(b){try{d(this.createGitLabFile(p,q,t,JSON.parse(b.getText()),g,l))}catch(x){c(x)}}),c)}),c,n)};GitLabClient.prototype.getFileContent=function(b){var d=b.file_name,c=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(d)?
-c="data:image/jpeg;base64,"+c:/\.gif$/i.test(d)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(d)?c="data:application/pdf;base64,"+c:/\.png$/i.test(d)?(b=this.ui.extractGraphModelFromPng(c),c=null!=b&&0<b.length?b:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(b,d,c,g,k,n){var e=DRAWIO_GITLAB_URL+"/";b={org:b,repo:d,ref:c,name:g.file_name,path:g.file_path,html_url:e+b+"/"+d+"/blob/"+c+"/"+g.file_path,download_url:e+b+"/"+d+"/raw/"+c+"/"+g.file_path+
-"?inline=false",last_commit_id:g.last_commit_id,refPos:n};g=this.getFileContent(g);return k?new GitLabLibrary(this.ui,g,b):new GitLabFile(this.ui,g,b)};GitLabClient.prototype.insertFile=function(b,d,c,g,k,n,f){k=null!=k?k:!1;n=n.split("/");this.getRefIndex(n,!0,mxUtils.bind(this,function(e,n){var l=Math.max(n-1,0),m=e.slice(0,l).join("/"),t=e[l],u=e[n];path=e.slice(n+1,e.length).join("/");0<path.length&&(path+="/");path+=b;this.checkExists(m+"/"+t+"/"+u+"/"+path,!0,mxUtils.bind(this,function(e,l){if(e)if(k)f||
-(d=Base64.encode(d)),this.showCommitDialog(b,!0,mxUtils.bind(this,function(b){this.writeFile(m,t,u,path,b,d,l,mxUtils.bind(this,function(b){try{var d=JSON.parse(b.getText());c(this.createGitLabFile(m,t,u,d.content,k,n))}catch(C){g(C)}}),g)}),g);else{var p=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,d,{org:m,repo:t,ref:u,name:b,path:path,html_url:p+m+"/"+t+"/blob/"+u+"/"+path,download_url:p+m+"/"+t+"/raw/"+u+"/"+path+"?inline=false",refPos:n,last_commit_id:l,isNew:!0}))}else g()}))}),g,null,4>=
-n.length)};GitLabClient.prototype.checkExists=function(b,d,c){this.getFile(b,mxUtils.bind(this,function(e){if(d){var g=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[b]),function(){g();c(!0,e.getCurrentEtag())},function(){g();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(b){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(b,d,c,g,k,n,
-f,l,m){if(n.length>=this.maxFileSize)m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(n.length)+" / 10 MB)"});else{var e="POST";c={path:encodeURIComponent(g),branch:decodeURIComponent(c),commit_message:k,content:n,encoding:"base64"};null!=f&&(c.last_commit_id=f,e="PUT");b=this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+d)+"/repository/files/"+encodeURIComponent(g);e=new mxXmlRequest(b,JSON.stringify(c),e);this.executeRequest(e,mxUtils.bind(this,function(b){l(b)}),m)}};
-GitLabClient.prototype.saveFile=function(b,d,c,g,k){var e=b.meta.org,f=b.meta.repo,l=b.meta.ref,m=b.meta.path,p=mxUtils.bind(this,function(g,n){this.writeFile(e,f,l,m,k,n,g,mxUtils.bind(this,function(g){delete b.meta.isNew;this.getFile(e+"/"+f+"/"+l+"/"+m,mxUtils.bind(this,function(c){c.getData()==b.getData()?d(c.getCurrentEtag()):d({content:b.getCurrentEtag()})}),c,null,null,b.meta.refPos)}),c)}),q=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(m)){var d=this.ui.getPngFileProperties(this.ui.fileNode);
-this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){p(b.meta.last_commit_id,c)}),c,this.ui.getCurrentFile()!=b?b.getData():null,d.scale,d.border)}else p(b.meta.last_commit_id,Base64.encode(b.getData()))});g?this.getFile(e+"/"+f+"/"+l+"/"+m,mxUtils.bind(this,function(c){b.meta.last_commit_id=c.meta.last_commit_id;q()}),c):q()};GitLabClient.prototype.pickFolder=function(b){this.showGitLabDialog(!1,b)};GitLabClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("A"+
-encodeURIComponent(b))});this.showGitLabDialog(!0,b)};GitLabClient.prototype.showGitLabDialog=function(e,d){var c=null,g=null,k=null,n=null,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(e?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var m=document.createElement("div");m.style.whiteSpace=
-"nowrap";m.style.border="1px solid lightgray";m.style.boxSizing="border-box";m.style.padding="4px";m.style.overflow="auto";m.style.lineHeight="1.2em";m.style.height="274px";f.appendChild(m);var p=document.createElement("div");p.style.textOverflow="ellipsis";p.style.boxSizing="border-box";p.style.overflow="hidden";p.style.padding="4px";p.style.width="100%";var q=new CustomDialog(this.ui,f,mxUtils.bind(this,function(){d(c+"/"+g+"/"+encodeURIComponent(k)+"/"+n)}));this.ui.showDialog(q.container,420,
-370,!0,!0);e&&q.okButton.parentNode.removeChild(q.okButton);var t=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=p.cloneNode(),b.style.padding=d,b.appendChild(f),f=b);return f}),u=mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(t(c+"/"+g,mxUtils.bind(this,function(){n=
-null;B()}),null,!0));b||(mxUtils.write(d," / "),d.appendChild(t(decodeURIComponent(k),mxUtils.bind(this,function(){n=null;y()}),null,!0)));if(null!=n&&0<n.length){var e=n.split("/");for(b=0;b<e.length;b++)(function(b){mxUtils.write(d," / ");d.appendChild(t(e[b],mxUtils.bind(this,function(){n=e.slice(0,b+1).join("/");z()}),null,!0))})(b)}m.appendChild(d)}),v=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(n=k=g=c=null,
-B()):this.ui.hideDialog()}))}),x=null,A=null,z=mxUtils.bind(this,function(b){null==b&&(m.innerHTML="",b=1);var f=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+g)+"/repository/tree?path="+n+"&ref="+k+"&per_page=100&page="+b,null,"GET");this.ui.spinner.spin(m,mxResources.get("loading"));q.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display=
-"block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){z(b+1)});mxEvent.addListener(x,"click",l);this.executeRequest(f,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==b&&(u(!k),m.appendChild(t("../ [Up]",mxUtils.bind(this,function(){if(""==n)n=null,B();else{var b=n.split("/");n=b.slice(0,b.length-1).join("/");z()}}),"4px")));var y=JSON.parse(f.getText());if(null==y||0==y.length)mxUtils.write(m,mxResources.get("noFiles"));else{var q=
+function(b,d){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),b,d):null!=d&&d(c)}),d)};GitLabClient.prototype.authenticateStep2=function(e,d,c){if(null==window.onGitLabCallback){var k=mxUtils.bind(this,function(){var g=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+
+e),null,"GET")).send(mxUtils.bind(this,function(e){200<=e.getStatus()&&299>=e.getStatus()?(b=JSON.parse(e.getText()).access_token,this.setToken(b),this.setUser(null),d()):(this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==e.getStatus()?k():c({message:mxResources.get("accessDenied"),retry:k}))}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(m,f){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope+"&redirect_uri="+
+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(e,n){g?(window.onGitLabCallback=null,g=!1,null==e?c({message:mxResources.get("accessDenied"),retry:k}):(null!=f&&f(),b=e.access_token,this.setToken(b),this.setUser(null),m&&this.setPersistentToken("remembered"),d(),null!=n&&n.close())):null!=n&&n.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),
+retry:k})}),mxUtils.bind(this,function(){g&&(window.onGitLabCallback=null,g=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,d,c,k){var g=mxUtils.bind(this,function(f){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),p=this.authToken+" "+b;e.setRequestHeaders=function(b,c){b.setRequestHeader("Authorization",
+p);b.setRequestHeader("PRIVATE_TOKEN",p);b.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(l)if(200<=e.getStatus()&&299>=e.getStatus()||k&&404==e.getStatus())d(e);else if(401===e.getStatus())f?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){m(!0)},c)})}):this.authenticate(function(){g(!0)},c);else if(403===e.getStatus()){var b=!1;try{var p=JSON.parse(e.getText());null!=p&&
+null!=p.errors&&0<p.errors.length&&(b="too_large"==p.errors[0].code)}catch(u){}c({message:mxResources.get(b?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(b){window.clearTimeout(n);l&&c(b)}))}),m=mxUtils.bind(this,function(b){null==this.user?this.updateUser(function(){m(!0)},
+c,b):g(b)});null==b?this.authenticate(function(){m(!0)},c):m(!1)};GitLabClient.prototype.getRefIndex=function(b,d,c,k,g,m){if(null!=g)c(b,g);else{var e=b.length-2,l=mxUtils.bind(this,function(){if(2>e)k({message:mxResources.get("fileNotFound")});else{var f=Math.max(e-1,0),g=b.slice(0,f).join("/"),f=b[f],q=b[e],t=b.slice(e+1,b.length).join("/"),g=this.baseUrl+"/projects/"+encodeURIComponent(g+"/"+f)+"/repository/"+(d?m?"branches?per_page=1&page=1&ref="+q:"tree?path="+t+"&ref="+q:"files/"+encodeURIComponent(t)+
+"?ref="+q),u=new mxXmlRequest(g,null,"HEAD");this.executeRequest(u,mxUtils.bind(this,function(){200==u.getStatus()?c(b,e):k({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==u.getStatus()?(e--,l()):k({message:mxResources.get("fileNotFound")})}))}});l()}};GitLabClient.prototype.getFile=function(e,d,c,k,g,m){k=null!=k?k:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(f,l){var m=Math.max(l-1,0),p=f.slice(0,m).join("/"),q=f[m],t=f[l];e=f.slice(l+1,f.length).join("/");
+m=/\.png$/i.test(e);if(!g&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&m))if(null!=b){var m="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/files/"+encodeURIComponent(e)+"?ref="+t;f=e.split("/");this.ui.convertFile(u+m,0<f.length?f[f.length-1]:e,null,this.extension,d,c,mxUtils.bind(this,function(b,c,d){b=new mxXmlRequest(b,null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){try{c(this.getFileContent(JSON.parse(b.getText())))}catch(y){d(y)}}),
+d)}))}else c({message:mxResources.get("accessDenied")});else m="&t="+(new Date).getTime(),u=this.baseUrl+"/projects/"+encodeURIComponent(p+"/"+q)+"/repository/files/"+encodeURIComponent(e)+"?ref="+t,m=new mxXmlRequest(u+m,null,"GET"),this.executeRequest(m,mxUtils.bind(this,function(b){try{d(this.createGitLabFile(p,q,t,JSON.parse(b.getText()),k,l))}catch(x){c(x)}}),c)}),c,m)};GitLabClient.prototype.getFileContent=function(b){var d=b.file_name,c=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(d)?
+c="data:image/jpeg;base64,"+c:/\.gif$/i.test(d)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(d)?c="data:application/pdf;base64,"+c:/\.png$/i.test(d)?(b=this.ui.extractGraphModelFromPng(c),c=null!=b&&0<b.length?b:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(b,d,c,k,g,m){var e=DRAWIO_GITLAB_URL+"/";b={org:b,repo:d,ref:c,name:k.file_name,path:k.file_path,html_url:e+b+"/"+d+"/blob/"+c+"/"+k.file_path,download_url:e+b+"/"+d+"/raw/"+c+"/"+k.file_path+
+"?inline=false",last_commit_id:k.last_commit_id,refPos:m};k=this.getFileContent(k);return g?new GitLabLibrary(this.ui,k,b):new GitLabFile(this.ui,k,b)};GitLabClient.prototype.insertFile=function(b,d,c,k,g,m,f){g=null!=g?g:!1;m=m.split("/");this.getRefIndex(m,!0,mxUtils.bind(this,function(e,m){var l=Math.max(m-1,0),n=e.slice(0,l).join("/"),t=e[l],u=e[m];path=e.slice(m+1,e.length).join("/");0<path.length&&(path+="/");path+=b;this.checkExists(n+"/"+t+"/"+u+"/"+path,!0,mxUtils.bind(this,function(e,l){if(e)if(g)f||
+(d=Base64.encode(d)),this.showCommitDialog(b,!0,mxUtils.bind(this,function(b){this.writeFile(n,t,u,path,b,d,l,mxUtils.bind(this,function(b){try{var d=JSON.parse(b.getText());c(this.createGitLabFile(n,t,u,d.content,g,m))}catch(C){k(C)}}),k)}),k);else{var p=DRAWIO_GITLAB_URL+"/";c(new GitLabFile(this.ui,d,{org:n,repo:t,ref:u,name:b,path:path,html_url:p+n+"/"+t+"/blob/"+u+"/"+path,download_url:p+n+"/"+t+"/raw/"+u+"/"+path+"?inline=false",refPos:m,last_commit_id:l,isNew:!0}))}else k()}))}),k,null,4>=
+m.length)};GitLabClient.prototype.checkExists=function(b,d,c){this.getFile(b,mxUtils.bind(this,function(e){if(d){var g=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[b]),function(){g();c(!0,e.getCurrentEtag())},function(){g();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(b){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(b,d,c,k,g,m,
+f,l,n){if(m.length>=this.maxFileSize)n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(m.length)+" / 10 MB)"});else{var e="POST";c={path:encodeURIComponent(k),branch:decodeURIComponent(c),commit_message:g,content:m,encoding:"base64"};null!=f&&(c.last_commit_id=f,e="PUT");b=this.baseUrl+"/projects/"+encodeURIComponent(b+"/"+d)+"/repository/files/"+encodeURIComponent(k);e=new mxXmlRequest(b,JSON.stringify(c),e);this.executeRequest(e,mxUtils.bind(this,function(b){l(b)}),n)}};
+GitLabClient.prototype.saveFile=function(b,d,c,k,g){var e=b.meta.org,f=b.meta.repo,l=b.meta.ref,n=b.meta.path,p=mxUtils.bind(this,function(k,m){this.writeFile(e,f,l,n,g,m,k,mxUtils.bind(this,function(g){delete b.meta.isNew;this.getFile(e+"/"+f+"/"+l+"/"+n,mxUtils.bind(this,function(c){c.getData()==b.getData()?d(c.getCurrentEtag()):d({content:b.getCurrentEtag()})}),c,null,null,b.meta.refPos)}),c)}),q=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(n)){var d=this.ui.getPngFileProperties(this.ui.fileNode);
+this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){p(b.meta.last_commit_id,c)}),c,this.ui.getCurrentFile()!=b?b.getData():null,d.scale,d.border)}else p(b.meta.last_commit_id,Base64.encode(b.getData()))});k?this.getFile(e+"/"+f+"/"+l+"/"+n,mxUtils.bind(this,function(c){b.meta.last_commit_id=c.meta.last_commit_id;q()}),c):q()};GitLabClient.prototype.pickFolder=function(b){this.showGitLabDialog(!1,b)};GitLabClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("A"+
+encodeURIComponent(b))});this.showGitLabDialog(!0,b)};GitLabClient.prototype.showGitLabDialog=function(e,d){var c=null,k=null,g=null,m=null,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(e?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(l);var n=document.createElement("div");n.style.whiteSpace=
+"nowrap";n.style.border="1px solid lightgray";n.style.boxSizing="border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";f.appendChild(n);var p=document.createElement("div");p.style.textOverflow="ellipsis";p.style.boxSizing="border-box";p.style.overflow="hidden";p.style.padding="4px";p.style.width="100%";var q=new CustomDialog(this.ui,f,mxUtils.bind(this,function(){d(c+"/"+k+"/"+encodeURIComponent(g)+"/"+m)}));this.ui.showDialog(q.container,420,
+370,!0,!0);e&&q.okButton.parentNode.removeChild(q.okButton);var t=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=p.cloneNode(),b.style.padding=d,b.appendChild(f),f=b);return f}),u=mxUtils.bind(this,function(b){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(t(c+"/"+k,mxUtils.bind(this,function(){m=
+null;B()}),null,!0));b||(mxUtils.write(d," / "),d.appendChild(t(decodeURIComponent(g),mxUtils.bind(this,function(){m=null;y()}),null,!0)));if(null!=m&&0<m.length){var e=m.split("/");for(b=0;b<e.length;b++)(function(b){mxUtils.write(d," / ");d.appendChild(t(e[b],mxUtils.bind(this,function(){m=e.slice(0,b+1).join("/");z()}),null,!0))})(b)}n.appendChild(d)}),v=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(m=g=k=c=null,
+B()):this.ui.hideDialog()}))}),x=null,A=null,z=mxUtils.bind(this,function(b){null==b&&(n.innerHTML="",b=1);var f=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+k)+"/repository/tree?path="+m+"&ref="+g+"&per_page=100&page="+b,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));q.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(n,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display=
+"block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var l=mxUtils.bind(this,function(){z(b+1)});mxEvent.addListener(x,"click",l);this.executeRequest(f,mxUtils.bind(this,function(f){this.ui.spinner.stop();1==b&&(u(!g),n.appendChild(t("../ [Up]",mxUtils.bind(this,function(){if(""==m)m=null,B();else{var b=m.split("/");m=b.slice(0,b.length-1).join("/");z()}}),"4px")));var y=JSON.parse(f.getText());if(null==y||0==y.length)mxUtils.write(n,mxResources.get("noFiles"));else{var q=
!0,v=0;f=mxUtils.bind(this,function(b){for(var f=0;f<y.length;f++)mxUtils.bind(this,function(f){if(b==("tree"==f.type)){var l=p.cloneNode();l.style.backgroundColor=q?Editor.isDarkMode()?"#000000":"#eeeeee":"";q=!q;var y=document.createElement("img");y.src=IMAGE_PATH+"/"+("tree"==f.type?"folder.png":"file.png");y.setAttribute("align","absmiddle");y.style.marginRight="4px";y.style.marginTop="-4px";y.width=20;l.appendChild(y);l.appendChild(t(f.name+("tree"==f.type?"/":""),mxUtils.bind(this,function(){"tree"==
-f.type?(n=f.path,z()):e&&"blob"==f.type&&(this.ui.hideDialog(),d(c+"/"+g+"/"+k+"/"+f.path))})));m.appendChild(l);v++}})(y[f])});f(!0);e&&f(!1);100==v&&(m.appendChild(x),A=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&l()},mxEvent.addListener(m,"scroll",A))}}),v,!0)}),y=mxUtils.bind(this,function(b,d){null==b&&(m.innerHTML="",b=1);var e=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+g)+"/repository/branches?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var f=mxUtils.bind(this,function(){y(b+1)});mxEvent.addListener(x,"click",f);this.executeRequest(e,mxUtils.bind(this,function(c){this.ui.spinner.stop();1==b&&(u(!0),m.appendChild(t("../ [Up]",mxUtils.bind(this,
-function(){n=null;B()}),"4px")));c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(m,mxResources.get("noFiles"));else if(1==c.length&&d)k=c[0].name,n="",z();else{for(var e=0;e<c.length;e++)mxUtils.bind(this,function(b,c){var d=p.cloneNode();d.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";d.appendChild(t(b.name,mxUtils.bind(this,function(){k=encodeURIComponent(b.name);n="";z()})));m.appendChild(d)})(c[e],e);100==c.length&&(m.appendChild(x),A=function(){m.scrollTop>=
-m.scrollHeight-m.offsetHeight&&f()},mxEvent.addListener(m,"scroll",A))}}),v)});q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));var B=mxUtils.bind(this,function(b){var d=this.ui.spinner,e=0;this.ui.spinner.stop();var f=function(){d.spin(m,mxResources.get("loading"));e+=1},l=function(){--e;0===e&&d.stop()};null==b&&(m.innerHTML="",b=1);null!=A&&(mxEvent.removeListener(m,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");
+f.type?(m=f.path,z()):e&&"blob"==f.type&&(this.ui.hideDialog(),d(c+"/"+k+"/"+g+"/"+f.path))})));n.appendChild(l);v++}})(y[f])});f(!0);e&&f(!1);100==v&&(n.appendChild(x),A=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&l()},mxEvent.addListener(n,"scroll",A))}}),v,!0)}),y=mxUtils.bind(this,function(b,d){null==b&&(n.innerHTML="",b=1);var e=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+k)+"/repository/branches?per_page=100&page="+b,null,"GET");q.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(n,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var f=mxUtils.bind(this,function(){y(b+1)});mxEvent.addListener(x,"click",f);this.executeRequest(e,mxUtils.bind(this,function(c){this.ui.spinner.stop();1==b&&(u(!0),n.appendChild(t("../ [Up]",mxUtils.bind(this,
+function(){m=null;B()}),"4px")));c=JSON.parse(c.getText());if(null==c||0==c.length)mxUtils.write(n,mxResources.get("noFiles"));else if(1==c.length&&d)g=c[0].name,m="",z();else{for(var e=0;e<c.length;e++)mxUtils.bind(this,function(b,c){var d=p.cloneNode();d.style.backgroundColor=0==c%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";d.appendChild(t(b.name,mxUtils.bind(this,function(){g=encodeURIComponent(b.name);m="";z()})));n.appendChild(d)})(c[e],e);100==c.length&&(n.appendChild(x),A=function(){n.scrollTop>=
+n.scrollHeight-n.offsetHeight&&f()},mxEvent.addListener(n,"scroll",A))}}),v)});q.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));var B=mxUtils.bind(this,function(b){var d=this.ui.spinner,e=0;this.ui.spinner.stop();var f=function(){d.spin(n,mxResources.get("loading"));e+=1},l=function(){--e;0===e&&d.stop()};null==b&&(n.innerHTML="",b=1);null!=A&&(mxEvent.removeListener(n,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");
x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===e&&B(b+1)});mxEvent.addListener(x,"click",q);var u=mxUtils.bind(this,function(b){f();var c=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){b(JSON.parse(c.getText()));l()}),v)}),C=mxUtils.bind(this,function(b,c){f();var d=new mxXmlRequest(this.baseUrl+"/groups/"+b.id+"/projects?per_page=100",null,
-"GET");this.executeRequest(d,mxUtils.bind(this,function(d){c(b,JSON.parse(d.getText()));l()}),v)});u(mxUtils.bind(this,function(d){f();var B=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+b,null,"GET");this.executeRequest(B,mxUtils.bind(this,function(B){B=JSON.parse(B.getText());if(null!=B&&0!=B.length||null!=d&&0!=d.length){1==b&&(m.appendChild(t(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===e){var b=new FilenameDialog(this.ui,"org/repo/ref",
-mxResources.get("ok"),mxUtils.bind(this,function(b){null!=b&&(b=b.split("/"),1<b.length?(c=b[0],g=b[1],k=n=null,2<b.length?(k=encodeURIComponent(b.slice(2,b.length).join("/")),z()):y(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(b.container,300,80,!0,!1);b.init()}}))),mxUtils.br(m),mxUtils.br(m));for(var u=!0,v=0;v<B.length;v++)mxUtils.bind(this,function(b){var d=p.cloneNode();d.style.backgroundColor=
-u?Editor.isDarkMode()?"#000000":"#eeeeee":"";u=!u;d.appendChild(t(b.name_with_namespace,mxUtils.bind(this,function(){0===e&&(c=b.owner.username,g=b.path,n="",y(null,!0))})));m.appendChild(d)})(B[v]);for(v=0;v<d.length;v++)f(),C(d[v],mxUtils.bind(this,function(b,d){l();for(var f=0;f<d.length;f++){var k=p.cloneNode();k.style.backgroundColor=u?"dark"==uiTheme?"#000000":"#eeeeee":"";u=!u;mxUtils.bind(this,function(d){k.appendChild(t(d.name_with_namespace,mxUtils.bind(this,function(){0===e&&(c=b.full_path,
-g=d.path,n="",y(null,!0))})));m.appendChild(k)})(d[f])}}));l()}else mxUtils.write(m,mxResources.get("noFiles"));100==B.length&&(m.appendChild(x),A=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&q()},mxEvent.addListener(m,"scroll",A))}),v)}))});b?this.user?B():this.updateUser(function(){B()},v,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){B()},v,!0)}),v)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+
-this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();NotionFile=function(b,e,d){DrawioFile.call(this,b,e);this.meta=d;this.peer=this.ui.notion};mxUtils.extend(NotionFile,DrawioFile);NotionFile.prototype.getId=function(){return this.meta.id};NotionFile.prototype.getHash=function(){return encodeURIComponent("N"+this.getId())};NotionFile.prototype.getMode=function(){return App.MODE_NOTION};NotionFile.prototype.isAutosave=function(){return!1};NotionFile.prototype.getTitle=function(){return this.meta.name};NotionFile.prototype.isRenamable=function(){return!1};
-NotionFile.prototype.isCompressedStorage=function(){return!0};NotionFile.prototype.save=function(b,e,d,c,g){this.doSave(this.getTitle(),e,d,c,g)};NotionFile.prototype.saveAs=function(b,e,d){this.doSave(b,e,d)};NotionFile.prototype.doSave=function(b,e,d,c,g){var k=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=k;this.saveFile(b,!1,e,d,c,g)}),d,c,g])};
-NotionFile.prototype.saveFile=function(b,e,d,c,g,k){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.getTitle()==b)try{this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.peer.saveFile(this,mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.savingFile=!1;null!=d&&d()}),mxUtils.bind(this,function(b){this.savingFile=!1;null!=c&&c(b)}),k)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}else this.savingFileTime=
-new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(e){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(b)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,e)}));else null!=d&&d()};NotionLibrary=function(b,e,d){NotionFile.call(this,b,e,d)};mxUtils.extend(NotionLibrary,NotionFile);NotionLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};NotionLibrary.prototype.open=function(){};(function(){var b=null;window.NotionClient=function(b){DrawioClient.call(this,b,"notionAuthInfo")};mxUtils.extend(NotionClient,DrawioClient);NotionClient.prototype.extension=".drawio";NotionClient.prototype.baseUrl=window.NOTION_API_URL||("test.draw.io"==window.location.hostname?"https://notion.jgraph.workers.dev/api":"/notion-api");NotionClient.prototype.getTitle=function(b){if("string"===typeof b.title)return b.title;for(var d=[],c=0;c<b.title.length;c++)d.push(b.title[c].text.content);return d.join(" ")};
-NotionClient.prototype.authenticate=function(e,d,c){var g=!0,k=mxUtils.bind(this,function(){g&&(g=!1,d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.ui.hideDialog();n()})}))}),n=mxUtils.bind(this,function(){g=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(d,l){var f=new FilenameDialog(this.ui,"",mxResources.get("ok"),mxUtils.bind(this,function(f){b=f;this.executeRequest("/v1/databases",null,"GET",mxUtils.bind(this,function(){this.executeRequest("/setToken",
-null,"GET",mxUtils.bind(this,function(){g=!1;d&&(b=null);null!=l&&l();e()}),k,c)}),k,c)}),mxResources.get("notionToken"),function(b){return null!=b&&0<b.length},null,"https://developers.notion.com/docs/getting-started#step-1-create-an-integration");this.ui.showDialog(f.container,300,80,!0,!0);f.init()}),k)});n()};NotionClient.prototype.executeRequest=function(e,d,c,g,k,n){var f=mxUtils.bind(this,function(){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;k({code:App.ERROR_TIMEOUT,retry:f})}),
-this.ui.timeout),p=new mxXmlRequest(this.baseUrl+e,d,c);p.withCredentials=!0;p.setRequestHeaders=mxUtils.bind(this,function(c,d){null!=b&&c.setRequestHeader("Authorization","Bearer "+b);c.setRequestHeader("Notion-Version","2021-05-13");c.setRequestHeader("Content-Type","application/json")});p.send(mxUtils.bind(this,function(b){window.clearTimeout(m);l&&(200<=b.getStatus()&&299>=b.getStatus()?(null==this.user&&this.setUser(new DrawioUser("notion",null,"Notion")),g(JSON.parse(b.getText()))):n||401!==
-b.getStatus()&&400!==b.getStatus()?k(this.parseRequestText(b)):(this.setUser(null),n=!0,this.authenticate(function(){f()},k,n)))}),mxUtils.bind(this,function(b){window.clearTimeout(m);l&&k(b)}))});f()};NotionClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!1,!0)};NotionClient.prototype.getFile=function(b,d,c,g,k){k=null!=k?k:!1;this.executeRequest("/v1/pages/"+encodeURIComponent(b),null,"GET",mxUtils.bind(this,function(e){try{var f=e.properties.xml.rich_text,g="",n=this.getTitle(e.properties.Name);
-for(e=0;e<f.length;e++)g+=f[e].text.content;f={id:b,name:n};k?d(new NotionLibrary(this.ui,g,f)):d(new NotionFile(this.ui,g,f))}catch(p){if(null!=c)c(p);else throw p;}}),c)};NotionClient.prototype.insertLibrary=function(b,d,c,g,k){this.insertFile(b,d,c,g,!0,k)};NotionClient.prototype.insertFile=function(b,d,c,g,k,n){k=null!=k?k:!1;this.checkExists(n,b,!0,mxUtils.bind(this,function(e,l){e?this.writeFile(l?"/v1/pages/"+encodeURIComponent(l):"/v1/pages",l?null:n,b,d,l?"PATCH":"POST",mxUtils.bind(this,
-function(b){b={id:b.id,name:this.getTitle(b.properties.Name)};k?c(new NotionLibrary(this.ui,d,b)):c(new NotionFile(this.ui,d,b))}),g):g()}))};NotionClient.prototype.checkExists=function(b,d,c,g){this.executeRequest("/v1/databases/"+encodeURIComponent(b)+"/query",JSON.stringify({filter:{property:"Name",text:{equals:d}}}),"POST",mxUtils.bind(this,function(b){0==b.results.length?g(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[d]),function(){g(!0,b.results[0].id)},function(){g(!1)})):
-(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){g(!1)}))}),function(b){g(!1)})};NotionClient.prototype.saveFile=function(b,d,c){try{var e=b.getData();this.writeFile("/v1/pages/"+b.getId(),null,b.getTitle(),e,"PATCH",mxUtils.bind(this,function(b){d(b,e)}),c)}catch(k){c(k)}};NotionClient.prototype.writeFile=function(b,d,c,g,k,n,f){try{if(null!=b&&null!=g)if(2E5<g.length)f({message:mxResources.get("drawingTooLarge")+" ("+
-this.ui.formatFileSize(g.length)+" / 200 KB)"});else{for(var e=[],m=Math.ceil(g.length/2E3),p=0;p<m;p++)e.push({text:{content:g.substr(2E3*p,2E3)}});c={properties:{Name:{title:[{text:{content:c}}]},xml:{rich_text:e}}};d&&(c.parent={database_id:d});this.executeRequest(b,JSON.stringify(c),k,n,f)}else f({message:mxResources.get("unknownError")})}catch(q){f(q)}};NotionClient.prototype.parseRequestText=function(b){var d={message:mxResources.get("unknownError")};try{d=JSON.parse(b.getText())}catch(c){}return d};
-NotionClient.prototype.pickLibrary=function(b){this.pickFile(b)};NotionClient.prototype.pickFolder=function(b){this.showNotionDialog(!1,b)};NotionClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("N"+encodeURIComponent(b))});this.showNotionDialog(!0,b)};NotionClient.prototype.showNotionDialog=function(b,d){var c,e,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="304px";var n=document.createElement("h3");
-mxUtils.write(n,mxResources.get(b?"officeSelDiag":"selectDB"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.border="1px solid lightgray";f.style.boxSizing="border-box";f.style.padding="4px";f.style.overflow="auto";f.style.lineHeight="1.2em";f.style.height="274px";k.appendChild(f);var l=document.createElement("div");l.style.textOverflow="ellipsis";l.style.boxSizing="border-box";
-l.style.overflow="hidden";l.style.padding="4px";l.style.width="100%";var m=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){d(c)}));this.ui.showDialog(m.container,420,380,!0,!0);b&&m.okButton.parentNode.removeChild(m.okButton);var p=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=l.cloneNode(),b.style.padding=d,b.appendChild(f),
-f=b);return f}),q=mxUtils.bind(this,function(){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(p(e,mxUtils.bind(this,function(){c=null;A()}),null,!0));f.appendChild(b)}),t=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(c=null,A()):this.ui.hideDialog()}),null,{})}),u=null,v=null,x=mxUtils.bind(this,function(b){null==b&&(f.innerHTML="");this.ui.spinner.spin(f,mxResources.get("loading"));
-m.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(f,"scroll",v),v=null);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.style.cursor="pointer";mxUtils.write(u,mxResources.get("more")+"...");var e=mxUtils.bind(this,function(){x(b)});mxEvent.addListener(u,"click",e);var g={page_size:100};null!=b&&(g.start_cursor=b);this.executeRequest("/v1/databases/"+encodeURIComponent(c)+"/query",JSON.stringify(g),"POST",mxUtils.bind(this,
-function(g){this.ui.spinner.stop();null==b&&(q(),f.appendChild(p("../ [Up]",mxUtils.bind(this,function(){c=null;A()}),"4px")));var k=g.results;if(null==k||0==k.length)mxUtils.write(f,mxResources.get("noFiles"));else{for(var n=!0,m=0;m<k.length;m++)mxUtils.bind(this,function(b,c){var e=l.cloneNode();e.style.backgroundColor=n?Editor.isDarkMode()?"#000000":"#eeeeee":"";n=!n;var g=document.createElement("img");g.src=IMAGE_PATH+"/file.png";g.setAttribute("align","absmiddle");g.style.marginRight="4px";
-g.style.marginTop="-4px";g.width=20;e.appendChild(g);e.appendChild(p(this.getTitle(b.properties.Name),mxUtils.bind(this,function(){this.ui.hideDialog();d(b.id)})));f.appendChild(e)})(k[m],m);g.has_more&&(b=g.next_cursor,f.appendChild(u),v=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&e()},mxEvent.addListener(f,"scroll",v))}}),t,!0)}),A=mxUtils.bind(this,function(g){null==g&&(f.innerHTML="");m.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(f,mxResources.get("loading"));
-null!=v&&mxEvent.removeListener(f,"scroll",v);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.style.cursor="pointer";mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){A(g)});mxEvent.addListener(u,"click",k);this.executeRequest("/v1/databases?page_size=100"+(null!=g?"&start_cursor="+g:""),null,"GET",mxUtils.bind(this,function(n){this.ui.spinner.stop();var m=n.results,y=0;if(null==m||0==m.length)mxUtils.write(f,
-mxResources.get("noDBs"));else for(var q=0;q<m.length;q++)m[q].properties.Name&&"title"==m[q].properties.Name.type&&m[q].properties.xml&&"rich_text"==m[q].properties.xml.type&&(mxUtils.bind(this,function(g,k){var n=l.cloneNode();n.style.backgroundColor=0==k%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";n.appendChild(p(this.getTitle(g),mxUtils.bind(this,function(){c=g.id;e=this.getTitle(g);b?x():(this.ui.hideDialog(),d(c))})));f.appendChild(n)})(m[q],q),y++);n.has_more?(g=n.next_cursor,0==y?k():(f.appendChild(u),
-v=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&k()},mxEvent.addListener(f,"scroll",v))):0==y&&""==f.innerHTML&&mxUtils.write(f,mxResources.get("noDBs"))}),t)});A()};NotionClient.prototype.logout=function(){this.executeRequest("/removeToken",null,"GET",function(){},function(){});this.setUser(null);b=null}})();DrawioComment=function(b,e,d,c,g,k,n){this.file=b;this.id=e;this.content=d;this.modifiedDate=c;this.createdDate=g;this.isResolved=k;this.user=n;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,d,c,g){e()};DrawioComment.prototype.editComment=function(b,e,d){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,d,c,g,k,n,f){DrawioComment.call(this,b,e,d,c,g,k,n);this.pCommentId=f};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,d,c,g){b={content:b.content};c?b.verb="resolve":g&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(b){e(b.replyId)}),d)};
+"GET");this.executeRequest(d,mxUtils.bind(this,function(d){c(b,JSON.parse(d.getText()));l()}),v)});u(mxUtils.bind(this,function(d){f();var B=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+b,null,"GET");this.executeRequest(B,mxUtils.bind(this,function(B){B=JSON.parse(B.getText());if(null!=B&&0!=B.length||null!=d&&0!=d.length){1==b&&(n.appendChild(t(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===e){var b=new FilenameDialog(this.ui,"org/repo/ref",
+mxResources.get("ok"),mxUtils.bind(this,function(b){null!=b&&(b=b.split("/"),1<b.length?(c=b[0],k=b[1],g=m=null,2<b.length?(g=encodeURIComponent(b.slice(2,b.length).join("/")),z()):y(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(b.container,300,80,!0,!1);b.init()}}))),mxUtils.br(n),mxUtils.br(n));for(var u=!0,v=0;v<B.length;v++)mxUtils.bind(this,function(b){var d=p.cloneNode();d.style.backgroundColor=
+u?Editor.isDarkMode()?"#000000":"#eeeeee":"";u=!u;d.appendChild(t(b.name_with_namespace,mxUtils.bind(this,function(){0===e&&(c=b.owner.username,k=b.path,m="",y(null,!0))})));n.appendChild(d)})(B[v]);for(v=0;v<d.length;v++)f(),C(d[v],mxUtils.bind(this,function(b,d){l();for(var f=0;f<d.length;f++){var g=p.cloneNode();g.style.backgroundColor=u?"dark"==uiTheme?"#000000":"#eeeeee":"";u=!u;mxUtils.bind(this,function(d){g.appendChild(t(d.name_with_namespace,mxUtils.bind(this,function(){0===e&&(c=b.full_path,
+k=d.path,m="",y(null,!0))})));n.appendChild(g)})(d[f])}}));l()}else mxUtils.write(n,mxResources.get("noFiles"));100==B.length&&(n.appendChild(x),A=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&q()},mxEvent.addListener(n,"scroll",A))}),v)}))});b?this.user?B():this.updateUser(function(){B()},v,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){B()},v,!0)}),v)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+
+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();NotionFile=function(b,e,d){DrawioFile.call(this,b,e);this.meta=d;this.peer=this.ui.notion};mxUtils.extend(NotionFile,DrawioFile);NotionFile.prototype.getId=function(){return this.meta.id};NotionFile.prototype.getHash=function(){return encodeURIComponent("N"+this.getId())};NotionFile.prototype.getMode=function(){return App.MODE_NOTION};NotionFile.prototype.isAutosave=function(){return!1};NotionFile.prototype.getTitle=function(){return this.meta.name};NotionFile.prototype.getNameField=function(){return this.meta.nameField};
+NotionFile.prototype.isRenamable=function(){return!1};NotionFile.prototype.isCompressedStorage=function(){return!0};NotionFile.prototype.save=function(b,e,d,c,k){this.doSave(this.getTitle(),e,d,c,k)};NotionFile.prototype.saveAs=function(b,e,d){this.doSave(b,e,d)};NotionFile.prototype.doSave=function(b,e,d,c,k){var g=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=g;this.saveFile(b,!1,e,d,c,k)}),d,c,k])};
+NotionFile.prototype.saveFile=function(b,e,d,c,k,g){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.getTitle()==b)try{this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.peer.saveFile(this,mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.savingFile=!1;null!=d&&d()}),mxUtils.bind(this,function(b){this.savingFile=!1;null!=c&&c(b)}),g)}catch(m){if(this.savingFile=!1,null!=c)c(m);else throw m;}else this.savingFileTime=
+new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(e){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(b){this.setModified(this.getShadowModified());this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(b)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,e)}));else null!=d&&d()};NotionLibrary=function(b,e,d){NotionFile.call(this,b,e,d)};mxUtils.extend(NotionLibrary,NotionFile);NotionLibrary.prototype.doSave=function(b,e,d){this.saveFile(b,!1,e,d)};NotionLibrary.prototype.open=function(){};(function(){var b=null;window.NotionClient=function(b){DrawioClient.call(this,b,"notionAuthInfo")};mxUtils.extend(NotionClient,DrawioClient);NotionClient.prototype.extension=".drawio";NotionClient.prototype.xmlField="draw.io XML";NotionClient.prototype.baseUrl=window.NOTION_API_URL||"https://app.diagrams.net/notion-api";NotionClient.prototype.getTitle=function(b){var d,c,e;for(e in b)if("title"==b[e].type){c=e;d=b[e];break}return{title:this.getTitleVal(d),key:c}};NotionClient.prototype.getTitleVal=
+function(b){if("string"===typeof b.title)return b.title;for(var d=[],c=0;c<b.title.length;c++)d.push(b.title[c].text.content);return d.join(" ")};NotionClient.prototype.authenticate=function(e,d,c){var k=!0,g=mxUtils.bind(this,function(){k&&(k=!1,d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.ui.hideDialog();m()})}))}),m=mxUtils.bind(this,function(){k=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(d,l){var f=new FilenameDialog(this.ui,"",mxResources.get("ok"),
+mxUtils.bind(this,function(f){b=f;this.executeRequest("/v1/databases",null,"GET",mxUtils.bind(this,function(){this.executeRequest("/setToken",null,"GET",mxUtils.bind(this,function(){k=!1;d&&(b=null);null!=l&&l();e()}),g,c)}),g,c)}),mxResources.get("notionToken"),function(b){return null!=b&&0<b.length},null,"https://developers.notion.com/docs/getting-started#step-1-create-an-integration");this.ui.showDialog(f.container,300,80,!0,!0);f.init()}),g)});m()};NotionClient.prototype.executeRequest=function(e,
+d,c,k,g,m){var f=mxUtils.bind(this,function(){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;g({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),p=new mxXmlRequest(this.baseUrl+e,d,c);p.withCredentials=!0;p.setRequestHeaders=mxUtils.bind(this,function(c,d){null!=b&&c.setRequestHeader("Authorization","Bearer "+b);c.setRequestHeader("Notion-Version","2021-05-13");c.setRequestHeader("Content-Type","application/json")});p.send(mxUtils.bind(this,function(b){window.clearTimeout(n);l&&
+(200<=b.getStatus()&&299>=b.getStatus()?(null==this.user&&this.setUser(new DrawioUser("notion",null,"Notion")),k(JSON.parse(b.getText()))):m||401!==b.getStatus()&&400!==b.getStatus()?g(this.parseRequestText(b)):(this.setUser(null),m=!0,this.authenticate(function(){f()},g,m)))}),mxUtils.bind(this,function(b){window.clearTimeout(n);l&&g(b)}))});f()};NotionClient.prototype.getLibrary=function(b,d,c){this.getFile(b,d,c,!1,!0)};NotionClient.prototype.getFile=function(b,d,c,k,g){g=null!=g?g:!1;this.executeRequest("/v1/pages/"+
+encodeURIComponent(b),null,"GET",mxUtils.bind(this,function(e){try{var f=e.properties[this.xmlField].rich_text,k="",m=this.getTitle(e.properties);for(e=0;e<f.length;e++)k+=f[e].text.content;var p={id:b,name:m.title,nameField:m.key};g?d(new NotionLibrary(this.ui,k,p)):d(new NotionFile(this.ui,k,p))}catch(q){if(null!=c)c(q);else throw q;}}),c)};NotionClient.prototype.insertLibrary=function(b,d,c,k,g){this.insertFile(b,d,c,k,!0,g)};NotionClient.prototype.insertFile=function(b,d,c,k,g,m){g=null!=g?g:
+!1;var e,l,n=mxUtils.bind(this,function(){this.checkExists(e,b,l,!0,mxUtils.bind(this,function(f,m){f?this.writeFile(m?"/v1/pages/"+encodeURIComponent(m):"/v1/pages",m?null:e,b,l,d,m?"PATCH":"POST",mxUtils.bind(this,function(b){var e=this.getTitle(b.properties);b={id:b.id,name:e.title,nameField:e.key};g?c(new NotionLibrary(this.ui,d,b)):c(new NotionFile(this.ui,d,b))}),k):k()}))});"object"===typeof m?(l=this.getTitle(m.schema.properties).key,e=m.id,m.drawioReady?n():(m.schema.properties[this.xmlField]=
+{name:this.xmlField,type:"rich_text",rich_text:{}},this.executeRequest("/v1/databases/"+encodeURIComponent(m.id),JSON.stringify({title:m.schema.title,properties:m.schema.properties}),"PATCH",n,k))):k()};NotionClient.prototype.checkExists=function(b,d,c,k,g){this.executeRequest("/v1/databases/"+encodeURIComponent(b)+"/query",JSON.stringify({filter:{property:c,text:{equals:d}}}),"POST",mxUtils.bind(this,function(b){0==b.results.length?g(!0):k?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",
+[d]),function(){g(!0,b.results[0].id)},function(){g(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){g(!1)}))}),function(b){g(!1)})};NotionClient.prototype.saveFile=function(b,d,c){try{var e=b.getData();this.writeFile("/v1/pages/"+b.getId(),null,b.getTitle(),b.getNameField(),e,"PATCH",mxUtils.bind(this,function(b){d(b,e)}),c)}catch(g){c(g)}};NotionClient.prototype.writeFile=function(b,d,c,k,g,m,f,l){try{if(null!=
+b&&null!=g)if(2E5<g.length)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(g.length)+" / 200 KB)"});else{for(var e=[],p=Math.ceil(g.length/2E3),q=0;q<p;q++)e.push({text:{content:g.substr(2E3*q,2E3)}});g={properties:{}};g.properties[k]={title:[{text:{content:c}}]};g.properties[this.xmlField]={rich_text:e};d&&(g.parent={database_id:d});this.executeRequest(b,JSON.stringify(g),m,f,l)}else l({message:mxResources.get("unknownError")})}catch(t){l(t)}};NotionClient.prototype.parseRequestText=
+function(b){var d={message:mxResources.get("unknownError")};try{d=JSON.parse(b.getText())}catch(c){}return d};NotionClient.prototype.pickLibrary=function(b){this.pickFile(b)};NotionClient.prototype.pickFolder=function(b){this.showNotionDialog(!1,b)};NotionClient.prototype.pickFile=function(b){b=null!=b?b:mxUtils.bind(this,function(b){this.ui.loadFile("N"+encodeURIComponent(b))});this.showNotionDialog(!0,b)};NotionClient.prototype.showNotionDialog=function(b,d){var c,e,g=document.createElement("div");
+g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="304px";var m=document.createElement("h3");mxUtils.write(m,mxResources.get(b?"officeSelDiag":"selectDB"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.border="1px solid lightgray";f.style.boxSizing="border-box";f.style.padding="4px";f.style.overflow="auto";f.style.lineHeight="1.2em";f.style.height="274px";
+g.appendChild(f);var l=document.createElement("div");l.style.textOverflow="ellipsis";l.style.boxSizing="border-box";l.style.overflow="hidden";l.style.padding="4px";l.style.width="100%";var n=new CustomDialog(this.ui,g,mxUtils.bind(this,function(){d(c)}));this.ui.showDialog(n.container,420,380,!0,!0);b&&n.okButton.parentNode.removeChild(n.okButton);var p=mxUtils.bind(this,function(b,c,d,e){var f=document.createElement("a");f.setAttribute("title",b);f.style.cursor="pointer";mxUtils.write(f,b);mxEvent.addListener(f,
+"click",c);e&&(f.style.textDecoration="underline");null!=d&&(b=l.cloneNode(),b.style.padding=d,b.appendChild(f),f=b);return f}),q=mxUtils.bind(this,function(){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(p(e,mxUtils.bind(this,function(){c=null;A()}),null,!0));f.appendChild(b)}),t=mxUtils.bind(this,function(b){this.ui.handleError(b,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(c=null,A()):this.ui.hideDialog()}),null,{})}),u=null,v=null,
+x=mxUtils.bind(this,function(b){null==b&&(f.innerHTML="");this.ui.spinner.spin(f,mxResources.get("loading"));n.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(f,"scroll",v),v=null);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.style.cursor="pointer";mxUtils.write(u,mxResources.get("more")+"...");var e=mxUtils.bind(this,function(){x(b)});mxEvent.addListener(u,"click",e);var g={page_size:100};null!=b&&(g.start_cursor=
+b);this.executeRequest("/v1/databases/"+encodeURIComponent(c)+"/query",JSON.stringify(g),"POST",mxUtils.bind(this,function(g){this.ui.spinner.stop();null==b&&(q(),f.appendChild(p("../ [Up]",mxUtils.bind(this,function(){c=null;A()}),"4px")));var k=g.results;if(null==k||0==k.length)mxUtils.write(f,mxResources.get("noFiles"));else{for(var m=!0,n=0;n<k.length;n++)mxUtils.bind(this,function(b,c){var e=l.cloneNode();e.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;var g=document.createElement("img");
+g.src=IMAGE_PATH+"/file.png";g.setAttribute("align","absmiddle");g.style.marginRight="4px";g.style.marginTop="-4px";g.width=20;e.appendChild(g);e.appendChild(p(this.getTitle(b.properties).title,mxUtils.bind(this,function(){this.ui.hideDialog();d(b.id)})));f.appendChild(e)})(k[n],n);g.has_more&&(b=g.next_cursor,f.appendChild(u),v=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&e()},mxEvent.addListener(f,"scroll",v))}}),t,!0)}),A=mxUtils.bind(this,function(g){null==g&&(f.innerHTML="");n.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(f,mxResources.get("loading"));null!=v&&mxEvent.removeListener(f,"scroll",v);null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.style.cursor="pointer";mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){A(g)});mxEvent.addListener(u,"click",k);this.executeRequest("/v1/databases?page_size=100"+(null!=g?"&start_cursor="+g:""),null,"GET",mxUtils.bind(this,function(m){this.ui.spinner.stop();
+var n=m.results,y=0;if(null==n||0==n.length)mxUtils.write(f,mxResources.get("noDBs"));else for(var q=0;q<n.length;q++){var B=n[q].properties[this.xmlField]&&"rich_text"==n[q].properties[this.xmlField].type;if(!b||B)mxUtils.bind(this,function(g,k,m){var n=l.cloneNode();n.style.backgroundColor=0==k%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";n.appendChild(p(this.getTitleVal(g),mxUtils.bind(this,function(){c=g.id;e=this.getTitleVal(g);b?x():(this.ui.hideDialog(),d({id:c,drawioReady:m,schema:g}))})));
+f.appendChild(n)})(n[q],q,B),y++}m.has_more?(g=m.next_cursor,0==y?k():(f.appendChild(u),v=function(){f.scrollTop>=f.scrollHeight-f.offsetHeight&&k()},mxEvent.addListener(f,"scroll",v))):0==y&&""==f.innerHTML&&mxUtils.write(f,mxResources.get("noDBs"))}),t)});A()};NotionClient.prototype.logout=function(){this.executeRequest("/removeToken",null,"GET",function(){},function(){});this.setUser(null);b=null}})();DrawioComment=function(b,e,d,c,k,g,m){this.file=b;this.id=e;this.content=d;this.modifiedDate=c;this.createdDate=k;this.isResolved=g;this.user=m;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,d,c,k){e()};DrawioComment.prototype.editComment=function(b,e,d){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,d,c,k,g,m,f){DrawioComment.call(this,b,e,d,c,k,g,m);this.pCommentId=f};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,d,c,k){b={content:b.content};c?b.verb="resolve":k&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(b){e(b.replyId)}),d)};
DriveComment.prototype.editComment=function(b,e,d){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,d)};
-DriveComment.prototype.deleteComment=function(b,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"},b,e)};function mxODPicker(b,e,d,c,g,k,n,f,l,m,p,q,t){function u(b,c){c=c||document;return c.querySelector(b)}function v(b,d,e){if(null==b["@microsoft.graph.downloadUrl"])if(null==b.parentReference)e();else{c(b.id,b.parentReference.driveId,function(b){v(b,d,e)},e);return}var f=new XMLHttpRequest;f.open("GET",b["@microsoft.graph.downloadUrl"]);var g="image/png"==b.file.mimeType;f.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var b=f.responseText;g&&(b="data:image/png;base64,"+
-Editor.base64Encode(b),b=Editor.extractGraphModelFromPng(b));var c=mxUtils.parseXml(b),k=Editor.extractGraphModel(c.documentElement);if(null!=k){d(k.ownerDocument);return}}catch(ma){}e()}};g&&f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined");f.send()}function x(){q&&null!=L?J.exportToCanvas(function(b){b=EditorUi.prototype.createImageDataUri(b,null,"png");n(H,b);k(H)},400,null,null,function(b){console.log(b)},600,null,null,null,null,null,L):(n(H,void 0),k(H))}function A(b){function c(b){var c=
-document.createElement("div");c.className="odPreviewStatus";mxUtils.write(c,b);O.appendChild(c);F.stop()}if(null!=O)if(O.style.background="transparent",O.innerHTML="",null==b||b.folder)c(mxResources.get("noPreview"));else{F.spin(O);try{null!=b.remoteItem&&(b=b.remoteItem),I=b,v(b,function(c){if(I==b){var d=c.getElementsByTagName("diagram");L=AspectDialog.prototype.createViewer(O,0==d.length?c.documentElement:d[0],null,"transparent");F.stop()}},function(){H=null;c(mxResources.get("notADiagramFile"))})}catch(ea){H=
+DriveComment.prototype.deleteComment=function(b,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"},b,e)};function mxODPicker(b,e,d,c,k,g,m,f,l,n,p,q,t){function u(b,c){c=c||document;return c.querySelector(b)}function v(b,d,e){if(null==b["@microsoft.graph.downloadUrl"])if(null==b.parentReference)e();else{c(b.id,b.parentReference.driveId,function(b){v(b,d,e)},e);return}var f=new XMLHttpRequest;f.open("GET",b["@microsoft.graph.downloadUrl"]);var g="image/png"==b.file.mimeType;f.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var b=f.responseText;g&&(b="data:image/png;base64,"+
+Editor.base64Encode(b),b=Editor.extractGraphModelFromPng(b));var c=mxUtils.parseXml(b),k=Editor.extractGraphModel(c.documentElement);if(null!=k){d(k.ownerDocument);return}}catch(ma){}e()}};g&&f.overrideMimeType&&f.overrideMimeType("text/plain; charset=x-user-defined");f.send()}function x(){q&&null!=L?J.exportToCanvas(function(b){b=EditorUi.prototype.createImageDataUri(b,null,"png");m(F,b);g(F)},400,null,null,function(b){console.log(b)},600,null,null,null,null,null,L):(m(F,void 0),g(F))}function A(b){function c(b){var c=
+document.createElement("div");c.className="odPreviewStatus";mxUtils.write(c,b);O.appendChild(c);E.stop()}if(null!=O)if(O.style.background="transparent",O.innerHTML="",null==b||b.folder)c(mxResources.get("noPreview"));else{E.spin(O);try{null!=b.remoteItem&&(b=b.remoteItem),I=b,v(b,function(c){if(I==b){var d=c.getElementsByTagName("diagram");L=AspectDialog.prototype.createViewer(O,0==d.length?c.documentElement:d[0],null,"transparent");E.stop()}},function(){F=null;c(mxResources.get("notADiagramFile"))})}catch(ea){F=
null,c(mxResources.get("notADiagramFile"))}}}function z(){var b=u(".odFilesBreadcrumb");if(null!=b){b.innerHTML="";for(var c=0;c<S.length-1;c++){var d=document.createElement("span");d.className="odBCFolder";d.innerHTML=mxUtils.htmlEntities(S[c].name||mxResources.get("home"));b.appendChild(d);(function(b,c){d.addEventListener("click",function(){e(null);S=S.slice(0,c);B(b.driveId,b.folderId,b.siteId,b.name)})})(S[c],c);var f=document.createElement("span");f.innerHTML=" &gt; ";b.appendChild(f)}null!=
-S[S.length-1]&&(c=document.createElement("span"),c.innerHTML=mxUtils.htmlEntities(1==S.length?mxResources.get("officeSelDiag"):S[S.length-1].name||mxResources.get("home")),b.appendChild(c))}}function y(){if(null!=H&&!P)if("sharepoint"==M)B("site",null,H.id,H.displayName);else if("site"==M)B("subsite",null,H.id,H.name);else{var b=H.folder;H=H.remoteItem?H.remoteItem:H;var c=(H.parentReference?H.parentReference.driveId:null)||M,d=H.id;b?B(c,d,null,H.name):x()}}function B(c,k,n,m,p){function q(d){F.stop();
-var f=document.createElement("table");f.className="odFileListGrid";for(var g=null,k=0,n=0;null!=d&&n<d.length;n++){var m=d[n];if(1!=t||!m.webUrl||0<m.webUrl.indexOf("sharepoint.com/sites/")||0>m.webUrl.indexOf("sharepoint.com/")){var p=m.displayName||m.name,q=mxUtils.htmlEntities(m.description||p),B=Math.round(.7*b.clientWidth/10);t&&(m.folder=!0);var u=null!=m.folder;if(!l||u){var v=document.createElement("tr");v.className=k++%2?"odOddRow":"odEvenRow";var C=document.createElement("td");C.style.width=
-"24px";var D=document.createElement("img");D.src="/images/"+(u?"folder.png":"file.png");D.className="odFileImg";D.width=24;C.appendChild(D);v.appendChild(C);C=document.createElement("td");u=document.createElement("span");u.className="odFileTitle";u.innerHTML=null!=p&&p.length>B?mxUtils.htmlEntities(p.substring(0,B))+"&hellip;":mxUtils.htmlEntities(p);u.setAttribute("title",q);C.appendChild(u);v.appendChild(C);f.appendChild(v);null==g&&(g=v,g.className+=" odRowSelected",H=m,M=c,e(H));(function(b,d){v.addEventListener("dblclick",
-y);v.addEventListener("click",function(){g!=d&&(g.className=g.className.replace("odRowSelected",""),g=d,g.className+=" odRowSelected",H=b,M=c,e(H))})})(m,v)}}}0==k?(d=document.createElement("div"),d.className="odEmptyFolder",d.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),x.appendChild(d)):x.appendChild(f);z();P=!1}if(!P){u(".odCatsList").style.display="block";u(".odFilesSec").style.display="block";null!=O&&(O.innerHTML="",O.style.top="50%");var B=P=!0,t=0;
-K=arguments;var v=setTimeout(function(){P=B=!1;F.stop();f(mxResources.get("timeout"))},2E4),x=u(".odFilesList");x.innerHTML="";F.spin(x);var C;switch(c){case "recent":S=[{name:mxResources.get("recent",null,"Recent"),driveId:c}];C=g()||{};var D=[],E;for(E in C)D.push(C[E]);clearTimeout(v);q(D);return;case "shared":C="/me/drive/sharedWithMe";S=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:c}];break;case "sharepoint":C="/sites?search=";S=[{name:mxResources.get("sharepointSites",
-null,"Sharepoint Sites"),driveId:c}];t=1;break;case "site":S.push({name:m,driveId:c,folderId:k,siteId:n});C="/sites/"+n+"/drives";t=2;break;case "subsite":S.push({name:m,driveId:c,folderId:k,siteId:n});C="/drives/"+n+(k?"/items/"+k:"/root")+"/children";break;case "search":c=M;S=[{driveId:c,name:mxResources.get("back",null,"Back")}];p=encodeURIComponent(p.replace(/\'/g,"\\'"));C=c?"/drives/"+c+"/root/search(q='"+p+"')":"/me/drive/root/search(q='"+p+"')";break;default:null==k?S=[{driveId:c}]:S.push({name:m,
-driveId:c,folderId:k}),C=(c?"/drives/"+c:"/me/drive")+(k?"/items/"+k:"/root")+"/children"}t||(C+=(0<C.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");d(C,function(b){if(B){clearTimeout(v);b=b.value||[];for(var c=t?b:[],d=0;!t&&d<b.length;d++){var e=b[d],f=e.file?e.file.mimeType:null;(e.folder||"text/html"==f||"text/xml"==f||"application/xml"==f||"image/png"==f||/\.svg$/.test(e.name)||
-/\.html$/.test(e.name)||/\.xml$/.test(e.name)||/\.png$/.test(e.name)||/\.drawio$/.test(e.name))&&c.push(e)}q(c)}},function(b){if(B){clearTimeout(v);var c=null;try{c=JSON.parse(b.responseText).error.message}catch(Z){}f(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=c?" ("+c+")":""));P=!1;F.stop()}})}}function C(b){Y.className=Y.className.replace("odCatSelected","");Y=b;Y.className+=" odCatSelected"}function D(b){P||(aa=null,B("search",null,null,null,b))}var E="";null==
-e&&(e=A,E='<div style="text-align: center;" class="odPreview"></div>');null==g&&(g=function(){var b=null;try{b=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(ca){}return b});null==k&&(k=function(b){if(null!=b){var c=g()||{};delete b["@microsoft.graph.downloadUrl"];c[b.id]=b;localStorage.setItem("mxODPickerRecentList",JSON.stringify(c))}});var E='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+
+S[S.length-1]&&(c=document.createElement("span"),c.innerHTML=mxUtils.htmlEntities(1==S.length?mxResources.get("officeSelDiag"):S[S.length-1].name||mxResources.get("home")),b.appendChild(c))}}function y(){if(null!=F&&!P)if("sharepoint"==M)B("site",null,F.id,F.displayName);else if("site"==M)B("subsite",null,F.id,F.name);else{var b=F.folder;F=F.remoteItem?F.remoteItem:F;var c=(F.parentReference?F.parentReference.driveId:null)||M,d=F.id;b?B(c,d,null,F.name):x()}}function B(c,g,m,n,p){function q(d){E.stop();
+var f=document.createElement("table");f.className="odFileListGrid";for(var g=null,k=0,m=0;null!=d&&m<d.length;m++){var n=d[m];if(1!=t||!n.webUrl||0<n.webUrl.indexOf("sharepoint.com/sites/")||0>n.webUrl.indexOf("sharepoint.com/")){var p=n.displayName||n.name,q=mxUtils.htmlEntities(n.description||p),B=Math.round(.7*b.clientWidth/10);t&&(n.folder=!0);var u=null!=n.folder;if(!l||u){var v=document.createElement("tr");v.className=k++%2?"odOddRow":"odEvenRow";var C=document.createElement("td");C.style.width=
+"24px";var D=document.createElement("img");D.src="/images/"+(u?"folder.png":"file.png");D.className="odFileImg";D.width=24;C.appendChild(D);v.appendChild(C);C=document.createElement("td");u=document.createElement("span");u.className="odFileTitle";u.innerHTML=null!=p&&p.length>B?mxUtils.htmlEntities(p.substring(0,B))+"&hellip;":mxUtils.htmlEntities(p);u.setAttribute("title",q);C.appendChild(u);v.appendChild(C);f.appendChild(v);null==g&&(g=v,g.className+=" odRowSelected",F=n,M=c,e(F));(function(b,d){v.addEventListener("dblclick",
+y);v.addEventListener("click",function(){g!=d&&(g.className=g.className.replace("odRowSelected",""),g=d,g.className+=" odRowSelected",F=b,M=c,e(F))})})(n,v)}}}0==k?(d=document.createElement("div"),d.className="odEmptyFolder",d.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),x.appendChild(d)):x.appendChild(f);z();P=!1}if(!P){u(".odCatsList").style.display="block";u(".odFilesSec").style.display="block";null!=O&&(O.innerHTML="",O.style.top="50%");var B=P=!0,t=0;
+K=arguments;var v=setTimeout(function(){P=B=!1;E.stop();f(mxResources.get("timeout"))},2E4),x=u(".odFilesList");x.innerHTML="";E.spin(x);var C;switch(c){case "recent":S=[{name:mxResources.get("recent",null,"Recent"),driveId:c}];C=k()||{};var D=[],G;for(G in C)D.push(C[G]);clearTimeout(v);q(D);return;case "shared":C="/me/drive/sharedWithMe";S=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:c}];break;case "sharepoint":C="/sites?search=";S=[{name:mxResources.get("sharepointSites",
+null,"Sharepoint Sites"),driveId:c}];t=1;break;case "site":S.push({name:n,driveId:c,folderId:g,siteId:m});C="/sites/"+m+"/drives";t=2;break;case "subsite":S.push({name:n,driveId:c,folderId:g,siteId:m});C="/drives/"+m+(g?"/items/"+g:"/root")+"/children";break;case "search":c=M;S=[{driveId:c,name:mxResources.get("back",null,"Back")}];p=encodeURIComponent(p.replace(/\'/g,"\\'"));C=c?"/drives/"+c+"/root/search(q='"+p+"')":"/me/drive/root/search(q='"+p+"')";break;default:null==g?S=[{driveId:c}]:S.push({name:n,
+driveId:c,folderId:g}),C=(c?"/drives/"+c:"/me/drive")+(g?"/items/"+g:"/root")+"/children"}t||(C+=(0<C.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");d(C,function(b){if(B){clearTimeout(v);b=b.value||[];for(var c=t?b:[],d=0;!t&&d<b.length;d++){var e=b[d],f=e.file?e.file.mimeType:null;(e.folder||"text/html"==f||"text/xml"==f||"application/xml"==f||"image/png"==f||/\.svg$/.test(e.name)||
+/\.html$/.test(e.name)||/\.xml$/.test(e.name)||/\.png$/.test(e.name)||/\.drawio$/.test(e.name))&&c.push(e)}q(c)}},function(b){if(B){clearTimeout(v);var c=null;try{c=JSON.parse(b.responseText).error.message}catch(Z){}f(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=c?" ("+c+")":""));P=!1;E.stop()}})}}function C(b){Y.className=Y.className.replace("odCatSelected","");Y=b;Y.className+=" odCatSelected"}function D(b){P||(aa=null,B("search",null,null,null,b))}var G="";null==
+e&&(e=A,G='<div style="text-align: center;" class="odPreview"></div>');null==k&&(k=function(){var b=null;try{b=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(ca){}return b});null==g&&(g=function(b){if(null!=b){var c=k()||{};delete b["@microsoft.graph.downloadUrl"];c[b.id]=b;localStorage.setItem("mxODPickerRecentList",JSON.stringify(c))}});var G='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+
'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img src="/images/update32.png" width="16" height="16" title="'+
-mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+E+(m?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(p?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(l?"save":"open"))+"</button>":""),G=".odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+G+(n?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(p?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(l?"save":"open"))+"</button>":""),H=".odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
(Editor.isDarkMode()?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(Editor.isDarkMode()?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}",
-F=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),J=new Editor,L=null,H=null,M=null,P=!1,S=[],K=null,I=null;this.getSelectedItem=function(){null!=H&&k(H);return H};if(null==u("#mxODPickerCss")){var T=document.head||document.getElementsByTagName("head")[0],R=document.createElement("style");T.appendChild(R);R.type="text/css";R.id="mxODPickerCss";R.appendChild(document.createTextNode(G))}b.innerHTML=
-E;for(var O=u(".odPreview"),Y=u("#odFiles"),E=function(b,c){c=c||document;return c.querySelectorAll(b)}(".odCatListTitle"),G=0;G<E.length;G++)E[G].addEventListener("click",function(){H=I=null;if(!P)switch(C(this),this.id){case "odFiles":B();break;case "odRecent":B("recent");break;case "odShared":B("shared");break;case "odSharepoint":B("sharepoint")}});var aa=null;u("#odSearchBox").addEventListener("keyup",function(b){var c=this;null!=aa&&clearTimeout(aa);13==b.keyCode?D(c.value):aa=setTimeout(function(){D(c.value)},
-500)});u("#refreshOD").addEventListener("click",function(){null!=K&&(e(null),B.apply(this,K))});m&&u("#odBackBtn").addEventListener("click",m);p&&u("#odSubmitBtn").addEventListener("click",x);document.body.onselectstart=function(){return!1};null!=t?(m=t.pop(),"sharepoint"==t[0].driveId&&C(u("#odSharepoint")),S=t,B(m.driveId,m.folderId,m.siteId,m.name)):B()};App=function(b,e,d){EditorUi.call(this,b,e,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()){var d={category:"DISCARD-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=
+E=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),J=new Editor,L=null,F=null,M=null,P=!1,S=[],K=null,I=null;this.getSelectedItem=function(){null!=F&&g(F);return F};if(null==u("#mxODPickerCss")){var T=document.head||document.getElementsByTagName("head")[0],R=document.createElement("style");T.appendChild(R);R.type="text/css";R.id="mxODPickerCss";R.appendChild(document.createTextNode(H))}b.innerHTML=
+G;for(var O=u(".odPreview"),Y=u("#odFiles"),G=function(b,c){c=c||document;return c.querySelectorAll(b)}(".odCatListTitle"),H=0;H<G.length;H++)G[H].addEventListener("click",function(){F=I=null;if(!P)switch(C(this),this.id){case "odFiles":B();break;case "odRecent":B("recent");break;case "odShared":B("shared");break;case "odSharepoint":B("sharepoint")}});var aa=null;u("#odSearchBox").addEventListener("keyup",function(b){var c=this;null!=aa&&clearTimeout(aa);13==b.keyCode?D(c.value):aa=setTimeout(function(){D(c.value)},
+500)});u("#refreshOD").addEventListener("click",function(){null!=K&&(e(null),B.apply(this,K))});n&&u("#odBackBtn").addEventListener("click",n);p&&u("#odSubmitBtn").addEventListener("click",x);document.body.onselectstart=function(){return!1};null!=t?(n=t.pop(),"sharepoint"==t[0].driveId&&C(u("#odSharepoint")),S=t,B(n.driveId,n.folderId,n.siteId,n.name)):B()};App=function(b,e,d){EditorUi.call(this,b,e,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()){var d={category:"DISCARD-FILE-"+b.getHash(),action:(b.savingFile?"saving":"")+(b.savingFile&&null!=b.savingFileTime?"_"+Math.round((Date.now()-b.savingFileTime.getTime())/1E3):"")+(null!=b.saveLevel?"-sl_"+b.saveLevel:"")+"-age_"+(null!=
b.ageStart?Math.round((Date.now()-b.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(b.isAutosave()?"":"-noauto")+"-open_"+(null!=b.opened?Math.round((Date.now()-b.opened.getTime())/1E3):"x")+"-save_"+(null!=b.lastSaved?Math.round((Date.now()-b.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=b.lastChanged?Math.round((Date.now()-b.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=b.sync?"client_"+b.sync.clientId:"nosync"};
b.constructor==DriveFile&&null!=b.desc&&null!=this.drive&&(d.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+b.desc.headRevisionId+"-mod_"+b.desc.modifiedDate+"-size_"+b.getSize()+"-mime_"+b.desc.mimeType);EditorUi.logEvent(d)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var b=this.getCurrentFile();null!=b&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+b.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
@@ -11395,20 +11400,20 @@ App.main=function(b,e){function d(c){mxUtils.getAll("1"!=urlParams.dev?[c]:[c,ST
(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&
(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?"0"==urlParams.inlinePicker?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):(window.OneDrive={},window.DrawOneDriveClientCallback()):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||
10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[c,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(c[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==
-window.location.hash.substring(0,9))try{var f=function(b){if(null!=b)for(var c=0;c<b.length;c++)if(!g[b[c]])throw Error(mxResources.get("invalidInput")+' "'+b[c])+'"';return!0},g={},k;for(k in App.pluginRegistry)g[App.pluginRegistry[k]]=!0;var l=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=l&&f(l.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(l));if(null!=l.merge){var n=localStorage.getItem(Editor.configurationKey);if(null!=n)try{var m=JSON.parse(n);for(k in l.merge)m[k]=
-l.merge[k];l=m}catch(B){window.location.hash="",alert(B)}else l=l.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(l)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(B){window.location.hash="",alert(B)}2<c.length&&(Graph.prototype.defaultThemes["default-style2"]=c[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=c[2].getDocumentElement());"1"==
+window.location.hash.substring(0,9))try{var f=function(b){if(null!=b)for(var c=0;c<b.length;c++)if(!g[b[c]])throw Error(mxResources.get("invalidInput")+' "'+b[c])+'"';return!0},g={},k;for(k in App.pluginRegistry)g[App.pluginRegistry[k]]=!0;var l=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=l&&f(l.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(l));if(null!=l.merge){var m=localStorage.getItem(Editor.configurationKey);if(null!=m)try{var n=JSON.parse(m);for(k in l.merge)n[k]=
+l.merge[k];l=n}catch(B){window.location.hash="",alert(B)}else l=l.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(l)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(B){window.location.hash="",alert(B)}2<c.length&&(Graph.prototype.defaultThemes["default-style2"]=c[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=c[2].getDocumentElement());"1"==
urlParams.dev||EditorUi.isElectronApp?d():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],d))},function(b){b=document.getElementById("geStatus");null!=b&&(b.innerHTML="Error loading page. <a>Please try refreshing.</a>",b.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=
mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?"#2a2a2a":"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var b=parseInt(mxSettings.settings.autosaveDelay);!isNaN(b)&&0<b?(DrawioFile.prototype.autosaveDelay=b,EditorUi.debug("Setting autosaveDelay",b)):EditorUi.debug("Invalid autosaveDelay",b)}null!=mxSettings.settings.defaultEdgeLength&&(b=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(b)&&0<b?(Graph.prototype.defaultEdgeLength=
b,EditorUi.debug("Using defaultEdgeLength",b)):EditorUi.debug("Invalid defaultEdgeLength",b))}}catch(t){null!=window.console&&console.error(t)}if(null!=Menus.prototype.defaultFonts)for(b=0;b<Menus.prototype.defaultFonts.length;b++){var c=Menus.prototype.defaultFonts[b];"string"!==typeof c&&null!=c.fontFamily&&null!=c.fontUrl&&Graph.addFont(c.fontFamily,c.fontUrl)}mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}
-window.onerror=function(b,c,d,e,f){EditorUi.logError("Global: "+(null!=b?b:""),c,d,e,f,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||/aj\.draw\.io$/.test(window.location.hostname)))document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>';else{if("1"==urlParams.embed||"1"==urlParams.lightbox){var g=document.getElementById("geInfo");null!=g&&
-g.parentNode.removeChild(g)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){g=document.getElementsByTagName("script");if(null!=g&&0<g.length){var k=mxUtils.getTextContent(g[0]);"b02227617087e21bd49f2faa15164112"!=CryptoJS.MD5(k).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",
-CryptoJS.MD5(k).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=g&&1<g.length&&(k=mxUtils.getTextContent(g[g.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(k).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(k).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?
+window.onerror=function(b,c,d,e,f){EditorUi.logError("Global: "+(null!=b?b:""),c,d,e,f,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||/aj\.draw\.io$/.test(window.location.hostname)))document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>';else{if("1"==urlParams.embed||"1"==urlParams.lightbox){var k=document.getElementById("geInfo");null!=k&&
+k.parentNode.removeChild(k)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){k=document.getElementsByTagName("script");if(null!=k&&0<k.length){var g=mxUtils.getTextContent(k[0]);"b02227617087e21bd49f2faa15164112"!=CryptoJS.MD5(g).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",
+CryptoJS.MD5(g).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=k&&1<k.length&&(g=mxUtils.getTextContent(k[k.length-1]),"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(g).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(g).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?
App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("/service-worker.js")}catch(p){null!=window.console&&console.error(p)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==
-urlParams.rtCursors&&(mxscript(App.SOCKET_IO_URL),mxscript(App.SIMPLE_PEER_URL)));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){g=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var n=JSON.parse(localStorage.getItem(mxSettings.key));null!=n&&(g=n.plugins)}catch(p){}n=urlParams.p;App.initPluginCallback();null!=n&&App.loadPlugins(n.split(";"));if(null!=g&&0<g.length&&"0"!=urlParams.plugins){for(var n=window.location.protocol+
-"//"+window.location.host,k=!0,f=0;f<g.length&&k;f++)"/"!=g[f].charAt(0)&&g[f].substring(0,n.length)!=n&&(k=!1);if(k||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[g.join("\n")]).replace(/\\n/g,"\n")))for(f=0;f<g.length;f++)try{null==App.pluginsLoaded[g[f]]&&(App.pluginsLoaded[g[f]]=
-!0,App.embedModePluginsCount++,"/"==g[f].charAt(0)&&(g[f]=PLUGINS_BASE_PATH+g[f]),mxscript(g[f]))}catch(p){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=
-null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var l=window.opener||window.parent,m=function(b){if(b.source==l)try{var d=JSON.parse(b.data);null!=d&&"configure"==d.action&&(mxEvent.removeListener(window,"message",m),Editor.configure(d.config,!0),mxSettings.load(),c())}catch(t){null!=window.console&&console.log("Error in configure message: "+t,b.data)}};mxEvent.addListener(window,"message",m);l.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(p){null!=window.console&&console.error(p)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(g=localStorage.getItem(Editor.configurationKey),null!=g))try{g=JSON.parse(g),null!=g&&(EditorUi.debug("Using local configuration",g),Editor.configure(g),mxSettings.load())}catch(p){null!=window.console&&console.error(p)}}c()}}};
+urlParams.rtCursors&&(mxscript(App.SOCKET_IO_URL),mxscript(App.SIMPLE_PEER_URL)));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){k=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var m=JSON.parse(localStorage.getItem(mxSettings.key));null!=m&&(k=m.plugins)}catch(p){}m=urlParams.p;App.initPluginCallback();null!=m&&App.loadPlugins(m.split(";"));if(null!=k&&0<k.length&&"0"!=urlParams.plugins){for(var m=window.location.protocol+
+"//"+window.location.host,g=!0,f=0;f<k.length&&g;f++)"/"!=k[f].charAt(0)&&k[f].substring(0,m.length)!=m&&(g=!1);if(g||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(f=0;f<k.length;f++)try{null==App.pluginsLoaded[k[f]]&&(App.pluginsLoaded[k[f]]=
+!0,App.embedModePluginsCount++,"/"==k[f].charAt(0)&&(k[f]=PLUGINS_BASE_PATH+k[f]),mxscript(k[f]))}catch(p){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=
+null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var l=window.opener||window.parent,n=function(b){if(b.source==l)try{var d=JSON.parse(b.data);null!=d&&"configure"==d.action&&(mxEvent.removeListener(window,"message",n),Editor.configure(d.config,!0),mxSettings.load(),c())}catch(t){null!=window.console&&console.log("Error in configure message: "+t,b.data)}};mxEvent.addListener(window,"message",n);l.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(p){null!=window.console&&console.error(p)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(k=localStorage.getItem(Editor.configurationKey),null!=k))try{k=JSON.parse(k),null!=k&&(EditorUi.debug("Using local configuration",k),Editor.configure(k),mxSettings.load())}catch(p){null!=window.console&&console.error(p)}}c()}}};
mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
IMAGE_PATH+"/chevron-up.png";
@@ -11419,19 +11424,19 @@ App.prototype.formatShowImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
App.prototype.formatHideImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=":IMAGE_PATH+
"/format-hide.png";App.prototype.fullscreenImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC":IMAGE_PATH+"/fullscreen.png";App.prototype.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(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
-App.loadPlugins=function(b,e){EditorUi.debug("Loading plugins",b);for(var d=0;d<b.length;d++)if(null!=b[d]&&0<b[d].length)try{var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[d]];null!=c?null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(c):mxscript(c):e?mxinclude(c):mxscript(drawDevUrl+c)):null!=window.console&&console.log("Unknown plugin:",b[d])}catch(g){null!=window.console&&console.log("Error loading plugin:",b[d],g)}};
+App.loadPlugins=function(b,e){EditorUi.debug("Loading plugins",b);for(var d=0;d<b.length;d++)if(null!=b[d]&&0<b[d].length)try{var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[d]];null!=c?null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(c):mxscript(c):e?mxinclude(c):mxscript(drawDevUrl+c)):null!=window.console&&console.log("Unknown plugin:",b[d])}catch(k){null!=window.console&&console.log("Error loading plugin:",b[d],k)}};
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 b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.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()}));this.notion="1"==urlParams.ntn?new NotionClient(this):null;null!=this.notion&&this.notion.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));
if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var e=mxUtils.bind(this,function(){if("undefined"!==
-typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(k){null!=window.console&&console.error(k)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var d=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var b=
+typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))}catch(g){null!=window.console&&console.error(g)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var d=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var b=
mxUtils.bind(this,function(){this.drive=new DriveClient(this);this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,b),window.DrawGapiClientCallback=null):b()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=d)});d()}if("1"!=
-urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(k){null!=window.console&&console.error(k)}}else null==window.DrawDropboxClientCallback&&
+urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){if("function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose){window.DrawDropboxClientCallback=null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(g){null!=window.console&&console.error(g)}}else null==window.DrawDropboxClientCallback&&
(window.DrawDropboxClientCallback=c)});c()}if("1"!=urlParams.embed){if(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||
mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(b){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){b.prompt()})})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOffline()||mxClient.IS_ANDROID||mxClient.IS_IOS||null!=urlParams.open||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var b=this.getCurrentFile(),b=null!=b?b.getMode():null;"1"==urlParams.extAuth||
-b!=App.MODE_DEVICE&&b!=App.MODE_BROWSER?"1"!=urlParams.embed&&this.getServiceName():this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var g=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var b=this.getCurrentFile();null!=b&&null!=b.sync&&(b.sync.destroy(),b.sync=null,b=mxUtils.htmlEntities(mxResources.get("timeout")),
-this.editor.setStatus('<div title="'+b+'" class="geStatusAlert">'+b+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(b){window.clearTimeout(g)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",
+b!=App.MODE_DEVICE&&b!=App.MODE_BROWSER?"1"!=urlParams.embed&&this.getServiceName():this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"1"==urlParams.embed||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||this.editor.chromeless&&!this.editor.editable)){var k=window.setTimeout(mxUtils.bind(this,function(){DrawioFile.SYNC="manual";var b=this.getCurrentFile();null!=b&&null!=b.sync&&(b.sync.destroy(),b.sync=null,b=mxUtils.htmlEntities(mxResources.get("timeout")),
+this.editor.setStatus('<div title="'+b+'" class="geStatusAlert">'+b+"</div>"));EditorUi.logEvent({category:"TIMEOUT-CACHE-CHECK",action:"timeout",label:408})}),Editor.cacheTimeout);(new Date).getTime();mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(b){window.clearTimeout(k)}))}}else null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",
this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.padding=
"6px",this.icon.style.cursor="pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(b){this.appIconClicked(b)})),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild));this.editor.graph.isViewer()&&this.initializeViewerMode()};
App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
@@ -11445,10 +11450,10 @@ App.prototype.showRatingBanner=function(){if(!(this.bannerShowing||this.hideBann
"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.className="geBtn gePrimaryBtn";var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.closeImage);e.setAttribute("title",mxResources.get("close"));e.setAttribute("border","0");e.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";b.appendChild(e);mxUtils.write(b,"Please rate us");document.body.appendChild(b);var d=document.createElement("img");
d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","1 star");d.setAttribute("style","margin-top:-6px;cursor:pointer;margin-left:8px;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(d);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.setAttribute("title","2 star");c.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");c.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(c);var g=document.createElement("img");g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.setAttribute("title","3 star");g.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");g.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(g);var k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.setAttribute("title","4 star");k.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");k.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(k);this.bannerShowing=!0;var n=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);n()}));mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);n()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
-function(b){mxEvent.consume(b);n()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);n()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");n()}));e=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){n()}),1E3)});window.setTimeout(mxUtils.bind(this,
+b.appendChild(c);var k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.setAttribute("title","3 star");k.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");k.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(k);var g=document.createElement("img");g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.setAttribute("title","4 star");g.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");g.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
+b.appendChild(g);this.bannerShowing=!0;var m=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(e,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
+function(b){mxEvent.consume(b);m()}));mxEvent.addListener(k,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));mxEvent.addListener(g,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");m()}));e=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(e,6E4)}};
App.prototype.checkLicense=function(){var b=this.drive.getUser(),e=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=e&&null!=b.id){var d=e.lastIndexOf("@"),c=0<=d?e.substring(d+1):"",b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(b){try{if(200<=b.getStatus()&&299>=b.getStatus()){var d=b.getText();if(0<d.length){var e=JSON.parse(d);null!=e&&this.handleLicense(e,
c)}}}catch(f){}}))}};App.prototype.handleLicense=function(b,e){null!=b&&null!=b.plugins&&App.loadPlugins(b.plugins.split(";"),!0)};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
@@ -11456,14 +11461,14 @@ App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var e
App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(e){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
-App.prototype.getThumbnail=function(b,e){var d=!1;try{var c=!0,g=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),k=mxUtils.bind(this,function(b){window.clearTimeout(g);c&&e(b)});null==this.thumbImageCache&&(this.thumbImageCache={});var n=this.editor.graph,f=n.backgroundImage,l=null!=n.themes&&"darkTheme"==n.defaultThemeName;if(null!=this.pages&&(l||this.currentPage!=this.pages[0])){var m=n.getGlobalVariable,n=this.createTemporaryGraph(l?n.getDefaultStylesheet():n.getStylesheet());
-n.setBackgroundImage=this.editor.graph.setBackgroundImage;var p=this.pages[0];this.currentPage==p?n.setBackgroundImage(f):null!=p.viewState&&null!=p.viewState&&(f=p.viewState.backgroundImage,n.setBackgroundImage(f));l&&(n.defaultThemeName="default");n.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,arguments)};n.getGlobalVariable=m;document.body.appendChild(n.container);n.model.setRoot(p.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,
-function(b){try{n!=this.editor.graph&&null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}catch(J){b=null}k(b)}),b,this.thumbImageCache,"#ffffff",function(){k()},null,null,null,null,null,null,n,null,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var q=document.createElement("canvas"),t=n.getGraphBounds(),u=n.view.translate,v=n.view.scale;null!=f&&t.add(new mxRectangle((u.x+f.x)*v,(u.y+f.y)*v,f.width*v,f.height*v));var x=b/t.width,
-x=Math.min(1,Math.min(3*b/(4*t.height),x)),A=Math.floor(t.x),z=Math.floor(t.y);q.setAttribute("width",Math.ceil(x*(t.width+4)));q.setAttribute("height",Math.ceil(x*(t.height+4)));var y=q.getContext("2d");y.scale(x,x);y.translate(-A,-z);var B=n.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";y.save();y.fillStyle=B;y.fillRect(A,z,Math.ceil(t.width+4),Math.ceil(t.height+4));y.restore();if(null!=f){var C=new Image;C.src=f.src;y.drawImage(C,f.x*x,f.y*x,f.width*x,f.height*x)}var D=new mxJsCanvas(q),
-E=new mxAsyncCanvas(this.thumbImageCache);D.images=this.thumbImageCache.images;var G=new mxImageExport;G.drawShape=function(b,c){b.shape instanceof mxShape&&b.shape.checkBounds()&&(c.save(),c.translate(.5,.5),b.shape.paint(c),c.translate(-.5,-.5),c.restore())};G.drawText=function(b,c){};G.drawState(n.getView().getState(n.model.root),E);E.finish(mxUtils.bind(this,function(){try{G.drawState(n.getView().getState(n.model.root),D),n!=this.editor.graph&&null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}catch(F){q=
-null}k(q)}));d=!0}}catch(F){d=!1,null!=n&&n!=this.editor.graph&&null!=n.container.parentNode&&n.container.parentNode.removeChild(n.container)}d||window.clearTimeout(g);return d};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
+App.prototype.getThumbnail=function(b,e){var d=!1;try{var c=!0,k=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),g=mxUtils.bind(this,function(b){window.clearTimeout(k);c&&e(b)});null==this.thumbImageCache&&(this.thumbImageCache={});var m=this.editor.graph,f=m.backgroundImage,l=null!=m.themes&&"darkTheme"==m.defaultThemeName;if(null!=this.pages&&(l||this.currentPage!=this.pages[0])){var n=m.getGlobalVariable,m=this.createTemporaryGraph(l?m.getDefaultStylesheet():m.getStylesheet());
+m.setBackgroundImage=this.editor.graph.setBackgroundImage;var p=this.pages[0];this.currentPage==p?m.setBackgroundImage(f):null!=p.viewState&&null!=p.viewState&&(f=p.viewState.backgroundImage,m.setBackgroundImage(f));l&&(m.defaultThemeName="default");m.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:n.apply(this,arguments)};m.getGlobalVariable=n;document.body.appendChild(m.container);m.model.setRoot(p.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,
+function(b){try{m!=this.editor.graph&&null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}catch(J){b=null}g(b)}),b,this.thumbImageCache,"#ffffff",function(){g()},null,null,null,null,null,null,m,null,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var q=document.createElement("canvas"),t=m.getGraphBounds(),u=m.view.translate,v=m.view.scale;null!=f&&t.add(new mxRectangle((u.x+f.x)*v,(u.y+f.y)*v,f.width*v,f.height*v));var x=b/t.width,
+x=Math.min(1,Math.min(3*b/(4*t.height),x)),A=Math.floor(t.x),z=Math.floor(t.y);q.setAttribute("width",Math.ceil(x*(t.width+4)));q.setAttribute("height",Math.ceil(x*(t.height+4)));var y=q.getContext("2d");y.scale(x,x);y.translate(-A,-z);var B=m.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";y.save();y.fillStyle=B;y.fillRect(A,z,Math.ceil(t.width+4),Math.ceil(t.height+4));y.restore();if(null!=f){var C=new Image;C.src=f.src;y.drawImage(C,f.x*x,f.y*x,f.width*x,f.height*x)}var D=new mxJsCanvas(q),
+G=new mxAsyncCanvas(this.thumbImageCache);D.images=this.thumbImageCache.images;var H=new mxImageExport;H.drawShape=function(b,c){b.shape instanceof mxShape&&b.shape.checkBounds()&&(c.save(),c.translate(.5,.5),b.shape.paint(c),c.translate(-.5,-.5),c.restore())};H.drawText=function(b,c){};H.drawState(m.getView().getState(m.model.root),G);G.finish(mxUtils.bind(this,function(){try{H.drawState(m.getView().getState(m.model.root),D),m!=this.editor.graph&&null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}catch(E){q=
+null}g(q)}));d=!0}}catch(E){d=!1,null!=m&&m!=this.editor.graph&&null!=m.container.parentNode&&m.container.parentNode.removeChild(m.container)}d||window.clearTimeout(k);return d};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,d){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();e=null!=c?c.getMode():e;e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
-this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(d)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var g=new Date;g.setYear(g.getFullYear()+1);document.cookie="MODE="+e+"; expires="+g.toUTCString()}}catch(k){}}})();
+this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(d)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var k=new Date;k.setYear(k.getFullYear()+1);document.cookie="MODE="+e+"; expires="+k.toUTCString()}}catch(g){}}})();
App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var e=this.getCurrentFile(),d=null!=e?e.getMode():null;d==App.MODE_GOOGLE?null!=e&&null!=e.desc&&null!=e.desc.parents&&0<e.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):null!=e&&null!=e.getId()?this.openLink("https://drive.google.com/open?id="+e.getId()):this.openLink("https://drive.google.com/?authuser=0"):d==App.MODE_ONEDRIVE?null!=
e&&null!=e.meta&&null!=e.meta.webUrl?(d=e.meta.webUrl,e=encodeURIComponent(e.meta.name),d.substring(d.length-e.length,d.length)==e&&(d=d.substring(0,d.length-e.length)),this.openLink(d)):this.openLink("https://onedrive.live.com/"):d==App.MODE_DROPBOX?null!=e&&null!=e.stat&&null!=e.stat.path_display?(d="https://www.dropbox.com/home/Apps/drawio"+e.stat.path_display,mxEvent.isShiftDown(b)||(d=d.substring(0,d.length-e.stat.name.length)),this.openLink(d)):this.openLink("https://www.dropbox.com/"):d==App.MODE_TRELLO?
this.openLink("https://trello.com/"):d==App.MODE_NOTION?this.openLink("https://www.notion.so/"):d==App.MODE_GITHUB?null!=e&&e.constructor==GitHubFile?this.openLink(e.meta.html_url):this.openLink("https://github.com/"):d==App.MODE_GITLAB?null!=e&&e.constructor==GitLabFile?this.openLink(e.meta.html_url):this.openLink(DRAWIO_GITLAB_URL):d==App.MODE_DEVICE&&this.openLink("https://get.draw.io/")}mxEvent.consume(b)};
@@ -11476,20 +11481,20 @@ App.prototype.showRefreshDialog=function(b,e){if(!this.showingRefreshDialog&&(th
this.createRealtimeNotice();d.style.left="0";d.style.right="0";d.style.borderRadius="0";d.style.borderLeftStyle="none";d.style.borderRightStyle="none";d.style.marginBottom="26px";d.style.padding="8px 0 8px 0";this.dialog.container.appendChild(d)}};
App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=
mxResources.get("close");e.appendChild(b);mxEvent.addListener(b,"click",function(b){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(b))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},2E3)},15E3)}};
-App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(c,d,e,g,m){"ResizeObserver loop limit exceeded"!=c&&(EditorUi.logError("Uncaught: "+(null!=c?c:""),d,e,g,m,null,!0),b.handleError({message:c},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
-function(b){var c=this.getCurrentFile();EditorUi.debug("storage event",b,c);null!=c&&".draft-alive-check"==b.key&&null!=b.newValue&&null!=c.draftId&&(this.draftAliveCheck=b.newValue,c.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(k){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(b){try{this.hideDialog();
-var c=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.getHash()==c||this.loadFile(c,!0)}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();window.location.hash=null!=b?b.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}catch(k){this.handleError(k,
+App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(c,d,e,k,n){"ResizeObserver loop limit exceeded"!=c&&(EditorUi.logError("Uncaught: "+(null!=c?c:""),d,e,k,n,null,!0),b.handleError({message:c},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
+function(b){var c=this.getCurrentFile();EditorUi.debug("storage event",b,c);null!=c&&".draft-alive-check"==b.key&&null!=b.newValue&&null!=c.draftId&&(this.draftAliveCheck=b.newValue,c.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(g){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(b){try{this.hideDialog();
+var c=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.getHash()==c||this.loadFile(c,!0)}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();window.location.hash=null!=b?b.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}catch(g){this.handleError(g,
mxResources.get("errorLoadingFile"))}else 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 b=mxUtils.bind(this,function(b){"data:image/png;base64,"==b.substring(0,22)&&(b=this.extractGraphModelFromPng(b));var c=urlParams.title,
c=null!=c?decodeURIComponent(c):this.defaultFilename;b=new LocalFile(this,b,c,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(b.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(b);this.getCurrentFile().setModified(!this.editor.chromeless)}),c=window.opener||window.parent;if(c!=window){var d=urlParams.create;null!=d?b(c[decodeURIComponent(d)]):(d=urlParams.data,null!=d?b(decodeURIComponent(d)):this.installMessageHandler(mxUtils.bind(this,function(d,
e){e.source==c&&b(d)})))}}else if(null==this.dialog)if("1"==urlParams.demo)d=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=d;else{d=!1;try{d=null!=window.opener&&null!=window.opener.openFile}catch(l){}d?this.spinner.spin(document.body,mxResources.get("loading")):(d=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode&&!EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||null!=d&&0!=d.length||this.editor.isChromelessView()?
null!=d&&0<d.length?this.loadFile(d,null,null,mxUtils.bind(this,function(){var b=decodeURIComponent(urlParams.viewbox||"");if(""!=b)try{var c=JSON.parse(b);this.editor.graph.fitWindow(c,c.border)}catch(p){console.error(p)}})):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),d=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=d&&0<d.length&&
-this.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),g=mxUtils.bind(this,function(b){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,b,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var c=urlParams.title,c=null!=c?decodeURIComponent(c):this.defaultFilename;b=this.getServiceCount(!0);
+this.spinner.spin(document.body,mxResources.get("loading"))){var c=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),k=mxUtils.bind(this,function(b){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,b,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var c=urlParams.title,c=null!=c?decodeURIComponent(c):this.defaultFilename;b=this.getServiceCount(!0);
isLocalStorage&&b++;var d=4>=b?2:6<b?4:3,c=new CreateDialog(this,c,mxUtils.bind(this,function(b,c){if(null==c){this.hideDialog();var d=Editor.useLocalStorage;this.createFile(0<b.length?b:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=d}else this.pickFolder(c,mxUtils.bind(this,function(d){this.createFile(b,this.getFileData(!0),null,c,null,!0,d)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d,null,null,null,this.editor.fileExtensions);this.showDialog(c.container,
-400,b>d?390:270,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&this.showSplash()}));c.init()}}),d=decodeURIComponent(d);if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))try{null!=window.opener&&null!=window.opener[d]?g(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(b){g(b)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),
+400,b>d?390:270,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&this.showSplash()}));c.init()}}),d=decodeURIComponent(d);if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))try{null!=window.opener&&null!=window.opener[d]?k(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(g){this.handleError(g,mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(b){k(b)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),
c)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&
-window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open"])),window.location.hash=urlParams.open),e())}}catch(k){this.handleError(k)}};
+window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open"])),window.location.hash=urlParams.open),e())}}catch(g){this.handleError(g)}};
App.prototype.loadDraft=function(b,e){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var b=this.getCurrentFile();null!=b&&(b.fileChanged(),null!=e&&e())}),0)}),null,null,!0)};
-App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.getDatabaseItems(mxUtils.bind(this,function(e){for(var d=[],c=0;c<e.length;c++)try{var g=e[c].key;if(null!=g&&".draft_"==g.substring(0,7)){var k=JSON.parse(e[c].data);null!=k&&"draft"==k.type&&k.aliveCheck!=b&&(k.key=g,d.push(k))}}catch(n){}1==d.length?this.loadDraft(d[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(d[0].key)})):
+App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.getDatabaseItems(mxUtils.bind(this,function(e){for(var d=[],c=0;c<e.length;c++)try{var k=e[c].key;if(null!=k&&".draft_"==k.substring(0,7)){var g=JSON.parse(e[c].data);null!=g&&"draft"==g.type&&g.aliveCheck!=b&&(g.key=k,d.push(g))}}catch(m){}1==d.length?this.loadDraft(d[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(d[0].key)})):
1<d.length?(e=new Date(d[0].modified),e=new DraftDialog(this,1<d.length?mxResources.get("selectDraft"):mxResources.get("draftFound",[e.toLocaleDateString()+" "+e.toLocaleTimeString()]),1<d.length?null:d[0].data,mxUtils.bind(this,function(b){this.hideDialog();b=""!=b?b:0;this.loadDraft(d[b].data,mxUtils.bind(this,function(){this.removeDatabaseItem(d[b].key)}))}),mxUtils.bind(this,function(b,c){b=""!=b?b:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(d[b].key);
null!=c&&c()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<d.length?d:null),this.showDialog(e.container,640,480,!0,!1,mxUtils.bind(this,function(b){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)})),e.init()):"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}),mxUtils.bind(this,function(){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(e){}};
@@ -11498,91 +11503,91 @@ mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash
App.prototype.addLanguageMenu=function(b,e){var d=null;if(null!=this.menus.get("language")){d=document.createElement("div");d.setAttribute("title",mxResources.get("language"));d.className="geIcon geSprite geSprite-globe";d.style.position="absolute";d.style.cursor="pointer";d.style.bottom="20px";d.style.right="20px";if(e){d.style.direction="rtl";d.style.textAlign="right";d.style.right="24px";var c=document.createElement("span");c.style.display="inline-block";c.style.fontSize="12px";c.style.margin=
"5px 24px 0 0";c.style.color="gray";c.style.userSelect="none";mxUtils.write(c,mxResources.get("language"));d.appendChild(c)}mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var c=new mxPopupMenu(this.menus.get("language").funct);c.div.className+=" geMenubarMenu";c.smartSeparators=!0;c.showDisabled=!0;c.autoExpand=!0;c.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(c,arguments);c.destroy()});var e=mxUtils.getOffset(d);
c.popup(e.x,e.y+d.offsetHeight,null,b);this.setCurrentMenu(c)}));b.appendChild(d)}return d};
-App.prototype.loadFileSystemEntry=function(b,e,d){d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});try{b.getFile().then(mxUtils.bind(this,function(c){var g=new FileReader;g.onload=mxUtils.bind(this,function(g){try{if(null!=e){var k=g.target.result;"image/png"==c.type&&(k=this.extractGraphModelFromPng(k));e(new LocalFile(this,k,c.name,null,b,c))}else this.openFileHandle(g.target.result,c.name,c,!1,b)}catch(f){d(f)}});g.onerror=d;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||
-"image/svg"===c.type.substring(0,9)?g.readAsText(c):g.readAsDataURL(c)}),d)}catch(c){d(c)}};
-App.prototype.createFileSystemOptions=function(b){var e=[],d=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(d=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var g={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};g.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==d?e.splice(0,0,
-g):this.editor.diagramFileTypes[c].extension==d?e.splice(0,0,g):e.push(g)}return{types:e,fileName:b}};App.prototype.showSaveFilePicker=function(b,e,d){e=null!=e?e:mxUtils.bind(this,function(b){"AbortError"!=b.name&&this.handleError(b)});d=null!=d?d:this.createFileSystemOptions();window.showSaveFilePicker(d).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(d){b(c,d)}),e)}),e)};
+App.prototype.loadFileSystemEntry=function(b,e,d){d=null!=d?d:mxUtils.bind(this,function(b){this.handleError(b)});try{b.getFile().then(mxUtils.bind(this,function(c){var k=new FileReader;k.onload=mxUtils.bind(this,function(g){try{if(null!=e){var k=g.target.result;"image/png"==c.type&&(k=this.extractGraphModelFromPng(k));e(new LocalFile(this,k,c.name,null,b,c))}else this.openFileHandle(g.target.result,c.name,c,!1,b)}catch(f){d(f)}});k.onerror=d;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||
+"image/svg"===c.type.substring(0,9)?k.readAsText(c):k.readAsDataURL(c)}),d)}catch(c){d(c)}};
+App.prototype.createFileSystemOptions=function(b){var e=[],d=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(d=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var k={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};k.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==d?e.splice(0,0,
+k):this.editor.diagramFileTypes[c].extension==d?e.splice(0,0,k):e.push(k)}return{types:e,fileName:b}};App.prototype.showSaveFilePicker=function(b,e,d){e=null!=e?e:mxUtils.bind(this,function(b){"AbortError"!=b.name&&this.handleError(b)});d=null!=d?d:this.createFileSystemOptions();window.showSaveFilePicker(d).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(d){b(c,d)}),e)}),e)};
App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getPeerForMode(b);if(null!=e)e.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(b[0])}),
mxUtils.bind(this,function(b){"AbortError"!=b.name&&this.handleError(b)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.openFiles(d.files),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.openFileInputElt=d}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(b,c){StorageFile.listFiles(this,"F",b,c)});window.openBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.getFileContent(this,b,c,d)});window.deleteBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.deleteFile(this,b,c,d)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(c,d){var e=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,c,d):new LocalFile(this,c,d))}),f=this.getCurrentFile();null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}));var g=this.dialog,k=g.close;this.dialog.close=mxUtils.bind(this,function(b){Editor.useLocalStorage=
-c;k.apply(g,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(n){this.handleError(n)}};
-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO||b==App.MODE_NOTION){var e=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:b==App.MODE_NOTION?this.notion:this.dropbox;null!=e&&e.pickLibrary(mxUtils.bind(this,function(b,c){if(null!=c)try{this.loadLibrary(c)}catch(n){this.handleError(n,
+function(c,d){var e=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,c,d):new LocalFile(this,c,d))}),f=this.getCurrentFile();null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}));var k=this.dialog,g=k.close;this.dialog.close=mxUtils.bind(this,function(b){Editor.useLocalStorage=
+c;g.apply(k,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(m){this.handleError(m)}};
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO||b==App.MODE_NOTION){var e=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:b==App.MODE_NOTION?this.notion:this.dropbox;null!=e&&e.pickLibrary(mxUtils.bind(this,function(b,c){if(null!=c)try{this.loadLibrary(c)}catch(m){this.handleError(m,
mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,mxResources.get("loading"))&&e.getLibrary(b,mxUtils.bind(this,function(b){this.spinner.stop();try{this.loadLibrary(b)}catch(f){this.handleError(f,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(b){this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var d=document.createElement("input");d.setAttribute("type",
"file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files){for(var b=0;b<d.files.length;b++)mxUtils.bind(this,function(b){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{this.loadLibrary(new LocalLibrary(this,c.target.result,b.name))}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}});c.readAsText(b)})(d.files[b]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=
!1;window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(b,c){StorageFile.listFiles(this,"L",b,c)});window.openBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.getFileContent(this,b,c,d)});window.deleteBrowserFile=mxUtils.bind(this,function(b,c,d){StorageFile.deleteFile(this,b,c,d)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));window.openFile.setConsumer(mxUtils.bind(this,
-function(c,d){try{this.loadLibrary(b==App.MODE_BROWSER?new StorageLibrary(this,c,d):new LocalLibrary(this,c,d))}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=c;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,e,d,c,g,k,n){try{c=null!=c?c:this.mode;g=null!=g?g:!1;k=null!=k?k:!1;var f=this.createLibraryDataFromImages(e),l=mxUtils.bind(this,function(b){this.spinner.stop();null!=n&&n();this.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)});null==d&&c==App.MODE_DEVICE&&(d=new LocalLibrary(this,f,b));if(null==d)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+function(c,d){try{this.loadLibrary(b==App.MODE_BROWSER?new StorageLibrary(this,c,d):new LocalLibrary(this,c,d))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=c;window.openFile=null})}};
+App.prototype.saveLibrary=function(b,e,d,c,k,g,m){try{c=null!=c?c:this.mode;k=null!=k?k:!1;g=null!=g?g:!1;var f=this.createLibraryDataFromImages(e),l=mxUtils.bind(this,function(b){this.spinner.stop();null!=m&&m();this.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)});null==d&&c==App.MODE_DEVICE&&(d=new LocalLibrary(this,f,b));if(null==d)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
this.drive.insertFile(b,f,d,mxUtils.bind(this,function(b){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(b,e)}),l,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,f,mxUtils.bind(this,function(b){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(b,e)}),l,d):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
f,mxUtils.bind(this,function(b){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(b,e)}),l,d):c==App.MODE_NOTION&&null!=this.notion&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.notion.insertLibrary(b,f,mxUtils.bind(this,function(b){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(b,e)}),l,d):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,f,mxUtils.bind(this,function(b){this.spinner.stop();
this.hideDialog(!0);this.libraryLoaded(b,e)}),l,d):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,f,mxUtils.bind(this,function(b){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(b,e)}),l,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,f,mxUtils.bind(this,function(b){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(b,
-e)}),l,d):c==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var c=new StorageLibrary(this,f,b);c.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,e)}),l)}),null==localStorage.getItem(b)?d():this.confirm(mxResources.get("replaceIt",[b]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(f);var m=mxUtils.bind(this,function(){d.save(!0,mxUtils.bind(this,
-function(b){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(d,e);null!=n&&n()}),l)});if(b!=d.getTitle()){var p=d.getHash();d.rename(b,mxUtils.bind(this,function(b){d.constructor!=LocalLibrary&&p!=d.getHash()&&(mxSettings.removeCustomLibrary(p),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(p);m()}),l)}else m()}}catch(q){this.handleError(q)}};
+e)}),l,d):c==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var c=new StorageLibrary(this,f,b);c.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,e)}),l)}),null==localStorage.getItem(b)?d():this.confirm(mxResources.get("replaceIt",[b]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(k||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(f);var n=mxUtils.bind(this,function(){d.save(!0,mxUtils.bind(this,
+function(b){this.spinner.stop();this.hideDialog(!0);g||this.libraryLoaded(d,e);null!=m&&m()}),l)});if(b!=d.getTitle()){var p=d.getHash();d.rename(b,mxUtils.bind(this,function(b){d.constructor!=LocalLibrary&&p!=d.getHash()&&(mxSettings.removeCustomLibrary(p),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(p);n()}),l)}else n()}}catch(q){this.handleError(q)}};
App.prototype.saveFile=function(b,e){var d=this.getCurrentFile();if(null!=d){var c=mxUtils.bind(this,function(){EditorUi.enableDrafts&&d.removeDraft();this.getCurrentFile()==d||d.isModified()||(d.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=e&&e()});if(b||null==d.getTitle()||null!=d.invalidFileHandle||null==this.mode)if(null!=d&&d.constructor==LocalFile&&null!=d.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
-function(b,e){d.invalidFileHandle=null;d.fileHandle=b;d.title=e.name;d.desc=e;this.save(e.name,c)}),null,this.createFileSystemOptions(d.getTitle()));else{var g=null!=d.getTitle()?d.getTitle():this.defaultFilename,k=!mxClient.IS_IOS||!navigator.standalone,n=this.mode,f=this.getServiceCount(!0);isLocalStorage&&f++;var l=4>=f?2:6<f?4:3,g=new CreateDialog(this,g,mxUtils.bind(this,function(b,e,f){null!=b&&0<b.length&&(/(\.pdf)$/i.test(b)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
-function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){f.value=b.split(".").slice(0,-1).join(".");f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?f.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==n&&e==App.MODE_DEVICE?null!=d&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(b,e){d.fileHandle=b;d.mode=App.MODE_DEVICE;d.title=e.name;
-d.desc=e;this.setMode(App.MODE_DEVICE);this.save(e.name,c)}),mxUtils.bind(this,function(b){"AbortError"!=b.name&&this.handleError(b)}),this.createFileSystemOptions(b)):(this.setMode(App.MODE_DEVICE),this.save(b,c)):"download"==e?(new LocalFile(this,null,b)).save():"_blank"==e?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):n!=e?this.pickFolder(e,mxUtils.bind(this,function(d){this.createFile(b,
-this.getFileData(/(\.xml)$/i.test(b)||0>b.indexOf(".")||/(\.drawio)$/i.test(b),/(\.svg)$/i.test(b),/(\.html)$/i.test(b)),null,e,c,null==this.mode,d)})):null!=e&&this.save(b,c)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,k,null,!0,l,null,null,null,this.editor.fileExtensions,!1);this.showDialog(g.container,400,f>l?390:270,!0,!0);g.init()}else this.save(d.getTitle(),c)}};
-App.prototype.loadTemplate=function(b,e,d,c,g){var k=!1,n=b;this.editor.isCorsEnabledForUrl(n)||(n="t="+(new Date).getTime(),n=PROXY_URL+"?url="+encodeURIComponent(b)+"&base64=1&"+n,k=!0);var f=null!=c?c:b;this.editor.loadUrl(n,mxUtils.bind(this,function(c){try{var l=k?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c):c,n=/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f);if(n||this.isVisioData(l))n||(f=g?this.isRemoteVisioData(l)?"raw.vss":"raw.vssx":this.isRemoteVisioData(l)?
+function(b,e){d.invalidFileHandle=null;d.fileHandle=b;d.title=e.name;d.desc=e;this.save(e.name,c)}),null,this.createFileSystemOptions(d.getTitle()));else{var k=null!=d.getTitle()?d.getTitle():this.defaultFilename,g=!mxClient.IS_IOS||!navigator.standalone,m=this.mode,f=this.getServiceCount(!0);isLocalStorage&&f++;var l=4>=f?2:6<f?4:3,k=new CreateDialog(this,k,mxUtils.bind(this,function(b,e,f){null!=b&&0<b.length&&(/(\.pdf)$/i.test(b)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
+function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){f.value=b.split(".").slice(0,-1).join(".");f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?f.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==m&&e==App.MODE_DEVICE?null!=d&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(b,e){d.fileHandle=b;d.mode=App.MODE_DEVICE;d.title=e.name;
+d.desc=e;this.setMode(App.MODE_DEVICE);this.save(e.name,c)}),mxUtils.bind(this,function(b){"AbortError"!=b.name&&this.handleError(b)}),this.createFileSystemOptions(b)):(this.setMode(App.MODE_DEVICE),this.save(b,c)):"download"==e?(new LocalFile(this,null,b)).save():"_blank"==e?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):m!=e?this.pickFolder(e,mxUtils.bind(this,function(d){this.createFile(b,
+this.getFileData(/(\.xml)$/i.test(b)||0>b.indexOf(".")||/(\.drawio)$/i.test(b),/(\.svg)$/i.test(b),/(\.html)$/i.test(b)),null,e,c,null==this.mode,d)})):null!=e&&this.save(b,c)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,g,null,!0,l,null,null,null,this.editor.fileExtensions,!1);this.showDialog(k.container,400,f>l?390:270,!0,!0);k.init()}else this.save(d.getTitle(),c)}};
+App.prototype.loadTemplate=function(b,e,d,c,k){var g=!1,m=b;this.editor.isCorsEnabledForUrl(m)||(m="t="+(new Date).getTime(),m=PROXY_URL+"?url="+encodeURIComponent(b)+"&base64=1&"+m,g=!0);var f=null!=c?c:b;this.editor.loadUrl(m,mxUtils.bind(this,function(c){try{var l=g?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c):c,m=/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f);if(m||this.isVisioData(l))m||(f=k?this.isRemoteVisioData(l)?"raw.vss":"raw.vssx":this.isRemoteVisioData(l)?
"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(c.substring(c.indexOf(",")+1)),function(b){e(b)},d,f);else if(!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(l,f))this.parseFile(new Blob([l],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&e(b.responseText)}),b);else if(this.isLucidChartData(l))this.convertLucidChart(l,mxUtils.bind(this,function(b){e(b)}),
-mxUtils.bind(this,function(b){d(b)}));else{if(/(\.png)($|\?)/i.test(f)||this.isPngData(l))l=this.extractGraphModelFromPng(c);e(l)}}catch(q){d(q)}}),d,/(\.png)($|\?)/i.test(f)||/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f),null,null,k)};
+mxUtils.bind(this,function(b){d(b)}));else{if(/(\.png)($|\?)/i.test(f)||this.isPngData(l))l=this.extractGraphModelFromPng(c);e(l)}}catch(q){d(q)}}),d,/(\.png)($|\?)/i.test(f)||/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f),null,null,g)};
App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_TRELLO?this.trello:b==App.MODE_NOTION?this.notion:null};
-App.prototype.createFile=function(b,e,d,c,g,k,n,f,l){c=f?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var m=mxUtils.bind(this,function(){this.spinner.stop()}),p=mxUtils.bind(this,function(b){m();null==b&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=b&&this.handleError(b)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null==n&&null!=this.stateArg&&null!=this.stateArg.folderId&&(n=this.stateArg.folderId),
-this.drive.insertFile(b,e,n,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p,!1,n):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p,!1,n):c==App.MODE_NOTION&&null!=this.notion?this.notion.insertFile(b,e,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p,
-!1,n):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p,!1,n):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,e,mxUtils.bind(this,function(b){m();this.fileCreated(b,d,k,g,l)}),p,!1,n):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,mxUtils.bind(this,function(b){m();
-this.fileCreated(b,d,k,g,l)}),p):!f&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(m(),this.showSaveFilePicker(mxUtils.bind(this,function(b,c){var f=new LocalFile(this,e,c.name,null,b,c);f.saveFile(c.name,!1,mxUtils.bind(this,function(){this.fileCreated(f,d,k,g,l)}),p,!0)}),mxUtils.bind(this,function(b){"AbortError"!=b.name&&p(b)}),this.createFileSystemOptions(b))):(m(),this.fileCreated(new LocalFile(this,e,b,null==c),d,k,g,l))}catch(q){m(),this.handleError(q)}}};
-App.prototype.fileCreated=function(b,e,d,c,g){var k=window.location.pathname;null!=e&&0<e.length&&(k+="?libs="+e);null!=g&&0<g.length&&(k+="?clibs="+g);k=this.getUrl(k);b.getMode()!=App.MODE_DEVICE&&(k+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var n=b.getData(),n=0<n.length?this.editor.extractGraphModel(mxUtils.parseXml(n).documentElement,!0):null,f=window.location.protocol+"//"+window.location.hostname+k,l=n,m=null;null!=n&&/\.svg$/i.test(b.getTitle())&&
-(m=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(m.container),l=this.decodeNodeIntoGraph(l,m));b.setData(this.createFileData(n,m,b,f));null!=m&&m.container.parentNode.removeChild(m.container);var p=mxUtils.bind(this,function(){this.spinner.stop()}),q=mxUtils.bind(this,function(){p();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);d&&b.addAllSavedStatus();
-null!=e&&this.sidebar.showEntries(e);if(null!=g){for(var c=[],f=g.split(";"),k=0;k<f.length;k++)c.push(decodeURIComponent(f[k]));this.loadLibraries(c)}}),n=mxUtils.bind(this,function(){d||null==f||!f.isModified()?l():this.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==d||d?n():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
-null==b.getMode())),null!=c&&c(),window.openWindow(k,null,n))});b.constructor==LocalFile?q():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){q()}),mxUtils.bind(this,function(b){p();this.handleError(b)}))}};
-App.prototype.loadFile=function(b,e,d,c,g){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var k=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var f=mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();
+App.prototype.createFile=function(b,e,d,c,k,g,m,f,l){c=f?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var n=mxUtils.bind(this,function(){this.spinner.stop()}),p=mxUtils.bind(this,function(b){n();null==b&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=b&&this.handleError(b)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null==m&&null!=this.stateArg&&null!=this.stateArg.folderId&&(m=this.stateArg.folderId),
+this.drive.insertFile(b,e,m,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p,!1,m):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p,!1,m):c==App.MODE_NOTION&&null!=this.notion?this.notion.insertFile(b,e,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p,
+!1,m):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p,!1,m):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,e,mxUtils.bind(this,function(b){n();this.fileCreated(b,d,g,k,l)}),p,!1,m):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,mxUtils.bind(this,function(b){n();
+this.fileCreated(b,d,g,k,l)}),p):!f&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(n(),this.showSaveFilePicker(mxUtils.bind(this,function(b,c){var f=new LocalFile(this,e,c.name,null,b,c);f.saveFile(c.name,!1,mxUtils.bind(this,function(){this.fileCreated(f,d,g,k,l)}),p,!0)}),mxUtils.bind(this,function(b){"AbortError"!=b.name&&p(b)}),this.createFileSystemOptions(b))):(n(),this.fileCreated(new LocalFile(this,e,b,null==c),d,g,k,l))}catch(q){n(),this.handleError(q)}}};
+App.prototype.fileCreated=function(b,e,d,c,k){var g=window.location.pathname;null!=e&&0<e.length&&(g+="?libs="+e);null!=k&&0<k.length&&(g+="?clibs="+k);g=this.getUrl(g);b.getMode()!=App.MODE_DEVICE&&(g+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var m=b.getData(),m=0<m.length?this.editor.extractGraphModel(mxUtils.parseXml(m).documentElement,!0):null,f=window.location.protocol+"//"+window.location.hostname+g,l=m,n=null;null!=m&&/\.svg$/i.test(b.getTitle())&&
+(n=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(n.container),l=this.decodeNodeIntoGraph(l,n));b.setData(this.createFileData(m,n,b,f));null!=n&&n.container.parentNode.removeChild(n.container);var p=mxUtils.bind(this,function(){this.spinner.stop()}),q=mxUtils.bind(this,function(){p();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);d&&b.addAllSavedStatus();
+null!=e&&this.sidebar.showEntries(e);if(null!=k){for(var c=[],f=k.split(";"),g=0;g<f.length;g++)c.push(decodeURIComponent(f[g]));this.loadLibraries(c)}}),m=mxUtils.bind(this,function(){d||null==f||!f.isModified()?l():this.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==d||d?m():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+null==b.getMode())),null!=c&&c(),window.openWindow(g,null,m))});b.constructor==LocalFile?q():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){q()}),mxUtils.bind(this,function(b){p();this.handleError(b)}))}};
+App.prototype.loadFile=function(b,e,d,c,k){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var g=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var f=mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();
window.location.hash=null!=b?b.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(d){null!=d?(this.fileLoaded(new StorageFile(this,d,b)),null!=c&&c()):f({message:mxResources.get("fileNotFound")})}),f)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();window.location.hash=null!=b?b.getHash():""}));else if(null!=d)this.spinner.stop(),
this.fileLoaded(d),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var g=decodeURIComponent(b.substring(1));"<"!=g.charAt(0)&&(g=Graph.decompress(g));g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):
this.defaultFilename,!0);g.getHash=function(){return b};this.fileLoaded(g);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(b,d){this.spinner.stop();this.fileLoaded(new EmbedFile(this,b,d));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var k=decodeURIComponent(b.substring(1)),n=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 b=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var b=k.substring(31,k.lastIndexOf("&ex"));this.loadFile("G"+b,e,null,mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&this.editor.chromeless&&
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var k=decodeURIComponent(b.substring(1)),m=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 b=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var b=k.substring(31,k.lastIndexOf("&ex"));this.loadFile("G"+b,e,null,mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&this.editor.chromeless&&
!this.editor.editable&&(d.getHash=function(){return"G"+b},window.location.hash="#"+d.getHash());null!=c&&c()}));return!0}return!1});!b()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",b);return!0});this.loadTemplate(k,mxUtils.bind(this,function(d){this.spinner.stop();if(null!=d&&0<d.length){var e=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var f=k,g=k.lastIndexOf("."),l=f.lastIndexOf("/");g>l&&0<l&&(f=f.substring(l+1,g),g=k.substring(g),
-this.useCanvasForExport||".png"!=g||(g=".drawio"),".svg"===g||".xml"===g||".html"===g||".png"===g||".drawio"===g)&&(e=f+g)}d=new LocalFile(this,d,null!=urlParams.title?decodeURIComponent(urlParams.title):e,!0);d.getHash=function(){return b};this.fileLoaded(d,!0)?null!=c&&c():n()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else n()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
-function(){n()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(g=null,"G"==b.charAt(0)?g=this.drive:"D"==b.charAt(0)?g=this.dropbox:"W"==b.charAt(0)?g=this.oneDrive:"H"==b.charAt(0)?g=this.gitHub:"A"==b.charAt(0)?g=this.gitLab:"T"==b.charAt(0)?g=this.trello:"N"==b.charAt(0)&&(g=this.notion),null==g)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
+this.useCanvasForExport||".png"!=g||(g=".drawio"),".svg"===g||".xml"===g||".html"===g||".png"===g||".drawio"===g)&&(e=f+g)}d=new LocalFile(this,d,null!=urlParams.title?decodeURIComponent(urlParams.title):e,!0);d.getHash=function(){return b};this.fileLoaded(d,!0)?null!=c&&c():m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+function(){m()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(g=null,"G"==b.charAt(0)?g=this.drive:"D"==b.charAt(0)?g=this.dropbox:"W"==b.charAt(0)?g=this.oneDrive:"H"==b.charAt(0)?g=this.gitHub:"A"==b.charAt(0)?g=this.gitLab:"T"==b.charAt(0)?g=this.trello:"N"==b.charAt(0)&&(g=this.notion),null==g)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var b=this.getCurrentFile();window.location.hash=null!=b?b.getHash():""}));else{var t=b.charAt(0);b=decodeURIComponent(b.substring(1));g.getFile(b,mxUtils.bind(this,function(d){this.spinner.stop();this.fileLoaded(d);var e=this.getCurrentFile();null==e?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(e.getHash=function(){return t+b},window.location.hash="#"+e.getHash()):d==e&&null==d.getMode()&&
-(d=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(c){null!=window.console&&null!=c&&console.log("error in loadFile:",b,c);this.handleError(c,null!=c?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var b=this.getCurrentFile();null==b?(window.location.hash="",this.showSplash()):window.location.hash="#"+b.getHash()}),null,null,"#"+t+b)}))}}),n=this.getCurrentFile(),f=mxUtils.bind(this,
-function(){g||null==n||!n.isModified()?k():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=n&&(window.location.hash=n.getHash())}),k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?f():null==n||e?f():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,f)).container,320,140,!0,!0)};
+(d=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+"</div>"));null!=c&&c()}),mxUtils.bind(this,function(c){null!=window.console&&null!=c&&console.log("error in loadFile:",b,c);this.handleError(c,null!=c?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var b=this.getCurrentFile();null==b?(window.location.hash="",this.showSplash()):window.location.hash="#"+b.getHash()}),null,null,"#"+t+b)}))}}),m=this.getCurrentFile(),f=mxUtils.bind(this,
+function(){k||null==m||!m.isModified()?g():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=m&&(window.location.hash=m.getHash())}),g,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?f():null==m||e?f():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,f)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor!=LocalLibrary&&(e+="\n"+b.getHash());b.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?e+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))};
-App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var d=mxUtils.bind(this,function(b,c){c||mxSettings.removeCustomLibrary(b);delete this.pendingLibraries[b]}),c=0,g=[],k=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var d=b.length-1;0<=d;d--)null!=g[d]&&this.loadLibrary(g[d]);null!=e&&e()}});if(null!=b)for(var n=0;n<b.length;n++){var f=encodeURIComponent(decodeURIComponent(b[n]));mxUtils.bind(this,function(b,e){if(null!=
-b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){c++;var f=mxUtils.bind(this,function(d){delete this.pendingLibraries[b];g[e]=d;c--;k()}),l=mxUtils.bind(this,function(e){d(b,e);c--;k()});this.pendingLibraries[b]=!0;var n=b.substring(0,1);if("L"==n)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var c=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,c,mxUtils.bind(this,function(b){".scratchpad"==c&&null==b&&
-(b=this.emptyLibraryXml);null!=b?f(new StorageLibrary(this,b,c)):l()}),l)}catch(z){l()}}),0);else if("U"==n){var m=decodeURIComponent(b.substring(1));this.isOffline()||this.loadTemplate(m,mxUtils.bind(this,function(b){null!=b&&0<b.length?f(new UrlLibrary(this,b,m)):l()}),function(){l()},null,!0)}else if("R"==n){n=decodeURIComponent(b.substring(1));try{var n=JSON.parse(n),v={id:n[0],title:n[1],downloadUrl:n[2]};this.remoteInvoke("getFileContent",[v.downloadUrl],null,mxUtils.bind(this,function(b){try{f(new RemoteLibrary(this,
-b,v))}catch(z){l()}}),function(){l()})}catch(A){l()}}else if("S"==n&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(b.substring(1)),function(b){f(b)},l)}catch(A){l()}else{var x=null;"G"==n?null!=this.drive&&null!=this.drive.user&&(x=this.drive):"H"==n?null!=this.gitHub&&null!=this.gitHub.getUser()&&(x=this.gitHub):"T"==n?null!=this.trello&&this.trello.isAuthorized()&&(x=this.trello):"D"==n?null!=this.dropbox&&null!=this.dropbox.getUser()&&(x=this.dropbox):"W"==n&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(x=this.oneDrive);null!=x?x.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(b){try{f(b)}catch(z){l()}}),function(b){l()}):l(!0)}}})(f,n)}k()}};
+App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var d=mxUtils.bind(this,function(b,c){c||mxSettings.removeCustomLibrary(b);delete this.pendingLibraries[b]}),c=0,k=[],g=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var d=b.length-1;0<=d;d--)null!=k[d]&&this.loadLibrary(k[d]);null!=e&&e()}});if(null!=b)for(var m=0;m<b.length;m++){var f=encodeURIComponent(decodeURIComponent(b[m]));mxUtils.bind(this,function(b,e){if(null!=
+b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){c++;var f=mxUtils.bind(this,function(d){delete this.pendingLibraries[b];k[e]=d;c--;g()}),l=mxUtils.bind(this,function(e){d(b,e);c--;g()});this.pendingLibraries[b]=!0;var m=b.substring(0,1);if("L"==m)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var c=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,c,mxUtils.bind(this,function(b){".scratchpad"==c&&null==b&&
+(b=this.emptyLibraryXml);null!=b?f(new StorageLibrary(this,b,c)):l()}),l)}catch(z){l()}}),0);else if("U"==m){var n=decodeURIComponent(b.substring(1));this.isOffline()||this.loadTemplate(n,mxUtils.bind(this,function(b){null!=b&&0<b.length?f(new UrlLibrary(this,b,n)):l()}),function(){l()},null,!0)}else if("R"==m){m=decodeURIComponent(b.substring(1));try{var m=JSON.parse(m),v={id:m[0],title:m[1],downloadUrl:m[2]};this.remoteInvoke("getFileContent",[v.downloadUrl],null,mxUtils.bind(this,function(b){try{f(new RemoteLibrary(this,
+b,v))}catch(z){l()}}),function(){l()})}catch(A){l()}}else if("S"==m&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(b.substring(1)),function(b){f(b)},l)}catch(A){l()}else{var x=null;"G"==m?null!=this.drive&&null!=this.drive.user&&(x=this.drive):"H"==m?null!=this.gitHub&&null!=this.gitHub.getUser()&&(x=this.gitHub):"T"==m?null!=this.trello&&this.trello.isAuthorized()&&(x=this.trello):"D"==m?null!=this.dropbox&&null!=this.dropbox.getUser()&&(x=this.dropbox):"W"==m&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(x=this.oneDrive);null!=x?x.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(b){try{f(b)}catch(z){l()}}),function(b){l()}):l(!0)}}})(f,m)}g()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+
Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),
this.commentButton=null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!=b?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage=
"none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth="0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b),
Editor.isDarkMode()||"atlas"==uiTheme||(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),"1"!=urlParams.extAuth&&this.fetchAndShowNotification("device"==this.mode||
"google"==this.mode?this.mode:null))}};
-App.prototype.fetchAndShowNotification=function(b){if(!this.fetchingNotif){b=b||"online";var e=null,d=mxUtils.bind(this,function(c){c=c.filter(function(c){return!c.targets||-1<c.targets.indexOf(b)});for(var d=b+"NotifReadTS",e=parseInt(localStorage.getItem(d)),n=0;n<c.length;n++)c[n].isNew=!e||c[n].timestamp>e;this.showNotification(c,d)});try{e=JSON.parse(localStorage.getItem(".notifCache"))}catch(c){}null==e||e.ts+864E5<Date.now()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,
+App.prototype.fetchAndShowNotification=function(b){if(!this.fetchingNotif){b=b||"online";var e=null,d=mxUtils.bind(this,function(c){c=c.filter(function(c){return!c.targets||-1<c.targets.indexOf(b)});for(var d=b+"NotifReadTS",e=parseInt(localStorage.getItem(d)),m=0;m<c.length;m++)c[m].isNew=!e||c[m].timestamp>e;this.showNotification(c,d)});try{e=JSON.parse(localStorage.getItem(".notifCache"))}catch(c){}null==e||e.ts+864E5<Date.now()?(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,
function(b){200<=b.getStatus()&&299>=b.getStatus()&&(b=JSON.parse(b.getText()),b.sort(function(b,c){return c.timestamp-b.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:b})),this.fetchingNotif=!1,d(b))}))):d(e.notifs)}};
App.prototype.showNotification=function(b,e){function d(b){var c=document.querySelector(".geNotification-count");null!=c&&(c.innerHTML=b,c.style.display=0==b?"none":"",c=document.querySelector(".geNotification-bell"),c.style.animation=0==b?"none":"",c.className="geNotification-bell"+(0==b?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==b?"none":"")}var c=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var c=this.notificationWin.querySelectorAll(".circle.active"),
-d=0;d<c.length;d++)c[d].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(e,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme&&(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px");var g=document.createElement("span");g.className="geNotification-count";this.notificationBtn.appendChild(g);g=document.createElement("div");g.className="geNotification-bell";
-g.style.opacity="min"==uiTheme?"0.5":"";var k=document.createElement("span");k.className="geBell-top";g.appendChild(k);k=document.createElement("span");k.className="geBell-middle";g.appendChild(k);k=document.createElement("span");k.className="geBell-bottom";g.appendChild(k);k=document.createElement("span");k.className="geBell-rad";g.appendChild(k);this.notificationBtn.appendChild(g);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");
-this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);k=document.createElement("div");k.className="header";g=document.createElement("span");g.className="title";g.textContent=mxResources.get("notifications");k.appendChild(g);g=document.createElement("span");g.className="closeBtn";g.textContent="x";k.appendChild(g);this.notificationWin.appendChild(k);k=document.createElement("div");k.className="notifications clearfix";
-var n=document.createElement("div");n.setAttribute("id","geNotifList");n.style.position="relative";k.appendChild(n);this.notificationWin.appendChild(k);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var b=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=b.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=
-b.right-this.notificationWin.clientWidth+"px";d(0)}else c()}));mxEvent.addListener(g,"click",c)}var f=0,l=document.getElementById("geNotifList");if(null!=l){if(0==b.length)l.innerHTML='<div class="line"></div><div class="notification">'+mxUtils.htmlEntities(mxResources.get("none"))+"</div>";else for(l.innerHTML='<div class="line"></div>',g=0;g<b.length;g++)(function(b,c){c.isNew&&f++;var d=document.createElement("div");d.className="notification";var e=b.timeSince(new Date(c.timestamp));null==e&&(e=
-mxResources.get("lessThanAMinute"));d.innerHTML='<div class="circle'+(c.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[e],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(c.content)+"</p>";c.link&&mxEvent.addListener(d,"click",function(){window.open(c.link,"notifWin")});l.appendChild(d)})(this,b[g]);d(f)}};
-App.prototype.save=function(b,e){var d=this.getCurrentFile();if(null!=d&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.bind(this,function(){d.handleFileSuccess(!0);null!=e&&e()}),g=mxUtils.bind(this,function(c){d.isModified()&&Editor.addRetryToError(c,mxUtils.bind(this,function(){this.save(b,e)}));d.handleFileError(c,!0)});try{b==d.getTitle()?d.save(!0,c,g):d.saveAs(b,c,g)}catch(k){g(k)}}};
-App.prototype.pickFolder=function(b,e,d,c,g){d=null!=d?d:!0;var k=this.spinner.pause();d&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(b){k();if(b.action==google.picker.Action.PICKED){var c=null;null!=b.docs&&0<b.docs.length&&"folder"==b.docs[0].type&&(c=b.docs[0].id);e(c)}}),g):d&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(b){k();null!=b&&null!=b.value&&0<b.value.length&&(b=OneDriveFile.prototype.getIdOf(b.value[0]),
-e(b))}),c):d&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(b){k();e(b)})):d&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(b){k();e(b)})):d&&b==App.MODE_NOTION&&null!=this.notion?this.notion.pickFolder(mxUtils.bind(this,function(b){k();e(b)})):d&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(b){k();e(b)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,e,d,c,g,k){g==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)})):g==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,b,k,mxUtils.bind(this,function(b){this.spinner.stop()}),
-mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),d,c):g==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),!1,k):g==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,b,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),!0,k,c):g==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),!1,k):g==App.MODE_BROWSER&&(d=mxUtils.bind(this,function(){localStorage.setItem(e,b)}),null==localStorage.getItem(e)?
+d=0;d<c.length;d++)c[d].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(e,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme&&(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px");var k=document.createElement("span");k.className="geNotification-count";this.notificationBtn.appendChild(k);k=document.createElement("div");k.className="geNotification-bell";
+k.style.opacity="min"==uiTheme?"0.5":"";var g=document.createElement("span");g.className="geBell-top";k.appendChild(g);g=document.createElement("span");g.className="geBell-middle";k.appendChild(g);g=document.createElement("span");g.className="geBell-bottom";k.appendChild(g);g=document.createElement("span");g.className="geBell-rad";k.appendChild(g);this.notificationBtn.appendChild(k);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");
+this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);g=document.createElement("div");g.className="header";k=document.createElement("span");k.className="title";k.textContent=mxResources.get("notifications");g.appendChild(k);k=document.createElement("span");k.className="closeBtn";k.textContent="x";g.appendChild(k);this.notificationWin.appendChild(g);g=document.createElement("div");g.className="notifications clearfix";
+var m=document.createElement("div");m.setAttribute("id","geNotifList");m.style.position="relative";g.appendChild(m);this.notificationWin.appendChild(g);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var b=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=b.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=
+b.right-this.notificationWin.clientWidth+"px";d(0)}else c()}));mxEvent.addListener(k,"click",c)}var f=0,l=document.getElementById("geNotifList");if(null!=l){if(0==b.length)l.innerHTML='<div class="line"></div><div class="notification">'+mxUtils.htmlEntities(mxResources.get("none"))+"</div>";else for(l.innerHTML='<div class="line"></div>',k=0;k<b.length;k++)(function(b,c){c.isNew&&f++;var d=document.createElement("div");d.className="notification";var e=b.timeSince(new Date(c.timestamp));null==e&&(e=
+mxResources.get("lessThanAMinute"));d.innerHTML='<div class="circle'+(c.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[e],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(c.content)+"</p>";c.link&&mxEvent.addListener(d,"click",function(){window.open(c.link,"notifWin")});l.appendChild(d)})(this,b[k]);d(f)}};
+App.prototype.save=function(b,e){var d=this.getCurrentFile();if(null!=d&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.bind(this,function(){d.handleFileSuccess(!0);null!=e&&e()}),k=mxUtils.bind(this,function(c){d.isModified()&&Editor.addRetryToError(c,mxUtils.bind(this,function(){this.save(b,e)}));d.handleFileError(c,!0)});try{b==d.getTitle()?d.save(!0,c,k):d.saveAs(b,c,k)}catch(g){k(g)}}};
+App.prototype.pickFolder=function(b,e,d,c,k){d=null!=d?d:!0;var g=this.spinner.pause();d&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(b){g();if(b.action==google.picker.Action.PICKED){var c=null;null!=b.docs&&0<b.docs.length&&"folder"==b.docs[0].type&&(c=b.docs[0].id);e(c)}}),k):d&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(b){g();null!=b&&null!=b.value&&0<b.value.length&&(b=OneDriveFile.prototype.getIdOf(b.value[0]),
+e(b))}),c):d&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(b){g();e(b)})):d&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(b){g();e(b)})):d&&b==App.MODE_NOTION&&null!=this.notion?this.notion.pickFolder(mxUtils.bind(this,function(b){g();e(b)})):d&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(b){g();e(b)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,e,d,c,k,g){k==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)})):k==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,b,g,mxUtils.bind(this,function(b){this.spinner.stop()}),
+mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),d,c):k==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),!1,g):k==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,b,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),!0,g,c):k==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),!1,g):k==App.MODE_BROWSER&&(d=mxUtils.bind(this,function(){localStorage.setItem(e,b)}),null==localStorage.getItem(e)?
d():this.confirm(mxResources.get("replaceIt",[e]),d))};
App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var e=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}var e=this.editor.graph,d=b.isEditable()&&!b.invalidChecksum;e.isEnabled()&&!d&&e.reset();e.setEnabled(d);null==urlParams.rev&&(this.updateDocumentTitle(),e=b.getHash(),0<e.length?
window.location.hash=e:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
-App.prototype.showAuthDialog=function(b,e,d,c){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(b){try{null!=d&&d(b,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(n){this.editor.setStatus(mxUtils.htmlEntities(n.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(b){null!=c&&c(b);b&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,e,d,c,g,k,n,f){var l=e;/\.svg$/i.test(l)||(l=l.substring(0,e.lastIndexOf("."))+c);var m=!1;null!=this.gitHub&&b.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 p=new XMLHttpRequest;p.open("GET",b,!0);m||(p.responseType="blob");if(f)for(var q in f)p.setRequestHeader(q,f[q]);p.onload=mxUtils.bind(this,function(){if(200<=
-p.status&&299>=p.status){var b=null;m?(b=JSON.parse(p.responseText),b=this.base64ToBlob(b.content,"application/octet-stream")):b=new Blob([p.response],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(b){g(new LocalFile(this,b,l,!0))}),k,e)}else null!=k&&k({message:mxResources.get("errorLoadingFile")})});p.onerror=k;p.send()}else{var t=mxUtils.bind(this,function(c){try{if(/\.pdf$/i.test(e)){var d=Editor.extractGraphModelFromPdf(c);null!=d&&0<d.length&&g(new LocalFile(this,
-d,l,!0))}else/\.png$/i.test(e)?(d=this.extractGraphModelFromPng(c),null!=d?g(new LocalFile(this,d,l,!0)):g(new LocalFile(this,c,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,b)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?g(new LocalFile(this,b.responseText,l,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),e):g(new LocalFile(this,c,l,!0))}catch(x){null!=
-k&&k(x)}});d=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||/\.pdf$/i.test(e)||null!=d&&"image/"==d.substring(0,6);m?mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=g){b=JSON.parse(b.getText());var c=b.content;"base64"===b.encoding&&(c=/\.png$/i.test(e)?"data:image/png;base64,"+c:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+c:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c));t(c)}}else null!=k&&k({code:App.ERROR_UNKNOWN})}),function(){null!=
-k&&k({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=k&&k({code:App.ERROR_TIMEOUT,retry:fn})},f):null!=n?n(b,t,k,d):this.editor.loadUrl(b,t,k,d,null,null,null,f)}};
+App.prototype.showAuthDialog=function(b,e,d,c){var k=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(b){try{null!=d&&d(b,mxUtils.bind(this,function(){this.hideDialog();k()}))}catch(m){this.editor.setStatus(mxUtils.htmlEntities(m.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(b){null!=c&&c(b);b&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,e,d,c,k,g,m,f){var l=e;/\.svg$/i.test(l)||(l=l.substring(0,e.lastIndexOf("."))+c);var n=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(n=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var p=new XMLHttpRequest;p.open("GET",b,!0);n||(p.responseType="blob");if(f)for(var q in f)p.setRequestHeader(q,f[q]);p.onload=mxUtils.bind(this,function(){if(200<=
+p.status&&299>=p.status){var b=null;n?(b=JSON.parse(p.responseText),b=this.base64ToBlob(b.content,"application/octet-stream")):b=new Blob([p.response],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(b){k(new LocalFile(this,b,l,!0))}),g,e)}else null!=g&&g({message:mxResources.get("errorLoadingFile")})});p.onerror=g;p.send()}else{var t=mxUtils.bind(this,function(c){try{if(/\.pdf$/i.test(e)){var d=Editor.extractGraphModelFromPdf(c);null!=d&&0<d.length&&k(new LocalFile(this,
+d,l,!0))}else/\.png$/i.test(e)?(d=this.extractGraphModelFromPng(c),null!=d?k(new LocalFile(this,d,l,!0)):k(new LocalFile(this,c,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,b)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?k(new LocalFile(this,b.responseText,l,!0)):null!=g&&g({message:mxResources.get("errorLoadingFile")}))}),e):k(new LocalFile(this,c,l,!0))}catch(x){null!=
+g&&g(x)}});d=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||/\.pdf$/i.test(e)||null!=d&&"image/"==d.substring(0,6);n?mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=k){b=JSON.parse(b.getText());var c=b.content;"base64"===b.encoding&&(c=/\.png$/i.test(e)?"data:image/png;base64,"+c:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+c:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c));t(c)}}else null!=g&&g({code:App.ERROR_UNKNOWN})}),function(){null!=
+g&&g({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=g&&g({code:App.ERROR_TIMEOUT,retry:fn})},f):null!=m?m(b,t,g,d):this.editor.loadUrl(b,t,g,d,null,null,null,f)}};
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(b){this.appIconClicked(b)}));var b=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==)":
@@ -11608,143 +11613,143 @@ App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive
"absolute",this.userElement.style.fontSize="8pt",this.userElement.style.top="atlas"==uiTheme?"8px":"2px",this.userElement.style.right="30px",this.userElement.style.margin="4px",this.userElement.style.padding="2px",this.userElement.style.paddingRight="16px",this.userElement.style.verticalAlign="middle",this.userElement.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",this.userElement.style.backgroundPosition="100% 60%",this.userElement.style.backgroundRepeat="no-repeat",this.menubarContainer.appendChild(this.userElement),
mxEvent.addListener(this.userElement,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()})),mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(b){if(null==this.userPanel){var d=document.createElement("div");d.className="geDialog";d.style.position="absolute";d.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";d.style.zIndex=5;d.style.right="36px";d.style.padding="0px";d.style.cursor="default";d.style.minWidth="300px";
this.userPanel=d}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var c=!1;this.userPanel.innerHTML="";d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.className="geDialogClose";d.style.top="8px";d.style.right="8px";mxEvent.addListener(d,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(d);
-if(null!=this.drive){var e=this.drive.getUsersList();if(0<e.length){var k=mxUtils.bind(this,function(b,c){var d=this.getCurrentFile();null!=d&&d.constructor==DriveFile?(this.spinner.spin(document.body,c),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();b()}),2E3)):b()}),d=mxUtils.bind(this,function(b){var c=document.createElement("tr");c.setAttribute("title","User ID: "+b.id);var d=document.createElement("td");d.setAttribute("valig","middle");d.style.height=
+if(null!=this.drive){var e=this.drive.getUsersList();if(0<e.length){var g=mxUtils.bind(this,function(b,c){var d=this.getCurrentFile();null!=d&&d.constructor==DriveFile?(this.spinner.spin(document.body,c),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();b()}),2E3)):b()}),d=mxUtils.bind(this,function(b){var c=document.createElement("tr");c.setAttribute("title","User ID: "+b.id);var d=document.createElement("td");d.setAttribute("valig","middle");d.style.height=
"59px";d.style.width="66px";var f=document.createElement("img");f.setAttribute("width","50");f.setAttribute("height","50");f.setAttribute("border","0");f.setAttribute("src",null!=b.pictureUrl?b.pictureUrl:this.defaultUserPicture);f.style.borderRadius="50%";f.style.margin="4px 8px 0 8px";d.appendChild(f);c.appendChild(d);d=document.createElement("td");d.setAttribute("valign","middle");d.style.whiteSpace="nowrap";d.style.paddingTop="4px";d.style.maxWidth="0";d.style.overflow="hidden";d.style.textOverflow=
-"ellipsis";mxUtils.write(d,b.displayName+(b.isCurrent&&1<e.length?" ("+mxResources.get("default")+")":""));null!=b.email&&(mxUtils.br(d),f=document.createElement("small"),f.style.color="gray",mxUtils.write(f,b.email),d.appendChild(f));f=document.createElement("div");f.style.marginTop="4px";var g=document.createElement("i");mxUtils.write(g,mxResources.get("googleDrive"));f.appendChild(g);d.appendChild(f);c.appendChild(d);b.isCurrent||(c.style.cursor="pointer",c.style.opacity="0.3",mxEvent.addListener(c,
-"click",mxUtils.bind(this,function(c){k(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(b);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(c)})));return c}),c=!0,n=document.createElement("table");n.style.borderSpacing="0";n.style.fontSize="10pt";n.style.width="100%";n.style.padding="10px";for(var f=
-0;f<e.length;f++)n.appendChild(d(e[f]));this.userPanel.appendChild(n);d=document.createElement("div");d.style.textAlign="left";d.style.padding="10px";d.style.whiteSpace="nowrap";d.style.borderTop="1px solid rgb(224, 224, 224)";n=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){k(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),
-mxResources.get("signOut"))}))}));n.className="geBtn";n.style["float"]="right";d.appendChild(n);n=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var b=this.drive.createAuthWin();b.blur();window.focus();k(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(b){this.handleError(b)}),!0,b)}),mxResources.get("closingFile")+"...")}));
-n.className="geBtn";n.style.margin="0px";d.appendChild(n);this.userPanel.appendChild(d)}}d=mxUtils.bind(this,function(b,d,e,f){if(null!=b){c&&this.userPanel.appendChild(document.createElement("hr"));c=!0;var g=document.createElement("table");g.style.borderSpacing="0";g.style.fontSize="10pt";g.style.width="100%";g.style.padding="10px";var k=document.createElement("tbody"),l=document.createElement("tr"),n=document.createElement("td");n.setAttribute("valig","top");n.style.width="40px";if(null!=d){var m=
-document.createElement("img");m.setAttribute("width","40");m.setAttribute("height","40");m.setAttribute("border","0");m.setAttribute("src",d);m.style.marginRight="6px";n.appendChild(m)}l.appendChild(n);n=document.createElement("td");n.setAttribute("valign","middle");n.style.whiteSpace="nowrap";n.style.maxWidth="0";n.style.overflow="hidden";n.style.textOverflow="ellipsis";mxUtils.write(n,b.displayName);null!=b.email&&(mxUtils.br(n),d=document.createElement("small"),d.style.color="gray",mxUtils.write(d,
-b.email),n.appendChild(d));null!=f&&(b=document.createElement("div"),b.style.marginTop="4px",d=document.createElement("i"),mxUtils.write(d,f),b.appendChild(d),n.appendChild(b));l.appendChild(n);k.appendChild(l);g.appendChild(k);this.userPanel.appendChild(g);b=document.createElement("div");b.style.textAlign="center";b.style.padding="10px";b.style.whiteSpace="nowrap";null!=e&&(e=mxUtils.button(mxResources.get("signOut"),e),e.className="geBtn",b.appendChild(e));this.userPanel.appendChild(b)}});null!=
+"ellipsis";mxUtils.write(d,b.displayName+(b.isCurrent&&1<e.length?" ("+mxResources.get("default")+")":""));null!=b.email&&(mxUtils.br(d),f=document.createElement("small"),f.style.color="gray",mxUtils.write(f,b.email),d.appendChild(f));f=document.createElement("div");f.style.marginTop="4px";var k=document.createElement("i");mxUtils.write(k,mxResources.get("googleDrive"));f.appendChild(k);d.appendChild(f);c.appendChild(d);b.isCurrent||(c.style.cursor="pointer",c.style.opacity="0.3",mxEvent.addListener(c,
+"click",mxUtils.bind(this,function(c){g(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(b);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(c)})));return c}),c=!0,m=document.createElement("table");m.style.borderSpacing="0";m.style.fontSize="10pt";m.style.width="100%";m.style.padding="10px";for(var f=
+0;f<e.length;f++)m.appendChild(d(e[f]));this.userPanel.appendChild(m);d=document.createElement("div");d.style.textAlign="left";d.style.padding="10px";d.style.whiteSpace="nowrap";d.style.borderTop="1px solid rgb(224, 224, 224)";m=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){g(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),
+mxResources.get("signOut"))}))}));m.className="geBtn";m.style["float"]="right";d.appendChild(m);m=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var b=this.drive.createAuthWin();b.blur();window.focus();g(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(b){this.handleError(b)}),!0,b)}),mxResources.get("closingFile")+"...")}));
+m.className="geBtn";m.style.margin="0px";d.appendChild(m);this.userPanel.appendChild(d)}}d=mxUtils.bind(this,function(b,d,e,f){if(null!=b){c&&this.userPanel.appendChild(document.createElement("hr"));c=!0;var g=document.createElement("table");g.style.borderSpacing="0";g.style.fontSize="10pt";g.style.width="100%";g.style.padding="10px";var k=document.createElement("tbody"),l=document.createElement("tr"),m=document.createElement("td");m.setAttribute("valig","top");m.style.width="40px";if(null!=d){var n=
+document.createElement("img");n.setAttribute("width","40");n.setAttribute("height","40");n.setAttribute("border","0");n.setAttribute("src",d);n.style.marginRight="6px";m.appendChild(n)}l.appendChild(m);m=document.createElement("td");m.setAttribute("valign","middle");m.style.whiteSpace="nowrap";m.style.maxWidth="0";m.style.overflow="hidden";m.style.textOverflow="ellipsis";mxUtils.write(m,b.displayName);null!=b.email&&(mxUtils.br(m),d=document.createElement("small"),d.style.color="gray",mxUtils.write(d,
+b.email),m.appendChild(d));null!=f&&(b=document.createElement("div"),b.style.marginTop="4px",d=document.createElement("i"),mxUtils.write(d,f),b.appendChild(d),m.appendChild(b));l.appendChild(m);k.appendChild(l);g.appendChild(k);this.userPanel.appendChild(g);b=document.createElement("div");b.style.textAlign="center";b.style.padding="10px";b.style.whiteSpace="nowrap";null!=e&&(e=mxUtils.button(mxResources.get("signOut"),e),e.className="geBtn",b.appendChild(e));this.userPanel.appendChild(b)}});null!=
this.dropbox&&d(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.constructor==DropboxFile){var c=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&d(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",
this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.constructor==OneDriveFile){var c=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&d(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var b=
this.getCurrentFile();if(null!=b&&b.constructor==GitHubFile){var c=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&d(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.constructor==GitLabFile){var c=
mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.notion&&d(this.notion.getUser(),IMAGE_PATH+"/notion-logo.svg",mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.constructor==NotionFile){var c=mxUtils.bind(this,function(){this.notion.logout();window.location.hash=
""});b.isModified()?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.notion.logout()}),mxResources.get("notion"));null!=this.trello&&d(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var b=this.getCurrentFile();if(null!=b&&b.constructor==TrelloFile){var c=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});b.isModified()?this.confirm(mxResources.get("allChangesLost"),
null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c()}else this.trello.logout()}),mxResources.get("trello"));c||(d=document.createElement("div"),d.style.textAlign="center",d.style.padding="10px",d.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(d));d=document.createElement("div");d.style.textAlign="center";d.style.padding="10px";d.style.background=Editor.isDarkMode()?"":"whiteSmoke";d.style.borderTop="1px solid #e0e0e0";d.style.whiteSpace="nowrap";"1"==urlParams.sketch?
-(n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.actions.get("share").funct()})),n.className="geBtn",d.appendChild(n),this.userPanel.appendChild(d),this.commentsSupported()&&(n=mxUtils.button(mxResources.get("comments"),mxUtils.bind(this,function(){this.actions.get("comments").funct()})),n.className="geBtn",d.appendChild(n),this.userPanel.appendChild(d))):(n=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){mxEvent.isConsumed(b)||null==this.userPanel||
-null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})),n.className="geBtn",d.appendChild(n),this.userPanel.appendChild(d));document.body.appendChild(this.userPanel)}mxEvent.consume(b)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(b){mxEvent.isConsumed(b)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():
+(m=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.actions.get("share").funct()})),m.className="geBtn",d.appendChild(m),this.userPanel.appendChild(d),this.commentsSupported()&&(m=mxUtils.button(mxResources.get("comments"),mxUtils.bind(this,function(){this.actions.get("comments").funct()})),m.className="geBtn",d.appendChild(m),this.userPanel.appendChild(d))):(m=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){mxEvent.isConsumed(b)||null==this.userPanel||
+null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})),m.className="geBtn",d.appendChild(m),this.userPanel.appendChild(d));document.body.appendChild(this.userPanel)}mxEvent.consume(b)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(b){mxEvent.isConsumed(b)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():
null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()?b=this.gitLab.getUser():null!=this.notion&&null!=this.notion.getUser()&&(b=this.notion.getUser());null!=b?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display=
"block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){b.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(b){var c=document.createElement("span");c.setAttribute("title",mxResources.get("help"));c.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var d=document.createElement("img");mxUtils.setOpacity(d,50);d.style.height="16px";d.style.width="16px";d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);c.appendChild(d);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){this.editorUi.hideCurrentMenu();this.editorUi.openLink(b);mxEvent.consume(c)}));return c};Menus.prototype.addLinkToItem=function(b,c){null!=b&&b.firstChild.nextSibling.appendChild(this.createHelpLink(c))};var e=Menus.prototype.init;
-Menus.prototype.init=function(){function b(b,c,d){this.ui=b;this.previousExtFonts=this.extFonts=c;this.prevCustomFonts=this.customFonts=d}e.apply(this,arguments);var c=this.editorUi,g=c.editor.graph,k=mxUtils.bind(g,g.isEnabled),n=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),f=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
-(null==document.documentMode||9<document.documentMode),l=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),m="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
+Menus.prototype.init=function(){function b(b,c,d){this.ui=b;this.previousExtFonts=this.extFonts=c;this.prevCustomFonts=this.customFonts=d}e.apply(this,arguments);var c=this.editorUi,k=c.editor.graph,g=mxUtils.bind(k,k.isEnabled),m=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),f=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+(null==document.documentMode||9<document.documentMode),l=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),n="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(b){return"file"!=b}));c.actions.addAction("new...",function(){var b=c.isOffline();if(b||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var d=new NewDialog(c,b,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(d.container,b?350:620,b?70:460,!0,!0,function(b){c.sidebar.hideTooltip();b&&null==c.getCurrentFile()&&c.showSplash()});
d.init()}else{var e=function(b){return{id:b.id,isExt:!0,url:b.downloadUrl,title:b.title,imgUrl:b.thumbnailLink,changedBy:b.lastModifyingUserName,lastModifiedOn:b.modifiedDate}},b=new TemplatesDialog(c,function(b,d,e){var f=e.libs,g=e.clibs;c.pickFolder(c.mode,function(e){c.createFile(d,b,null!=f&&0<f.length?f:null,null,function(){c.hideDialog()},null,e,null,null!=g&&0<g.length?g:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(b,d,f){var g=new Date;g.setDate(g.getDate()-
-7);c.drive.listFiles(null,g,f?!0:!1,function(c){for(var d=[],f=0;f<c.items.length;f++)d.push(e(c.items[f]));b(d)},d)},function(b,d,f,g){c.drive.listFiles(b,null,g?!0:!1,function(b){for(var c=[],f=0;f<b.items.length;f++)c.push(e(b.items[f]));d(c)},f)},function(b,d,e){c.drive.getFile(b.id,function(b){d(b.data)},e)},null,null,!1,!1);c.showDialog(b.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(g.isEnabled()&&
-!g.isCellLocked(g.getDefaultParent())){var b=new NewDialog(c,null,!1,function(b){c.hideDialog();if(null!=b){var d=c.editor.graph.getFreeInsertPoint();g.setSelectionCells(c.importXml(b,Math.max(d.x,20),Math.max(d.y,20),!0,null,null,!0));g.scrollCellToVisible(g.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(b.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});b.init()}})).isEnabled=k;var p=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});
+7);c.drive.listFiles(null,g,f?!0:!1,function(c){for(var d=[],f=0;f<c.items.length;f++)d.push(e(c.items[f]));b(d)},d)},function(b,d,f,g){c.drive.listFiles(b,null,g?!0:!1,function(b){for(var c=[],f=0;f<b.items.length;f++)c.push(e(b.items[f]));d(c)},f)},function(b,d,e){c.drive.getFile(b.id,function(b){d(b.data)},e)},null,null,!1,!1);c.showDialog(b.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(k.isEnabled()&&
+!k.isCellLocked(k.getDefaultParent())){var b=new NewDialog(c,null,!1,function(b){c.hideDialog();if(null!=b){var d=c.editor.graph.getFreeInsertPoint();k.setSelectionCells(c.importXml(b,Math.max(d.x,20),Math.max(d.y,20),!0,null,null,!0));k.scrollCellToVisible(k.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(b.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});b.init()}})).isEnabled=g;var p=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});
p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.POINTS});p=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});p=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});
this.put("units",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,["points","millimeters"],c)})));p=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):c.ruler=new mxDualRuler(c,c.editor.graph.view.unit);c.refresh()});p.setEnabled(c.canvasSupported&&9!=document.documentMode);p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=c.ruler});p=c.actions.addAction("fullscreen",function(){null==
-document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});p.visible=document.fullscreenEnabled&&null!=document.body.requestFullscreen;p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=document.fullscreenElement});c.actions.addAction("properties...",function(){var b=new FilePropertiesDialog(c);c.showDialog(b.container,320,120,!0,!0);b.init()}).isEnabled=k;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",
-function(b){g.isEnabled()&&(null==this.freehandWindow&&(this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,84)),g.freehand.isDrawing()?g.freehand.stopDrawing():g.freehand.startDrawing(),this.freehandWindow.window.setVisible(g.freehand.isDrawing()))})).isEnabled=function(){return k()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var d=null==c.pages||1>=
-c.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=c.addCheckbox(b,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),k=c.addCheckbox(b,mxResources.get("compressed"),!0),l=c.addCheckbox(b,mxResources.get("allPages"),!d,d);l.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?l.setAttribute("disabled","disabled"):l.removeAttribute("disabled")});
-b=new CustomDialog(c,b,mxUtils.bind(this,function(){c.downloadFile("xml",!k.checked,null,!f.checked,d||!l.checked)}),null,mxResources.get("export"));c.showDialog(b.container,300,200,!0,!0)}));c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,d,e,f,g,k,l,n,m){l=[];m&&l.push("tags=%7B%7D");b=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,null,!0,l));c.showDialog(b.container,440,240,!0,!0);b.init()})}));c.actions.put("exportHtml",
-new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,b,function(b,d,e,f,g,k,l,n,m,p,y){c.createHtml(b,d,e,f,g,k,l,n,m,p,y,mxUtils.bind(this,function(b,d){var e=c.getBaseFilename(l),f='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(e)+
+document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});p.visible=document.fullscreenEnabled&&null!=document.body.requestFullscreen;p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=document.fullscreenElement});c.actions.addAction("properties...",function(){var b=new FilePropertiesDialog(c);c.showDialog(b.container,320,120,!0,!0);b.init()}).isEnabled=g;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",
+function(b){k.isEnabled()&&(null==this.freehandWindow&&(this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,84)),k.freehand.isDrawing()?k.freehand.stopDrawing():k.freehand.startDrawing(),this.freehandWindow.window.setVisible(k.freehand.isDrawing()))})).isEnabled=function(){return g()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var d=null==c.pages||1>=
+c.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=c.addCheckbox(b,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),g=c.addCheckbox(b,mxResources.get("compressed"),!0),l=c.addCheckbox(b,mxResources.get("allPages"),!d,d);l.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?l.setAttribute("disabled","disabled"):l.removeAttribute("disabled")});
+b=new CustomDialog(c,b,mxUtils.bind(this,function(){c.downloadFile("xml",!g.checked,null,!f.checked,d||!l.checked)}),null,mxResources.get("export"));c.showDialog(b.container,300,200,!0,!0)}));c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(b,d,e,f,g,k,l,m,n){l=[];n&&l.push("tags=%7B%7D");b=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,null,!0,l));c.showDialog(b.container,440,240,!0,!0);b.init()})}));c.actions.put("exportHtml",
+new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,b,function(b,d,e,f,g,k,l,m,n,p,y){c.createHtml(b,d,e,f,g,k,l,m,n,p,y,mxUtils.bind(this,function(b,d){var e=c.getBaseFilename(l),f='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(e)+
'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+d+"\n</body>\n</html>";c.saveData(e+(".drawio"==e.substring(e.lenth-7)?"":".drawio")+".html","html",f,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var b=null==c.pages||1>=c.pages.length,d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatPdf"));
-e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=function(){m!=this&&this.checked?(x.removeAttribute("disabled"),x.checked=!g.pageVisible):(x.setAttribute("disabled","disabled"),x.checked=!1)},e=200,k=1,l=null;if(c.pdfPageExport&&!b){var n=function(){u.value=Math.max(1,Math.min(k,Math.max(parseInt(u.value),parseInt(q.value))));q.value=Math.max(1,Math.min(k,Math.min(parseInt(u.value),parseInt(q.value))))},m=c.addRadiobox(d,"pages",mxResources.get("allPages"),
+e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=function(){n!=this&&this.checked?(x.removeAttribute("disabled"),x.checked=!k.pageVisible):(x.setAttribute("disabled","disabled"),x.checked=!1)},e=200,g=1,l=null;if(c.pdfPageExport&&!b){var m=function(){u.value=Math.max(1,Math.min(g,Math.max(parseInt(u.value),parseInt(q.value))));q.value=Math.max(1,Math.min(g,Math.min(parseInt(u.value),parseInt(q.value))))},n=c.addRadiobox(d,"pages",mxResources.get("allPages"),
!0),p=c.addRadiobox(d,"pages",mxResources.get("pages")+":",!1,null,!0),q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.style.width="50px";d.appendChild(q);var t=document.createElement("span");mxUtils.write(t,mxResources.get("to"));d.appendChild(t);var u=q.cloneNode(!0);d.appendChild(u);mxEvent.addListener(q,"focus",function(){p.checked=!0});mxEvent.addListener(u,"focus",function(){p.checked=
-!0});mxEvent.addListener(q,"change",n);mxEvent.addListener(u,"change",n);if(null!=c.pages&&(k=c.pages.length,null!=c.currentPage))for(n=0;n<c.pages.length;n++)if(c.currentPage==c.pages[n]){l=n+1;q.value=l;u.value=l;break}q.setAttribute("max",k);u.setAttribute("max",k);mxUtils.br(d);var v=c.addRadiobox(d,"pages",mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),x=c.addCheckbox(d,mxResources.get("crop"),!1,!0),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1);mxEvent.addListener(m,"change",f);
-mxEvent.addListener(p,"change",f);mxEvent.addListener(v,"change",f);e+=64}else v=c.addCheckbox(d,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),x=c.addCheckbox(d,mxResources.get("crop"),!g.pageVisible||!c.pdfPageExport,!c.pdfPageExport),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(v,"change",f);var f=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName(),A=null,R=null;if(EditorUi.isElectronApp||f)R=c.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram),e+=30;f&&(A=c.addCheckbox(d,mxResources.get("transparentBackground"),!1),e+=30);d=new CustomDialog(c,d,mxUtils.bind(this,function(){var d=null;if(!b)var d=parseInt(q.value),e=parseInt(u.value),d=m.checked||d==l&&e==l?null:{from:Math.max(0,Math.min(k-1,d-1)),to:Math.max(0,Math.min(k-1,e-1))};c.downloadFile("pdf",null,null,!v.checked,b?!0:!m.checked&&null==d,!x.checked,null!=A&&A.checked,null,null,z.checked,null!=R&&R.checked,d)}),null,mxResources.get("export"));c.showDialog(d.container,
+!0});mxEvent.addListener(q,"change",m);mxEvent.addListener(u,"change",m);if(null!=c.pages&&(g=c.pages.length,null!=c.currentPage))for(m=0;m<c.pages.length;m++)if(c.currentPage==c.pages[m]){l=m+1;q.value=l;u.value=l;break}q.setAttribute("max",g);u.setAttribute("max",g);mxUtils.br(d);var v=c.addRadiobox(d,"pages",mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),x=c.addCheckbox(d,mxResources.get("crop"),!1,!0),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1);mxEvent.addListener(n,"change",f);
+mxEvent.addListener(p,"change",f);mxEvent.addListener(v,"change",f);e+=64}else v=c.addCheckbox(d,mxResources.get("selectionOnly"),!1,k.isSelectionEmpty()),x=c.addCheckbox(d,mxResources.get("crop"),!k.pageVisible||!c.pdfPageExport,!c.pdfPageExport),z=c.addCheckbox(d,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(v,"change",f);var f=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName(),A=null,R=null;if(EditorUi.isElectronApp||f)R=c.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
+Editor.defaultIncludeDiagram),e+=30;f&&(A=c.addCheckbox(d,mxResources.get("transparentBackground"),!1),e+=30);d=new CustomDialog(c,d,mxUtils.bind(this,function(){var d=null;if(!b)var d=parseInt(q.value),e=parseInt(u.value),d=n.checked||d==l&&e==l?null:{from:Math.max(0,Math.min(g-1,d-1)),to:Math.max(0,Math.min(g-1,e-1))};c.downloadFile("pdf",null,null,!v.checked,b?!0:!n.checked&&null==d,!x.checked,null!=A&&A.checked,null,null,z.checked,null!=R&&R.checked,d)}),null,mxResources.get("export"));c.showDialog(d.container,
300,e,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?450:370,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function b(){null!=d&&d.removeDraft();c.fileLoaded(null)}var d=c.getCurrentFile();null!=d&&d.isModified()?c.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):
-b()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){g.getSelectionCells();if(1==g.getSelectionCount()){var b=g.getSelectionCell(),d=g.view.getState(b);null!=d&&null!=d.shape&&null!=d.shape.stencil&&(b=new EditShapeDialog(c,b,mxResources.get("editShape")+":",630,400),c.showDialog(b.container,640,480,!0,!1),b.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,
+b()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){k.getSelectionCells();if(1==k.getSelectionCount()){var b=k.getSelectionCell(),d=k.view.getState(b);null!=d&&null!=d.shape&&null!=d.shape.stencil&&(b=new EditShapeDialog(c,b,mxResources.get("editShape")+":",630,400),c.showDialog(b.container,640,480,!0,!1),b.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,
function(b,d){c.spinner.stop();var e=new RevisionDialog(c,b,d);c.showDialog(e.container,640,480,!0,!0);e.init()}),mxUtils.bind(this,function(b){c.handleError(b)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");p=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&
(p.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var b=c.getCurrentFile();null!=b&&(window.drawdata=c.getFileData(),b=null!=b.getTitle()?b.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b),null,!0))});"undefined"!==typeof MathJax&&(p=c.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(c);b.ignoreColor=
-!0;b.ignoreImage=!0;b.mathEnabled=!c.isMathEnabled();g.model.execute(b)}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isMathEnabled()}),p.isEnabled=k);isLocalStorage&&(p=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var q=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});
-q.setToggleAction(!0);q.setSelectedCallback(function(){return q.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var b=g.getSelectionCells(),d=[],e=0;e<b.length;e++)g.getModel().isVertex(b[e])&&d.push(b[e]);0<d.length&&(b=new EditGeometryDialog(c,d),c.showDialog(b.container,200,270,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var t=null;c.actions.addAction("copyStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&(t=g.copyStyle(g.getSelectionCell()))},
-null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&null!=t&&g.pasteStyle(t,g.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var b=new BackgroundImageDialog(c,function(b){c.setBackgroundImage(b)});c.showDialog(b.container,320,170,!0,!0);b.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+
-"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(b,d,e,f,g,k,l,n,m,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportSvg(b/100,d,e,f,g,k,l,!n,!1,p,t,u)}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
-mxUtils.bind(this,function(b,d,e,f,g,k,l,n,m,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportImage(b/100,d,e,f,g,l,!n,!1,null,q,null,t,u)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,d,e,f,g){c.downloadFile(d?"xmlpng":"png",null,null,b,null,null,e,f,g)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?
-c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(b,d,e,f,g,k,l,n,m,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportImage(b/100,!1,e,f,!1,l,!n,!1,"jpeg",q,null,t,u)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,d,e,f,g){c.downloadFile("jpeg",null,null,b,null,null,null,f,g)}),!0,!0)}));p=c.actions.addAction("copyAsImage",
-mxUtils.bind(this,function(){var b=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),d=mxUtils.getXml(0==b.length?c.editor.getGraphXml():g.encodeCells(b));c.copyImage(b,d)}));p.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;p=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){g.setShadowVisible(!g.shadowVisible)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return g.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+
+!0;b.ignoreImage=!0;b.mathEnabled=!c.isMathEnabled();k.model.execute(b)}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isMathEnabled()}),p.isEnabled=g);isLocalStorage&&(p=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var q=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});
+q.setToggleAction(!0);q.setSelectedCallback(function(){return q.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var b=k.getSelectionCells(),d=[],e=0;e<b.length;e++)k.getModel().isVertex(b[e])&&d.push(b[e]);0<d.length&&(b=new EditGeometryDialog(c,d),c.showDialog(b.container,200,270,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var t=null;c.actions.addAction("copyStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&(t=k.copyStyle(k.getSelectionCell()))},
+null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){k.isEnabled()&&!k.isSelectionEmpty()&&null!=t&&k.pasteStyle(t,k.getSelectionCells())},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var b=new BackgroundImageDialog(c,function(b){c.setBackgroundImage(b)});c.showDialog(b.container,320,170,!0,!0);b.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+
+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(b,d,e,f,g,k,l,m,n,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportSvg(b/100,d,e,f,g,k,l,!m,!1,p,t,u)}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
+mxUtils.bind(this,function(b,d,e,f,g,k,l,m,n,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportImage(b/100,d,e,f,g,l,!m,!1,null,q,null,t,u)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,d,e,f,g){c.downloadFile(d?"xmlpng":"png",null,null,b,null,null,e,f,g)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?
+c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(b,d,e,f,g,k,l,m,n,p,q,t,u){b=parseInt(b);!isNaN(b)&&0<b&&c.exportImage(b/100,!1,e,f,!1,l,!m,!1,"jpeg",q,null,t,u)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,d,e,f,g){c.downloadFile("jpeg",null,null,b,null,null,null,f,g)}),!0,!0)}));p=c.actions.addAction("copyAsImage",
+mxUtils.bind(this,function(){var b=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),d=mxUtils.getXml(0==b.length?c.editor.getGraphXml():k.encodeCells(b));c.copyImage(b,d)}));p.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;p=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){k.setShadowVisible(!k.shadowVisible)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return k.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+
" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.diagrams.net/")}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},
mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var b=new FeedbackDialog(c);c.showDialog(b.container,610,360,!0,!1);b.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});
c.actions.addAction("forkme",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop"):c.openLink("https://github.com/jgraph/drawio")}).label="Fork me on GitHub...";c.actions.addAction("downloadDesktop...",function(){c.openLink("https://get.diagrams.net/")});p=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("tags"))}),
-this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));p=c.actions.addAction("findReplace...",mxUtils.bind(this,function(b,d){var e=g.isEnabled()&&(null==d||!mxEvent.isShiftDown(d)),
-f=e?"findReplace":"find",k=f+"Window";if(null==this[k]){var l=e?"min"==uiTheme?330:300:240;this[k]=new FindWindow(c,document.body.offsetWidth-(l+20),100,l,e?"min"==uiTheme?304:288:170,e);this[k].window.addListener("show",function(){c.fireEvent(new mxEventObject(f))});this[k].window.addListener("hide",function(){c.fireEvent(new mxEventObject(f))});this[k].window.setVisible(!0)}else this[k].window.setVisible(!this[k].window.isVisible())}),null,null,Editor.ctrlKey+"+F");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,
-function(){var b=g.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[b]&&this[b].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var b=null==c.pages||1>=c.pages.length;if(b)c.exportVisio();else{var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatVsdx"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);
+this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));p=c.actions.addAction("findReplace...",mxUtils.bind(this,function(b,d){var e=k.isEnabled()&&(null==d||!mxEvent.isShiftDown(d)),
+f=e?"findReplace":"find",g=f+"Window";if(null==this[g]){var l=e?"min"==uiTheme?330:300:240;this[g]=new FindWindow(c,document.body.offsetWidth-(l+20),100,l,e?"min"==uiTheme?304:288:170,e);this[g].window.addListener("show",function(){c.fireEvent(new mxEventObject(f))});this[g].window.addListener("hide",function(){c.fireEvent(new mxEventObject(f))});this[g].window.setVisible(!0)}else this[g].window.setVisible(!this[g].window.isVisible())}),null,null,Editor.ctrlKey+"+F");p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,
+function(){var b=k.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[b]&&this[b].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var b=null==c.pages||1>=c.pages.length;if(b)c.exportVisio();else{var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatVsdx"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);
var f=c.addCheckbox(d,mxResources.get("allPages"),!b,b);f.style.marginBottom="16px";b=new CustomDialog(c,d,mxUtils.bind(this,function(){c.exportVisio(!f.checked)}),null,mxResources.get("export"));c.showDialog(b.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var b=localStorage.getItem(Editor.configurationKey),d=[[mxResources.get("reset"),function(b,d){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),
-mxEvent.isShiftDown(b)&&(localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode")),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(E){c.handleError(E)}})}]];EditorUi.isElectronApp||d.push([mxResources.get("share"),function(b,d){if(0<d.value.length)try{var e=JSON.parse(d.value),f=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(e)),g=new EmbedDialog(c,f);c.showDialog(g.container,440,240,!0);g.init()}catch(J){c.handleError(J)}else c.handleError({message:mxResources.get("invalidInput")})}]);
-b=new TextareaDialog(c,mxResources.get("configuration")+":",null!=b?JSON.stringify(JSON.parse(b),null,2):"",function(b){if(null!=b)try{if(0<b.length){var d=JSON.parse(b);localStorage.setItem(Editor.configurationKey,JSON.stringify(d))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}catch(E){c.handleError(E)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",d);b.textarea.style.width=
+mxEvent.isShiftDown(b)&&(localStorage.removeItem(".drawio-config"),localStorage.removeItem(".mode")),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(G){c.handleError(G)}})}]];EditorUi.isElectronApp||d.push([mxResources.get("share"),function(b,d){if(0<d.value.length)try{var e=JSON.parse(d.value),f=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(e)),g=new EmbedDialog(c,f);c.showDialog(g.container,440,240,!0);g.init()}catch(J){c.handleError(J)}else c.handleError({message:mxResources.get("invalidInput")})}]);
+b=new TextareaDialog(c,mxResources.get("configuration")+":",null!=b?JSON.stringify(JSON.parse(b),null,2):"",function(b){if(null!=b)try{if(0<b.length){var d=JSON.parse(b);localStorage.setItem(Editor.configurationKey,JSON.stringify(d))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}catch(G){c.handleError(G)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",d);b.textarea.style.width=
"600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!1);b.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(b,d){var e=mxUtils.bind(this,function(e){var f=""==e?mxResources.get("automatic"):mxLanguageMap[e],g=null;""!=f&&(g=b.addItem(f,null,mxUtils.bind(this,function(){mxSettings.setLanguage(e);mxSettings.save();mxClient.language=e;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),
d),(e==mxLanguage||""==e&&null==mxLanguage)&&b.addCheckmark(g,Editor.checkmarkImage));return g});e("");b.addSeparator(d);for(var f in mxLanguageMap)e(f)})));var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(b){var c=u.apply(this,arguments);if(null!=c&&"1"!=urlParams.noLangIcon){var d=this.get("language");if(null!=d){d=c.addMenu("",d.funct);d.setAttribute("title",mxResources.get("language"));d.style.width="16px";d.style.paddingTop="2px";d.style.paddingLeft="4px";d.style.zIndex=
"1";d.style.position="absolute";d.style.display="block";d.style.cursor="pointer";d.style.right="17px";"atlas"==uiTheme?(d.style.top="6px",d.style.right="15px"):d.style.top="min"==uiTheme?"2px":"0px";var e=document.createElement("div");e.style.backgroundImage="url("+Editor.globeImage+")";e.style.backgroundPosition="center center";e.style.backgroundRepeat="no-repeat";e.style.backgroundSize="19px 19px";e.style.position="absolute";e.style.height="19px";e.style.width="19px";e.style.marginTop="2px";e.style.zIndex=
"1";d.appendChild(e);mxUtils.setOpacity(d,40);if("atlas"==uiTheme||"dark"==uiTheme)d.style.opacity="0.85",d.style.filter="invert(100%)";document.body.appendChild(d)}}return c}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){var b=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(b){if(0<b.length)try{var d=
JSON.parse(b);c.executeLayoutList(d);c.customLayoutConfig=d}catch(D){c.handleError(D),null!=window.console&&console.error(D)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!0);b.init()});var p=this.get("layout"),v=p.funct;p.funct=function(b,d){v.apply(this,arguments);b.addItem(mxResources.get("orgChart"),null,function(){function b(){"undefined"!==typeof mxOrgChartLayout||
c.loadingOrgChart||c.isOffline(!0)?k():c.spinner.spin(document.body,mxResources.get("loading"))&&(c.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",k)})})}):mxscript("js/extensions.min.js",k))}var d=null,e=20,f=20,g=!0,k=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&
-null!=d&&g){var b=c.editor.graph,k=new mxOrgChartLayout(b,d,e,f),l=b.getDefaultParent();1<b.model.getChildCount(b.getSelectionCell())&&(l=b.getSelectionCell());k.execute(l);g=!1}},l=document.createElement("div"),n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";n.style.width="140px";mxUtils.write(n,mxResources.get("orgChartType")+": ");l.appendChild(n);var m=document.createElement("select");m.style.width="200px";m.style.boxSizing="border-box";for(var n=[mxResources.get("linear"),
-mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],p=0;p<n.length;p++){var y=document.createElement("option");mxUtils.write(y,n[p]);y.value=p;2==p&&y.setAttribute("selected","selected");m.appendChild(y)}mxEvent.addListener(m,"change",function(){d=m.value});l.appendChild(m);n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";
-n.style.width="140px";mxUtils.write(n,mxResources.get("parentChildSpacing")+": ");l.appendChild(n);var q=document.createElement("input");q.type="number";q.value=e;q.style.width="200px";q.style.boxSizing="border-box";l.appendChild(q);mxEvent.addListener(q,"change",function(){e=q.value});n=document.createElement("div");n.style.marginTop="6px";n.style.display="inline-block";n.style.width="140px";mxUtils.write(n,mxResources.get("siblingSpacing")+": ");l.appendChild(n);var B=document.createElement("input");
-B.type="number";B.value=f;B.style.width="200px";B.style.boxSizing="border-box";l.appendChild(B);mxEvent.addListener(B,"change",function(){f=B.value});l=new CustomDialog(c,l,function(){null==d&&(d=2);b()});c.showDialog(l.container,355,140,!0,!0)},d,null,k());b.addSeparator(d);b.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var b=new mxParallelEdgeLayout(g);b.checkOverlap=!0;b.spacing=20;c.executeLayout(function(){b.execute(g.getDefaultParent(),g.isSelectionEmpty()?null:g.getSelectionCells())},
+null!=d&&g){var b=c.editor.graph,k=new mxOrgChartLayout(b,d,e,f),l=b.getDefaultParent();1<b.model.getChildCount(b.getSelectionCell())&&(l=b.getSelectionCell());k.execute(l);g=!1}},l=document.createElement("div"),m=document.createElement("div");m.style.marginTop="6px";m.style.display="inline-block";m.style.width="140px";mxUtils.write(m,mxResources.get("orgChartType")+": ");l.appendChild(m);var n=document.createElement("select");n.style.width="200px";n.style.boxSizing="border-box";for(var m=[mxResources.get("linear"),
+mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")],p=0;p<m.length;p++){var y=document.createElement("option");mxUtils.write(y,m[p]);y.value=p;2==p&&y.setAttribute("selected","selected");n.appendChild(y)}mxEvent.addListener(n,"change",function(){d=n.value});l.appendChild(n);m=document.createElement("div");m.style.marginTop="6px";m.style.display="inline-block";
+m.style.width="140px";mxUtils.write(m,mxResources.get("parentChildSpacing")+": ");l.appendChild(m);var q=document.createElement("input");q.type="number";q.value=e;q.style.width="200px";q.style.boxSizing="border-box";l.appendChild(q);mxEvent.addListener(q,"change",function(){e=q.value});m=document.createElement("div");m.style.marginTop="6px";m.style.display="inline-block";m.style.width="140px";mxUtils.write(m,mxResources.get("siblingSpacing")+": ");l.appendChild(m);var B=document.createElement("input");
+B.type="number";B.value=f;B.style.width="200px";B.style.boxSizing="border-box";l.appendChild(B);mxEvent.addListener(B,"change",function(){f=B.value});l=new CustomDialog(c,l,function(){null==d&&(d=2);b()});c.showDialog(l.container,355,140,!0,!0)},d,null,g());b.addSeparator(d);b.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var b=new mxParallelEdgeLayout(k);b.checkOverlap=!0;b.spacing=20;c.executeLayout(function(){b.execute(k.getDefaultParent(),k.isSelectionEmpty()?null:k.getSelectionCells())},
!1)}),d);b.addSeparator(d);c.menus.addMenuItem(b,"runLayout",d,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(b,d){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(b,["about"],d);else{var e=b.addItem("Search:",null,null,d,null,null,!1);e.style.backgroundColor=Editor.isDarkMode()?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft=
"8px";mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(b){var c=mxUtils.trim(f.value);13==b.keyCode&&0<c.length?(this.editorUi.openLink("https://www.diagrams.net/search?search="+encodeURIComponent(c)),f.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:c}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==b.keyCode&&(f.value="")}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(b){document.activeElement!=
f&&f.focus();mxEvent.consume(b)},function(b){mxEvent.consume(b)},function(b){mxEvent.consume(b)});window.setTimeout(function(){f.focus()},0);EditorUi.isElectronApp?(console.log("electron help menu"),this.addMenuItems(b,"- keyboardShortcuts quickStart support - forkme - about".split(" "),d)):this.addMenuItems(b,"- keyboardShortcuts quickStart support - forkme downloadDesktop - about".split(" "),d)}"1"==urlParams.test&&(b.addSeparator(d),this.addSubmenu("testDevelop",b,d))})));mxResources.parse("diagramLanguage=Diagram Language");
-c.actions.addAction("diagramLanguage...",function(){var b=prompt("Language Code",Graph.diagramLanguage||"");null!=b&&(Graph.diagramLanguage=0<b.length?b:null,g.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");
-mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testDownloadRtModel=Export RT model");mxResources.parse("testImportRtModel=Import RT model");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!g.isSelectionEmpty()){var b=g.cloneCells(g.getSelectionCells()),d=g.getBoundingBoxFromGeometry(b),b=g.moveCells(b,-d.x,-d.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+d.width+", "+d.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(g.encodeCells(b)))+
-"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var b=g.getGraphBounds(),c=g.view.translate,d=g.view.scale;g.insertVertex(g.getDefaultParent(),null,"",b.x/d-c.x,b.y/d-c.y,b.width/d,b.height/d,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var b=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"",b=new TextareaDialog(c,"Paste Data:",b,function(b){if(0<b.length)try{var d=
-function(b){function c(b){if(null==p[b]){if(p[b]=!0,null!=f[b]){for(;0<f[b].length;){var e=f[b].pop();c(e)}delete f[b]}}else mxLog.debug(d+": Visited: "+b)}var d=b.parentNode.id,e=b.childNodes;b={};for(var f={},g=null,k={},l=0;l<e.length;l++){var n=e[l];if(null!=n.id&&0<n.id.length)if(null==b[n.id]){b[n.id]=n.id;var m=n.getAttribute("parent");null==m?null!=g?mxLog.debug(d+": Multiple roots: "+n.id):g=n.id:(null==f[m]&&(f[m]=[]),f[m].push(n.id))}else k[n.id]=n.id}0<Object.keys(k).length?(e=d+": "+
+c.actions.addAction("diagramLanguage...",function(){var b=prompt("Language Code",Graph.diagramLanguage||"");null!=b&&(Graph.diagramLanguage=0<b.length?b:null,k.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");
+mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testDownloadRtModel=Export RT model");mxResources.parse("testImportRtModel=Import RT model");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!k.isSelectionEmpty()){var b=k.cloneCells(k.getSelectionCells()),d=k.getBoundingBoxFromGeometry(b),b=k.moveCells(b,-d.x,-d.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+d.width+", "+d.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(k.encodeCells(b)))+
+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var b=k.getGraphBounds(),c=k.view.translate,d=k.view.scale;k.insertVertex(k.getDefaultParent(),null,"",b.x/d-c.x,b.y/d-c.y,b.width/d,b.height/d,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var b=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"",b=new TextareaDialog(c,"Paste Data:",b,function(b){if(0<b.length)try{var d=
+function(b){function c(b){if(null==p[b]){if(p[b]=!0,null!=f[b]){for(;0<f[b].length;){var e=f[b].pop();c(e)}delete f[b]}}else mxLog.debug(d+": Visited: "+b)}var d=b.parentNode.id,e=b.childNodes;b={};for(var f={},g=null,k={},l=0;l<e.length;l++){var m=e[l];if(null!=m.id&&0<m.id.length)if(null==b[m.id]){b[m.id]=m.id;var n=m.getAttribute("parent");null==n?null!=g?mxLog.debug(d+": Multiple roots: "+m.id):g=m.id:(null==f[n]&&(f[n]=[]),f[n].push(m.id))}else k[m.id]=m.id}0<Object.keys(k).length?(e=d+": "+
Object.keys(k).length+" Duplicates: "+Object.keys(k).join(", "),mxLog.debug(e+" (see console)")):mxLog.debug(d+": Checked");var p={};null==g?mxLog.debug(d+": No root"):(c(g),Object.keys(p).length!=Object.keys(b).length&&(mxLog.debug(d+": Invalid tree: (see console)"),console.log(d+": Invalid tree",f)))};"<"!=b.charAt(0)&&(b=Graph.decompress(b),mxLog.debug("See console for uncompressed XML"),console.log("xml",b));var e=mxUtils.parseXml(b),f=c.getPagesForNode(e.documentElement,"mxGraphModel");if(null!=
f&&0<f.length)try{var g=c.getHashValueForPages(f);mxLog.debug("Checksum: ",g)}catch(J){mxLog.debug("Error: ",J.message)}else mxLog.debug("No pages found for checksum");var k=e.getElementsByTagName("root");for(b=0;b<k.length;b++)d(k[b]);mxLog.show()}catch(J){c.handleError(J),null!=window.console&&console.error(J)}});b.textarea.style.width="600px";b.textarea.style.height="380px";c.showDialog(b.container,620,460,!0,!0);b.init()}));var x=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=
-c.pages){var b=new TextareaDialog(c,"Diff/Sync:","",function(b){var d=c.getCurrentFile();if(0<b.length&&null!=d)try{var e=JSON.parse(b);d.patch([e],null,!0);c.hideDialog()}catch(E){c.handleError(E)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(d,e){x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement);b.textarea.value="Snapshot updated "+(new Date).toLocaleString()}],["Diff",function(d,e){try{b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,
-2)}catch(D){c.handleError(D)}}]]);b.textarea.style.width="600px";b.textarea.style.height="380px";null==x?(x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement),b.textarea.value="Snapshot created "+(new Date).toLocaleString()):b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,2);c.showDialog(b.container,620,460,!0,!0);b.init()}else c.alert("No pages")}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,g.getModel())}));c.actions.addAction("testXmlImageExport",
-mxUtils.bind(this,function(){var b=new mxImageExport,c=g.getGraphBounds(),d=g.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-c.x)/d),Math.floor((1-c.y)/d));e.scale(1/d);var k=0,l=e.save;e.save=function(){k++;l.apply(this,arguments)};var n=e.restore;e.restore=function(){k--;n.apply(this,arguments)};var m=b.drawShape;b.drawShape=function(b){mxLog.debug("entering shape",b,k);m.apply(this,arguments);mxLog.debug("leaving shape",
-b,k)};b.drawState(g.getView().getState(g.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",k)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),
-c)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(b){g.isEnabled()&&(b=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),b.vertex=!0,b=new EditShapeDialog(c,
-b,mxResources.get("editShape")+":",630,400),c.showDialog(b.container,640,480,!0,!1),b.init())})).isEnabled=k;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",b,function(b,d,e,f,g,k,l,n,m,p,y){c.createHtml(b,d,e,f,g,k,l,n,m,p,y,mxUtils.bind(this,function(b,
+c.pages){var b=new TextareaDialog(c,"Diff/Sync:","",function(b){var d=c.getCurrentFile();if(0<b.length&&null!=d)try{var e=JSON.parse(b);d.patch([e],null,!0);c.hideDialog()}catch(G){c.handleError(G)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(d,e){x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement);b.textarea.value="Snapshot updated "+(new Date).toLocaleString()}],["Diff",function(d,e){try{b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,
+2)}catch(D){c.handleError(D)}}]]);b.textarea.style.width="600px";b.textarea.style.height="380px";null==x?(x=c.getPagesForNode(mxUtils.parseXml(c.getFileData(!0)).documentElement),b.textarea.value="Snapshot created "+(new Date).toLocaleString()):b.textarea.value=JSON.stringify(c.diffPages(x,c.pages),null,2);c.showDialog(b.container,620,460,!0,!0);b.init()}else c.alert("No pages")}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,k.getModel())}));c.actions.addAction("testXmlImageExport",
+mxUtils.bind(this,function(){var b=new mxImageExport,c=k.getGraphBounds(),d=k.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-c.x)/d),Math.floor((1-c.y)/d));e.scale(1/d);var g=0,l=e.save;e.save=function(){g++;l.apply(this,arguments)};var m=e.restore;e.restore=function(){g--;m.apply(this,arguments)};var n=b.drawShape;b.drawShape=function(b){mxLog.debug("entering shape",b,g);n.apply(this,arguments);mxLog.debug("leaving shape",
+b,g)};b.drawState(k.getView().getState(k.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"createSidebarEntry showBoundingBox - testCheckFile testDiff - testInspect - testXmlImageExport - testShowConsole".split(" "),
+c)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(b){k.isEnabled()&&(b=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),b.vertex=!0,b=new EditShapeDialog(c,
+b,mxResources.get("editShape")+":",630,400),c.showDialog(b.container,640,480,!0,!1),b.init())})).isEnabled=g;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",b,function(b,d,e,f,g,k,l,m,n,p,y){c.createHtml(b,d,e,f,g,k,l,m,n,p,y,mxUtils.bind(this,function(b,
d){var e=new EmbedDialog(c,b+"\n"+d,null,null,function(){var e=window.open(),f=e.document;if(null!=f){"CSS1Compat"===document.compatMode&&f.writeln("<!DOCTYPE html>");f.writeln("<html>");f.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');f.writeln("<body>");f.writeln(b);var g=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;g&&f.writeln(d);f.writeln("</body>");f.writeln("</html>");f.close();if(!g){var k=e.document.createElement("div");
k.marginLeft="26px";k.marginTop="26px";mxUtils.write(k,mxResources.get("updatingDocument"));g=e.document.createElement("img");g.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");g.style.marginLeft="6px";k.appendChild(g);e.document.body.insertBefore(k,e.document.body.firstChild);window.setTimeout(function(){var b=document.createElement("script");b.type="text/javascript";b.src=/<script.*?src="(.*?)"/.exec(d)[1];f.body.appendChild(b);k.parentNode.removeChild(k)},
20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(e.container,440,240,!0,!0);e.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var b=c.getCurrentFile();null!=b&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(d){c.spinner.stop();null!=d?(d=new EmbedDialog(c,'<img src="'+(b.constructor!=DriveFile?d:"https://drive.google.com/uc?id="+b.getId())+'"/>'),c.showDialog(d.container,
440,240,!0,!0),d.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(b,d,e,f,g,k){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(b,d,e,f,g,k,function(b){c.spinner.stop();b=new EmbedDialog(c,b);c.showDialog(b.container,440,240,!0,!0);b.init()},function(b){c.spinner.stop();c.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),
c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(b,d,e,f,g,k){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(b,d,e,f,g,k,function(b){c.spinner.stop();b=new EmbedDialog(c,b);c.showDialog(b.container,440,240,!0,!0);b.init()},function(b){c.spinner.stop();c.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
-c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=g.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(b.height/g.view.scale)+2,function(b,d,e,f,g,k,l,n,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(p){c.spinner.stop();var y=[];m&&y.push("tags=%7B%7D");p=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+l+";height:"+n+';" src="'+c.createLink(b,d,e,f,g,k,p,null,
-y)+'"></iframe>');c.showDialog(p.container,440,240,!0,!0);p.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(b,d,e,f,g,k,l,n,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();var n=["border=0"];m&&n.push("tags=%7B%7D");l=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,l,null,n,!0));c.showDialog(l.container,
-440,240,!0,!0);l.init()})},!0)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(b,d,e,f,g,k,l,n,m){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();var n=[];m&&n.push("tags=%7B%7D");l=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,l,null,n));c.showDialog(l.container,440,240,!0,!0);l.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});
+c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=k.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(b.height/k.view.scale)+2,function(b,d,e,f,g,k,l,m,n){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(p){c.spinner.stop();var y=[];n&&y.push("tags=%7B%7D");p=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+l+";height:"+m+';" src="'+c.createLink(b,d,e,f,g,k,p,null,
+y)+'"></iframe>');c.showDialog(p.container,440,240,!0,!0);p.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(b,d,e,f,g,k,l,m,n){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();var m=["border=0"];n&&m.push("tags=%7B%7D");l=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,l,null,m,!0));c.showDialog(l.container,
+440,240,!0,!0);l.init()})},!0)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(b,d,e,f,g,k,l,m,n){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();var m=[];n&&m.push("tags=%7B%7D");l=new EmbedDialog(c,c.createLink(b,d,e,f,g,k,l,null,m));c.showDialog(l.container,440,240,!0,!0);l.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});
c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(b){c.spinner.stop();b=new GoogleSitesDialog(c,b);c.showDialog(b.container,420,
256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)p=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,360,170,!0,!1)});p=c.actions.addAction("search",function(){var b=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=
-!b,mxSettings.save())});p.label=mxResources.get("searchShapes");p.setToggleAction(!0);p.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(c.actions.get("save").funct=function(b){g.isEditing()&&g.stopEditing();var d="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var e=c.createLoadMessage("save");e.xml=d;b&&(e.exit=!0);d=JSON.stringify(e)}(window.opener||window.parent).postMessage(d,
+!b,mxSettings.save())});p.label=mxResources.get("searchShapes");p.setToggleAction(!0);p.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(c.actions.get("save").funct=function(b){k.isEditing()&&k.stopEditing();var d="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var e=c.createLoadMessage("save");e.xml=d;b&&(e.exit=!0);d=JSON.stringify(e)}(window.opener||window.parent).postMessage(d,
"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));b=c.getCurrentFile();null==b||b.constructor==EmbedFile||b.constructor==LocalFile&&null==b.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){var b=function(){c.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",
modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,d){c.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],d),c.jpgSupported&&this.addMenuItems(b,["exportJpg"],d)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],d);this.addMenuItems(b,
["exportSvg","-"],d);c.isOffline()||c.printPdfExport?this.addMenuItems(b,["exportPdf"],d):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],d);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(b,["exportVsdx"],d);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],d);c.isOffline()||(b.addSeparator(d),this.addMenuItem(b,"export",d).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",
-new Menu(mxUtils.bind(this,function(b,d){function e(b){b.pickFile(function(d){c.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(d,function(b){var d="data:image/"==b.getData().substring(0,11)?p(b.getTitle()):"text/xml";/\.svg$/i.test(b.getTitle())&&!c.editor.isDataSvg(b.getData())&&(b.setData(Editor.createSvgDataUri(b.getData())),d="image/svg+xml");k(b.getData(),d,b.getTitle())},function(b){c.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==c.drive)},!0)}var k=
-mxUtils.bind(this,function(b,d,e){var f=g.view,k=g.getGraphBounds(),l=g.snap(Math.ceil(Math.max(0,k.x/f.scale-f.translate.x)+4*g.gridSize)),n=g.snap(Math.ceil(Math.max(0,(k.y+k.height)/f.scale-f.translate.y)+4*g.gridSize));"data:image/"==b.substring(0,11)?c.loadImage(b,mxUtils.bind(this,function(f){var k=!0,m=mxUtils.bind(this,function(){c.resizeImage(f,b,mxUtils.bind(this,function(f,m,p){f=k?Math.min(1,Math.min(c.maxImageSize/m,c.maxImageSize/p)):1;c.importFile(b,d,l,n,Math.round(m*f),Math.round(p*
-f),e,function(b){c.spinner.stop();g.setSelectionCells(b);g.scrollCellToVisible(g.getSelectionCell())})}),k)});b.length>c.resampleThreshold?c.confirmImageResize(function(b){k=b;m()}):m()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(b,d,l,n,0,0,e,function(b){c.spinner.stop();g.setSelectionCells(b);g.scrollCellToVisible(g.getSelectionCell())})}),p=mxUtils.bind(this,function(b){var c="text/xml";/\.png$/i.test(b)?c="image/png":/\.jpe?g$/i.test(b)?
-c="image/jpg":/\.gif$/i.test(b)?c="image/gif":/\.pdf$/i.test(b)&&(c="application/pdf");return c});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){e(c.drive)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){e(c.oneDrive)},d):
+new Menu(mxUtils.bind(this,function(b,d){function e(b){b.pickFile(function(d){c.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(d,function(b){var d="data:image/"==b.getData().substring(0,11)?p(b.getTitle()):"text/xml";/\.svg$/i.test(b.getTitle())&&!c.editor.isDataSvg(b.getData())&&(b.setData(Editor.createSvgDataUri(b.getData())),d="image/svg+xml");g(b.getData(),d,b.getTitle())},function(b){c.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==c.drive)},!0)}var g=
+mxUtils.bind(this,function(b,d,e){var f=k.view,g=k.getGraphBounds(),l=k.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*k.gridSize)),m=k.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*k.gridSize));"data:image/"==b.substring(0,11)?c.loadImage(b,mxUtils.bind(this,function(f){var g=!0,n=mxUtils.bind(this,function(){c.resizeImage(f,b,mxUtils.bind(this,function(f,n,p){f=g?Math.min(1,Math.min(c.maxImageSize/n,c.maxImageSize/p)):1;c.importFile(b,d,l,m,Math.round(n*f),Math.round(p*
+f),e,function(b){c.spinner.stop();k.setSelectionCells(b);k.scrollCellToVisible(k.getSelectionCell())})}),g)});b.length>c.resampleThreshold?c.confirmImageResize(function(b){g=b;n()}):n()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(b,d,l,m,0,0,e,function(b){c.spinner.stop();k.setSelectionCells(b);k.scrollCellToVisible(k.getSelectionCell())})}),p=mxUtils.bind(this,function(b){var c="text/xml";/\.png$/i.test(b)?c="image/png":/\.jpe?g$/i.test(b)?
+c="image/jpg":/\.gif$/i.test(b)?c="image/gif":/\.pdf$/i.test(b)&&(c="application/pdf");return c});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){e(c.drive)},d):m&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){e(c.oneDrive)},d):
l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){e(c.dropbox)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){e(c.gitHub)},d);
-null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){e(c.gitLab)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){e(c.notion)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){e(c.trello)},d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
+null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){e(c.gitLab)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){e(c.notion)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){e(c.trello)},d):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
"...",null,function(){c.importLocalFile(!1)},d);"1"!=urlParams.noDevice&&b.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(c,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var d=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),
-function(c){k(c,d,b)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==d)}},mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d))}))).isEnabled=k;this.put("theme",new Menu(mxUtils.bind(this,function(b,d){var e="1"==urlParams.sketch?"sketch":mxSettings.getUi(),f=b.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},d);"kennedy"!=e&&"atlas"!=e&&"dark"!=
+function(c){g(c,d,b)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==d)}},mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d))}))).isEnabled=g;this.put("theme",new Menu(mxUtils.bind(this,function(b,d){var e="1"==urlParams.sketch?"sketch":mxSettings.getUi(),f=b.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},d);"kennedy"!=e&&"atlas"!=e&&"dark"!=
e&&"min"!=e&&"sketch"!=e&&b.addCheckmark(f,Editor.checkmarkImage);b.addSeparator(d);f=b.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");c.alert(mxResources.get("restartForChangeRequired"))},d);"kennedy"==e&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");c.alert(mxResources.get("restartForChangeRequired"))},d);"min"==e&&b.addCheckmark(f,Editor.checkmarkImage);f=b.addItem(mxResources.get("atlas"),
null,function(){mxSettings.setUi("atlas");c.alert(mxResources.get("restartForChangeRequired"))},d);"atlas"==e&&b.addCheckmark(f,Editor.checkmarkImage);if("dark"==e||!mxClient.IS_IE&&!mxClient.IS_IE11)f=b.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");c.alert(mxResources.get("restartForChangeRequired"))},d),"dark"==e&&b.addCheckmark(f,Editor.checkmarkImage);b.addSeparator(d);f=b.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");c.alert(mxResources.get("restartForChangeRequired"))},
d);"sketch"==e&&b.addCheckmark(f,Editor.checkmarkImage)})));p=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b)if(b.constructor==LocalFile&&null!=b.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(d,e){b.invalidFileHandle=null;b.fileHandle=d;b.title=e.name;b.desc=e;c.save(e.name)}),null,c.createFileSystemOptions(b.getTitle()));else{var d=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,d=new FilenameDialog(this.editorUi,
d,mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&null!=b&&c!=b.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&b.rename(c,mxUtils.bind(this,function(b){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(b){this.editorUi.handleError(b,null!=b?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;c.showError(mxResources.get("error"),
-mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(d.container,340,96,!0,!0);d.init()}}));p.isEnabled=function(){return this.enabled&&k.apply(this,arguments)};p.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=c.getCurrentFile();if(null!=b){var d=c.getCopyFilename(b);b.constructor==DriveFile?(d=new CreateDialog(c,d,mxUtils.bind(this,function(d,e){"_blank"==e?c.editor.editAsNew(c.getFileData(),
+mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(d.container,340,96,!0,!0);d.init()}}));p.isEnabled=function(){return this.enabled&&g.apply(this,arguments)};p.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=c.getCurrentFile();if(null!=b){var d=c.getCopyFilename(b);b.constructor==DriveFile?(d=new CreateDialog(c,d,mxUtils.bind(this,function(d,e){"_blank"==e?c.editor.editAsNew(c.getFileData(),
d):("download"==e&&(e=App.MODE_GOOGLE),null!=d&&0<d.length&&(e==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&b.saveAs(d,mxUtils.bind(this,function(d){b.desc=d;b.save(!1,mxUtils.bind(this,function(){c.spinner.stop();b.setModified(!1);b.addAllSavedStatus()}),mxUtils.bind(this,function(b){c.handleError(b)}))}),mxUtils.bind(this,function(b){c.handleError(b)})):c.createFile(d,c.getFileData(!0),null,e)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),
mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(d.container,420,380,!0,!0),d.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),d)}}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=c.getCurrentFile();if(b.getMode()==App.MODE_GOOGLE||b.getMode()==App.MODE_ONEDRIVE){var d=!1;if(b.getMode()==App.MODE_GOOGLE&&null!=b.desc.parents)for(var e=0;e<b.desc.parents.length;e++)if(b.desc.parents[e].isRoot){d=!0;break}c.pickFolder(b.getMode(),
mxUtils.bind(this,function(d){c.spinner.spin(document.body,mxResources.get("moving"))&&b.move(d,mxUtils.bind(this,function(b){c.spinner.stop()}),mxUtils.bind(this,function(b){c.handleError(b)}))}),null,!0,d)}}));this.put("publish",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,["publishLink"],c)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));c.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+
"...",function(){c.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var b=c.getCurrentFile();null!=b&&b.share()}catch(B){c.handleError(B)}}));this.put("embed",new Menu(mxUtils.bind(this,function(b,d){var e=c.getCurrentFile();null==e||e.getMode()!=App.MODE_GOOGLE&&e.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(e.getTitle())||this.addMenuItems(b,["liveImage","-"],d);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],d);navigator.standalone||
c.isOffline()||this.addMenuItems(b,["embedIframe"],d);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(b,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),d)})));c.addInsertItem=function(b,d,e,f){("plantUml"!=f||EditorUi.enablePlantUml&&!c.isOffline())&&b.addItem(e,null,mxUtils.bind(this,function(){if("fromText"==f||"formatSql"==f||"plantUml"==f||"mermaid"==f){var b=new ParseDialog(c,e,f);c.showDialog(b.container,620,420,!0,!1);c.dialog.container.style.overflow=
-"auto"}else b=new CreateGraphDialog(c,e,f),c.showDialog(b.container,620,420,!0,!1);b.init()}),d,null,k())};var A=function(b,d,e,f){var k=new mxCell(b,new mxGeometry(0,0,d,e),f);k.vertex=!0;b=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([k],!0));k.geometry.x=b.x;k.geometry.y=b.y;g.getModel().beginUpdate();try{k=g.addCell(k),g.fireEvent(new mxEventObject("cellsInserted","cells",[k]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(k);g.setSelectionCell(k);g.container.focus();g.editAfterInsert&&
-g.startEditing(k);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(g.view.getState(k))},0);return k};c.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),
-function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=k;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
-A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=k;c.addInsertMenuItems=mxUtils.bind(this,function(b,d,e){for(var f=0;f<e.length;f++)"-"==e[f]?b.addSeparator(d):c.addInsertItem(b,d,mxResources.get(e[f])+"...",e[f])});this.put("insert",new Menu(mxUtils.bind(this,function(b,d){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),d);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(b,["insertTemplate"],
+"auto"}else b=new CreateGraphDialog(c,e,f),c.showDialog(b.container,620,420,!0,!1);b.init()}),d,null,g())};var A=function(b,d,e,f){var g=new mxCell(b,new mxGeometry(0,0,d,e),f);g.vertex=!0;b=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([g],!0));g.geometry.x=b.x;g.geometry.y=b.y;k.getModel().beginUpdate();try{g=k.addCell(g),k.fireEvent(new mxEventObject("cellsInserted","cells",[g]))}finally{k.getModel().endUpdate()}k.scrollCellToVisible(g);k.setSelectionCell(g);k.container.focus();k.editAfterInsert&&
+k.startEditing(g);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(k.view.getState(g))},0);return g};c.actions.put("insertText",new Action(mxResources.get("text"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&k.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=g;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),
+function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=g;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=g;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){k.isEnabled()&&!k.isCellLocked(k.getDefaultParent())&&
+A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=g;c.addInsertMenuItems=mxUtils.bind(this,function(b,d,e){for(var f=0;f<e.length;f++)"-"==e[f]?b.addSeparator(d):c.addInsertItem(b,d,mxResources.get(e[f])+"...",e[f])});this.put("insert",new Menu(mxUtils.bind(this,function(b,d){this.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),d);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(b,["insertTemplate"],
d);b.addSeparator(d);this.addSubmenu("insertLayout",b,d,mxResources.get("layout"));this.addSubmenu("insertAdvanced",b,d,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,d){c.addInsertMenuItems(b,d,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,d){c.addInsertMenuItems(b,d,["fromText","plantUml","mermaid","-","formatSql"]);b.addItem(mxResources.get("csv")+
-"...",null,function(){c.showImportCsvDialog()},d,null,k())})));this.put("openRecent",new Menu(function(b,d){var e=c.getRecent();if(null!=e){for(var f=0;f<e.length;f++)(function(e){var f=e.mode;f==App.MODE_GOOGLE?f="googleDrive":f==App.MODE_ONEDRIVE&&(f="oneDrive");b.addItem(e.title+" ("+mxResources.get(f)+")",null,function(){c.loadFile(e.id)},d)})(e[f]);b.addSeparator(d)}b.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},d)}));this.put("openFrom",new Menu(function(b,d){null!=c.drive?
-b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,
+"...",null,function(){c.showImportCsvDialog()},d,null,g())})));this.put("openRecent",new Menu(function(b,d){var e=c.getRecent();if(null!=e){for(var f=0;f<e.length;f++)(function(e){var f=e.mode;f==App.MODE_GOOGLE?f="googleDrive":f==App.MODE_ONEDRIVE&&(f="oneDrive");b.addItem(e.title+" ("+mxResources.get(f)+")",null,function(){c.loadFile(e.id)},d)})(e[f]);b.addSeparator(d)}b.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},d)}));this.put("openFrom",new Menu(function(b,d){null!=c.drive?
+b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},d):m&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,
null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},d);null!=
-c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.pickFile(App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},
+c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.pickFile(App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},d):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},
d);"1"!=urlParams.noDevice&&b.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(c,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},
-mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,
+mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},d):m&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,
null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+
" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_NOTION)},
-d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},d);"1"!=urlParams.noDevice&&b.addItem(mxResources.get("device")+
-"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},d)})),this.put("openLibraryFrom",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},d):n&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+
+d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},d);"1"!=urlParams.noDevice&&b.addItem(mxResources.get("device")+
+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},d)})),this.put("openLibraryFrom",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},d):m&&"function"===typeof window.DriveClient&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+
"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},d):l&&"function"===typeof window.OneDriveClient&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},d):f&&"function"===typeof window.DropboxClient&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);null!=c.gitHub&&
-b.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.pickLibrary(App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},d):m&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+
+b.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},d);null!=c.gitLab&&b.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},d);null!=c.notion&&(b.addSeparator(d),b.addItem(mxResources.get("notion")+"...",null,function(){c.pickLibrary(App.MODE_NOTION)},d));null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},d):n&&"function"===typeof window.TrelloClient&&b.addItem(mxResources.get("trello")+
" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},d);"1"!=urlParams.noDevice&&b.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(c,"",mxResources.get("open"),function(b){if(null!=
-b&&0<b.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var d=b;c.editor.isCorsEnabledForUrl(b)||(d=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(d,function(d){if(200<=d.getStatus()&&299>=d.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,d.getText(),b))}catch(F){c.handleError(F,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},
+b&&0<b.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var d=b;c.editor.isCorsEnabledForUrl(b)||(d=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(d,function(d){if(200<=d.getStatus()&&299>=d.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,d.getText(),b))}catch(E){c.handleError(E,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},
mxResources.get("url"));c.showDialog(b.container,300,80,!0,!0);b.init()},d));"1"==urlParams.confLib&&(b.addSeparator(d),b.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},d))})));this.put("edit",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
p=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var b=!this.commentsWindow.window.isVisible();
this.commentsWindow.window.setVisible(b);this.commentsWindow.refreshCommentsTime();b&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));var p=this.get("viewPanels"),z=p.funct;p.funct=
@@ -11760,64 +11765,65 @@ DriveFile){e.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],d);th
"-"],d),this.addMenuItems(b,["rename"],d),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],d):(this.addMenuItems(b,["makeCopy"],d),null!=e&&e.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],d)));b.addSeparator(d);this.addSubmenu("importFrom",b,d);this.addSubmenu("exportAs",b,d);b.addSeparator(d);this.addSubmenu("embed",b,d);this.addSubmenu("publish",b,d);b.addSeparator(d);this.addSubmenu("newLibrary",b,d);this.addSubmenu("openLibraryFrom",
b,d);c.isRevisionHistorySupported()&&this.addMenuItems(b,["-","revisionHistory"],d);null!=e&&null!=c.fileNode&&(e=null!=e.getTitle()?e.getTitle():c.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["-","properties"]));this.addMenuItems(b,["-","pageSetup"],d);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],d);this.addMenuItems(b,["-","close"])}})));b.prototype.execute=function(){var b=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=
this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var c=b.extFonts,d=0;null!=c&&d<c.length;d++){var e=document.getElementById("extFont_"+c[d].name);null!=e&&e.parentNode.removeChild(e)}b.extFonts=[];for(d=0;null!=this.previousExtFonts&&d<this.previousExtFonts.length;d++)this.ui.editor.graph.addExtFont(this.previousExtFonts[d].name,this.previousExtFonts[d].url);this.previousExtFonts=c};this.put("fontFamily",
-new Menu(mxUtils.bind(this,function(d,e){for(var f=mxUtils.bind(this,function(f,g,k,l,n){var m=this.editorUi.editor.graph;l=this.styleChange(d,l||f,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[f,null!=g?encodeURIComponent(g):null,null]:[f],null,e,function(){"1"!=urlParams["ext-fonts"]?m.setFont(f,g):(document.execCommand("fontname",!1,f),m.addExtFont(f,g))},function(){m.updateLabelElements(m.getSelectionCells(),
-function(b){b.removeAttribute("face");b.style.fontFamily=null;"PRE"==b.nodeName&&m.replaceElement(b,"div")});"1"==urlParams["ext-fonts"]&&m.addExtFont(f,g)});k&&(k=document.createElement("span"),k.className="geSprite geSprite-delete",k.style.cursor="pointer",k.style.display="inline-block",l.firstChild.nextSibling.nextSibling.appendChild(k),mxEvent.addListener(k,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(d){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[f.toLowerCase()];
-for(var e=0;e<this.customFonts.length;e++)if(this.customFonts[e].name==f&&this.customFonts[e].url==g){this.customFonts.splice(e,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var k=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=k&&0<k.length)for(e=0;e<k.length;e++)if(k[e].name==f){k.splice(e,1);break}for(var l=mxUtils.clone(this.customFonts),e=0;e<l.length;e++)if(l[e].name==f){l.splice(e,1);break}e=new b(this.editorUi,k,l);this.editorUi.editor.graph.model.execute(e)}this.editorUi.hideCurrentMenu();
-mxEvent.consume(d)})));Graph.addFont(f,g);l.firstChild.nextSibling.style.fontFamily=f;null!=n&&l.setAttribute("title",n)}),g={},k=0;k<this.defaultFonts.length;k++){var l=this.defaultFonts[k];"string"===typeof l?f(l):null!=l.fontFamily&&null!=l.fontUrl&&(g[encodeURIComponent(l.fontFamily)+"@"+encodeURIComponent(l.fontUrl)]=!0,f(l.fontFamily,l.fontUrl))}d.addSeparator(e);if("1"!=urlParams["ext-fonts"]){for(var l=function(b){var c=encodeURIComponent(b.name)+(null==b.url?"":"@"+encodeURIComponent(b.url));
-if(!g[c]){for(var d=b.name,e=0;null!=m[d.toLowerCase()];)d=b.name+" ("+ ++e+")";null==n[c]&&(p.push({name:b.name,url:b.url,label:d,title:b.url}),m[d.toLowerCase()]=b,n[c]=b)}},n={},m={},p=[],k=0;k<this.customFonts.length;k++)l(this.customFonts[k]);for(var q in Graph.recentCustomFonts)l(Graph.recentCustomFonts[q]);p.sort(function(b,c){return b.label<c.label?-1:b.label>c.label?1:0});if(0<p.length){for(k=0;k<p.length;k++)f(p[k].name,p[k].url,!0,p[k].label,p[k].url);d.addSeparator(e)}d.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),e);d.addSeparator(e)}else{q=this.editorUi.editor.graph.extFonts;if(null!=q&&0<q.length){for(var l={},t=!1,k=0;k<this.customFonts.length;k++)l[this.customFonts[k].name]=!0;for(k=0;k<q.length;k++)l[q[k].name]||(this.customFonts.push(q[k]),t=!0);t&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(k=
-0;k<this.customFonts.length;k++)q=this.customFonts[k].name,l=this.customFonts[k].url,f(q,l,!0),this.editorUi.editor.graph.addExtFont(q,l,!0);d.addSeparator(e);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var d=new b(this.editorUi,[],[]);c.editor.graph.model.execute(d)}),e);d.addSeparator(e)}}d.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var b=this.editorUi.editor.graph,c=b.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],d=
-"s",e=null;if("1"!=urlParams["ext-fonts"]&&b.isEditing()){var f=b.getSelectedEditingElement();null!=f&&(f=mxUtils.getCurrentStyle(f),null!=f&&(c=Graph.stripQuotes(f.fontFamily),e=Graph.getFontUrl(c,null),null!=e&&(Graph.isGoogleFontUrl(e)?(e=null,d="g"):d="w")))}else f=b.getView().getState(b.getSelectionCell()),null!=f&&(c=f.style[mxConstants.STYLE_FONTFAMILY]||c,"1"!=urlParams["ext-fonts"]?(f=f.style.fontSource,null!=f&&(f=decodeURIComponent(f),Graph.isGoogleFontUrl(f)?d="g":(d="w",e=f))):(d=f.style.FType||
-d,"w"==d&&(e=this.editorUi.editor.graph.extFonts,f=null,null!=e&&(f=e.find(function(b){return b.name==c})),e=null!=f?f.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=e&&e.substring(0,PROXY_URL.length)==PROXY_URL&&(e=decodeURIComponent(e.substr((PROXY_URL+"?url=").length)));var g=null;document.activeElement==b.cellEditor.textarea&&(g=b.cellEditor.saveSelection());d=new FontDialog(this.editorUi,c,e,d,mxUtils.bind(this,function(c,d,e){null!=g&&(b.cellEditor.restoreSelection(g),g=null);
-if(null!=c&&0<c.length)if("1"!=urlParams["ext-fonts"]&&b.isEditing())b.setFont(c,d);else{b.getModel().beginUpdate();try{b.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(b.setCellStyles(mxConstants.STYLE_FONTFAMILY,c),b.setCellStyles("fontSource",null!=d?encodeURIComponent(d):null),b.setCellStyles("FType",null)):(b.setCellStyles(mxConstants.STYLE_FONTFAMILY,c),"s"!=e&&(b.setCellStyles("FType",e),0==d.indexOf("http://")&&(d=PROXY_URL+"?url="+encodeURIComponent(d)),this.editorUi.editor.graph.addExtFont(c,
-d)));e=!0;for(var f=0;f<this.customFonts.length;f++)if(this.customFonts[f].name==c){e=!1;break}e&&(this.customFonts.push({name:c,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{b.getModel().endUpdate()}}}));this.editorUi.showDialog(d.container,380,Editor.enableWebFonts?250:180,!0,!0);d.init()}),e,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):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")};
+new Menu(mxUtils.bind(this,function(d,e){for(var f=mxUtils.bind(this,function(f,g,k,l,m){var n=c.editor.graph;l=this.styleChange(d,l||f,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"1"!=urlParams["ext-fonts"]?[f,null!=g?encodeURIComponent(g):null,null]:[f],null,e,function(){"1"!=urlParams["ext-fonts"]?n.setFont(f,g):(document.execCommand("fontname",!1,f),n.addExtFont(f,g));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?
+[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[f,null!=g?encodeURIComponent(g):null,null]:[f],"cells",[n.cellEditor.getEditingCell()]))},function(){n.updateLabelElements(n.getSelectionCells(),function(b){b.removeAttribute("face");b.style.fontFamily=null;"PRE"==b.nodeName&&n.replaceElement(b,"div")});"1"==urlParams["ext-fonts"]&&n.addExtFont(f,g)});k&&(k=document.createElement("span"),k.className="geSprite geSprite-delete",k.style.cursor=
+"pointer",k.style.display="inline-block",l.firstChild.nextSibling.nextSibling.appendChild(k),mxEvent.addListener(k,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(d){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[f.toLowerCase()];for(var e=0;e<this.customFonts.length;e++)if(this.customFonts[e].name==f&&this.customFonts[e].url==g){this.customFonts.splice(e,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var k=mxUtils.clone(this.editorUi.editor.graph.extFonts);
+if(null!=k&&0<k.length)for(e=0;e<k.length;e++)if(k[e].name==f){k.splice(e,1);break}for(var l=mxUtils.clone(this.customFonts),e=0;e<l.length;e++)if(l[e].name==f){l.splice(e,1);break}e=new b(this.editorUi,k,l);this.editorUi.editor.graph.model.execute(e)}this.editorUi.hideCurrentMenu();mxEvent.consume(d)})));Graph.addFont(f,g);l.firstChild.nextSibling.style.fontFamily=f;null!=m&&l.setAttribute("title",m)}),g={},k=0;k<this.defaultFonts.length;k++){var l=this.defaultFonts[k];"string"===typeof l?f(l):null!=
+l.fontFamily&&null!=l.fontUrl&&(g[encodeURIComponent(l.fontFamily)+"@"+encodeURIComponent(l.fontUrl)]=!0,f(l.fontFamily,l.fontUrl))}d.addSeparator(e);if("1"!=urlParams["ext-fonts"]){for(var l=function(b){var c=encodeURIComponent(b.name)+(null==b.url?"":"@"+encodeURIComponent(b.url));if(!g[c]){for(var d=b.name,e=0;null!=n[d.toLowerCase()];)d=b.name+" ("+ ++e+")";null==m[c]&&(p.push({name:b.name,url:b.url,label:d,title:b.url}),n[d.toLowerCase()]=b,m[c]=b)}},m={},n={},p=[],k=0;k<this.customFonts.length;k++)l(this.customFonts[k]);
+for(var q in Graph.recentCustomFonts)l(Graph.recentCustomFonts[q]);p.sort(function(b,c){return b.label<c.label?-1:b.label>c.label?1:0});if(0<p.length){for(k=0;k<p.length;k++)f(p[k].name,p[k].url,!0,p[k].label,p[k].url);d.addSeparator(e)}d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),e);d.addSeparator(e)}else{q=this.editorUi.editor.graph.extFonts;if(null!=q&&0<q.length){for(var l=
+{},t=!1,k=0;k<this.customFonts.length;k++)l[this.customFonts[k].name]=!0;for(k=0;k<q.length;k++)l[q[k].name]||(this.customFonts.push(q[k]),t=!0);t&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(k=0;k<this.customFonts.length;k++)q=this.customFonts[k].name,l=this.customFonts[k].url,f(q,l,!0),this.editorUi.editor.graph.addExtFont(q,l,!0);d.addSeparator(e);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var d=
+new b(this.editorUi,[],[]);c.editor.graph.model.execute(d)}),e);d.addSeparator(e)}}d.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var b=this.editorUi.editor.graph,c=b.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],d="s",e=null;if("1"!=urlParams["ext-fonts"]&&b.isEditing()){var f=b.getSelectedEditingElement();null!=f&&(f=mxUtils.getCurrentStyle(f),null!=f&&(c=Graph.stripQuotes(f.fontFamily),e=Graph.getFontUrl(c,null),null!=e&&(Graph.isGoogleFontUrl(e)?
+(e=null,d="g"):d="w")))}else f=b.getView().getState(b.getSelectionCell()),null!=f&&(c=f.style[mxConstants.STYLE_FONTFAMILY]||c,"1"!=urlParams["ext-fonts"]?(f=f.style.fontSource,null!=f&&(f=decodeURIComponent(f),Graph.isGoogleFontUrl(f)?d="g":(d="w",e=f))):(d=f.style.FType||d,"w"==d&&(e=this.editorUi.editor.graph.extFonts,f=null,null!=e&&(f=e.find(function(b){return b.name==c})),e=null!=f?f.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=e&&e.substring(0,PROXY_URL.length)==PROXY_URL&&
+(e=decodeURIComponent(e.substr((PROXY_URL+"?url=").length)));var g=null;document.activeElement==b.cellEditor.textarea&&(g=b.cellEditor.saveSelection());d=new FontDialog(this.editorUi,c,e,d,mxUtils.bind(this,function(c,d,e){null!=g&&(b.cellEditor.restoreSelection(g),g=null);if(null!=c&&0<c.length)if("1"!=urlParams["ext-fonts"]&&b.isEditing())b.setFont(c,d);else{b.getModel().beginUpdate();try{b.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(b.setCellStyles(mxConstants.STYLE_FONTFAMILY,c),b.setCellStyles("fontSource",
+null!=d?encodeURIComponent(d):null),b.setCellStyles("FType",null)):(b.setCellStyles(mxConstants.STYLE_FONTFAMILY,c),"s"!=e&&(b.setCellStyles("FType",e),0==d.indexOf("http://")&&(d=PROXY_URL+"?url="+encodeURIComponent(d)),this.editorUi.editor.graph.addExtFont(c,d)));e=!0;for(var f=0;f<this.customFonts.length;f++)if(this.customFonts[f].name==c){e=!1;break}e&&(this.customFonts.push({name:c,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{b.getModel().endUpdate()}}}));
+this.editorUi.showDialog(d.container,380,Editor.enableWebFonts?250:180,!0,!0);d.init()}),e,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):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(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,d){this.ui=b;this.page=e;this.previous=this.name=d}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,d){this.ui=b;this.oldIndex=e;this.newIndex=d}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,d){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=d&&(e.viewState=d,this.neverShown=!1))}
SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){var b=this.ui.currentPage,e=this.ui.editor,d=e.graph,c=Graph.compressNode(e.getGraphXml(!0));mxUtils.setTextContent(b.node,c);b.viewState=d.getViewState();b.root=d.model.root;null!=b.model&&b.model.rootChanged(b.root);d.view.clear(b.root,!0);d.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;d.model.prefix=Editor.guid()+"-";d.model.rootChanged(b.root);
d.setViewState(b.viewState);d.gridEnabled=d.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();d.view.validate();d.blockMathRender=!0;d.sizeDidChange();d.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,d.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,e,d,c,g){SelectPage.call(this,b,d);this.relatedPage=e;this.index=c;this.previousIndex=null;this.noSelect=g}mxUtils.extend(ChangePage,SelectPage);
+function ChangePage(b,e,d,c,k){SelectPage.call(this,b,d);this.relatedPage=e;this.index=c;this.previousIndex=null;this.noSelect=k}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var d=0;d<this.pages.length;d++)if(this.pages[d]==b){e=d;break}return e};EditorUi.prototype.getPageById=function(b){if(null!=this.pages)for(var e=0;e<this.pages.length;e++)if(this.pages[e].getId()==b)return this.pages[e];return null};
-EditorUi.prototype.createImageForPageLink=function(b,e,d){var c=b.indexOf(","),g=null;0<c&&(c=this.getPageById(b.substring(c+1)),null!=c&&c!=e&&(g=this.getImageForPage(c,e,d),g.originalSrc=b));null==g&&(g={originalSrc:b});return g};
-EditorUi.prototype.getImageForPage=function(b,e,d){d=null!=d?d:this.editor.graph;var c=d.getGlobalVariable;d=this.createTemporaryGraph(d.getStylesheet());var g=this.getPageIndex(null!=e?e:this.currentPage);d.getGlobalVariable=function(b){return"pagenumber"==b?g+1:"page"==b&&null!=e?e.getName():c.apply(this,arguments)};document.body.appendChild(d.container);this.updatePageRoot(b);d.model.setRoot(b.root);b=d.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var k=d.getGraphBounds();
-document.body.removeChild(d.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
+EditorUi.prototype.createImageForPageLink=function(b,e,d){var c=b.indexOf(","),k=null;0<c&&(c=this.getPageById(b.substring(c+1)),null!=c&&c!=e&&(k=this.getImageForPage(c,e,d),k.originalSrc=b));null==k&&(k={originalSrc:b});return k};
+EditorUi.prototype.getImageForPage=function(b,e,d){d=null!=d?d:this.editor.graph;var c=d.getGlobalVariable;d=this.createTemporaryGraph(d.getStylesheet());var k=this.getPageIndex(null!=e?e:this.currentPage);d.getGlobalVariable=function(b){return"pagenumber"==b?k+1:"page"==b&&null!=e?e.getName():c.apply(this,arguments)};document.body.appendChild(d.container);this.updatePageRoot(b);d.model.setRoot(b.root);b=d.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var g=d.getGraphBounds();
+document.body.removeChild(d.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),g.width,g.height,g.x,g.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var c=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";c!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var d=null,c=mxUtils.bind(this,function(){this.updateTabContainer();var c=this.currentPage;null!=c&&c!=d&&(null==c.viewState||null==c.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+c.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+c.viewState.scrollTop),d=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(b,d){for(var e=d.getProperty("edit").changes,f=0;f<e.length;f++)if(e[f]instanceof SelectPage||e[f]instanceof RenamePage||e[f]instanceof MovePage||e[f]instanceof mxRootChange){c();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,e,d){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(c.setViewState(e),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+e.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+e.scrollTop,c.restoreSelection(d))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),d=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),g=parseFloat(b.getAttribute("pageHeight")),k=b.getAttribute("background"),n=this.parseBackgroundImage(b.getAttribute("backgroundImage")),f=b.getAttribute("extFonts");if(f)try{f=f.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}})}catch(l){console.log("ExtFonts format error: "+l.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=k&&0<k.length?k:null,backgroundImage:n,pageScale:isNaN(d)?mxGraph.prototype.pageScale:d,pageFormat:isNaN(c)||isNaN(g)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,c,g),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:f||[]}};
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),d=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),k=parseFloat(b.getAttribute("pageHeight")),g=b.getAttribute("background"),m=this.parseBackgroundImage(b.getAttribute("backgroundImage")),f=b.getAttribute("extFonts");if(f)try{f=f.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}})}catch(l){console.log("ExtFonts format error: "+l.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=g&&0<g.length?g:null,backgroundImage:m,pageScale:isNaN(d)?mxGraph.prototype.pageScale:d,pageFormat:isNaN(c)||isNaN(k)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,c,k),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:f||[]}};
Graph.prototype.saveViewState=function(b,e,d,c){d||(e.setAttribute("grid",null==b||b.gridEnabled?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("page",null==b&&this.defaultPageVisible||null!=b&&b.pageVisible?"1":"0"),e.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);d=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=d&&(e.setAttribute("pageWidth",d.width),e.setAttribute("pageHeight",d.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),c=this.getBackgroundImageObject(b.backgroundImage,c),null!=c&&e.setAttribute("backgroundImage",
JSON.stringify(c)));e.setAttribute("math",null!=b&&b.mathEnabled?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(b){return b.name+"^"+b.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
Graph.prototype.setViewState=function(b,e){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var d=this.extFonts;this.extFonts=b.extFonts||[];if(e&&null!=d)for(var c=0;c<d.length;c++){var g=document.getElementById("extFont_"+d[c].name);null!=g&&g.parentNode.removeChild(g)}for(c=0;c<this.extFonts.length;c++)this.addExtFont(this.extFonts[c].name,this.extFonts[c].url,
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var d=this.extFonts;this.extFonts=b.extFonts||[];if(e&&null!=d)for(var c=0;c<d.length;c++){var k=document.getElementById("extFont_"+d[c].name);null!=k&&k.parentNode.removeChild(k)}for(c=0;c<this.extFonts.length;c++)this.addExtFont(this.extFonts[c].name,this.extFonts[c].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0,this.hiddenTags=
[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,e,d){if(b&&e){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:e});var c="extFont_"+b;if(null==document.getElementById(c))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,c);else{document.getElementsByTagName("head");var g=document.createElement("style");g.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));g.setAttribute("id",c);document.getElementsByTagName("head")[0].appendChild(g)}if(!d){null==
-this.extFonts&&(this.extFonts=[]);d=this.extFonts;c=!0;for(g=0;g<d.length;g++)if(d[g].name==b){c=!1;break}c&&this.extFonts.push({name:b,url:e})}}};
+Graph.prototype.addExtFont=function(b,e,d){if(b&&e){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:e});var c="extFont_"+b;if(null==document.getElementById(c))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,c);else{document.getElementsByTagName("head");var k=document.createElement("style");k.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));k.setAttribute("id",c);document.getElementsByTagName("head")[0].appendChild(k)}if(!d){null==
+this.extFonts&&(this.extFonts=[]);d=this.extFonts;c=!0;for(k=0;k<d.length;k++)if(d[k].name==b){c=!1;break}c&&this.extFonts.push({name:b,url:e})}}};
EditorUi.prototype.updatePageRoot=function(b,e){if(null==b.root){var d=this.editor.extractGraphModel(b.node,null,e),c=Editor.extractParserError(d);if(c)throw Error(c);null!=d?(b.graphModelNode=d,b.viewState=this.editor.graph.createViewState(d),c=new mxCodec(d.ownerDocument),b.root=c.decode(d).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){d=this.editor.extractGraphModel(b.node);if(c=Editor.extractParserError(d))throw Error(c);null!=d&&(b.graphModelNode=
d)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,e,d){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var c=this.editor.graph.model.createUndoableEdit();c.ignoreEdit=!0;var g=new SelectPage(this,b,d);g.execute();c.add(g);c.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c))}}catch(k){this.handleError(k)}};
+EditorUi.prototype.selectPage=function(b,e,d){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var c=this.editor.graph.model.createUndoableEdit();c.ignoreEdit=!0;var k=new SelectPage(this,b,d);k.execute();c.add(k);c.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c))}}catch(g){this.handleError(g)}};
EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(b,e){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:this.createPage(null,this.createPageId());e=null!=e?e:this.pages.length;var d=new ChangePage(this,b,b,e);this.editor.graph.model.execute(d)}return b};EditorUi.prototype.createPageId=function(){var b;do b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,e){var d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);d.setName(null!=b?b:this.createPageName());return d};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var d=this.pages[e].getName();null!=d&&0<d.length&&(b[d]=d)}e=this.pages.length;do d=mxResources.get("pageWithNumber",[++e]);while(null!=b[d]);return d};
-EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,d=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(d==this.pages.length-1?d--:d++,c=this.pages[d]):1>=this.pages.length&&(c=this.insertPage(),e.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,c))}finally{e.model.endUpdate()}}}catch(g){this.handleError(g)}return b};
-EditorUi.prototype.duplicatePage=function(b,e){var d=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var g=b.node.cloneNode(!1);g.removeAttribute("id");var k={},n=c.createCellLookup([c.model.root]),d=new DiagramPage(g);d.root=c.cloneCell(c.model.root,null,k);d.viewState=c.getViewState();d.viewState.scale=1;d.viewState.scrollLeft=null;d.viewState.scrollTop=null;d.viewState.currentRoot=null;d.viewState.defaultParent=null;d.setName(e);d=this.insertPage(d,mxUtils.indexOf(this.pages,
-b)+1);c.updateCustomLinks(c.createCellMapping(k,n),[d.root])}}catch(f){this.handleError(f)}return d};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,b,d))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};
+EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,d=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=d){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(d==this.pages.length-1?d--:d++,c=this.pages[d]):1>=this.pages.length&&(c=this.insertPage(),e.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,c))}finally{e.model.endUpdate()}}}catch(k){this.handleError(k)}return b};
+EditorUi.prototype.duplicatePage=function(b,e){var d=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var k=b.node.cloneNode(!1);k.removeAttribute("id");var g={},m=c.createCellLookup([c.model.root]),d=new DiagramPage(k);d.root=c.cloneCell(c.model.root,null,g);d.viewState=c.getViewState();d.viewState.scale=1;d.viewState.scrollLeft=null;d.viewState.scrollTop=null;d.viewState.currentRoot=null;d.viewState.defaultParent=null;d.setName(e);d=this.insertPage(d,mxUtils.indexOf(this.pages,
+b)+1);c.updateCustomLinks(c.createCellMapping(g,m),[d.root])}}catch(f){this.handleError(f)}return d};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,b,d))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};
EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-d)/this.pages.length)+
-1),g=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(d){b.isEnabled()?(mxClient.IS_FF&&d.dataTransfer.setData("Text","<diagram/>"),g=c):mxEvent.consume(d)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(b){g=null;b.stopPropagation();
-b.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null!=g&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=g&&c!=g&&this.movePage(g,c);b.stopPropagation();b.preventDefault()}));e.appendChild(d)})(k,this.createTabForPage(this.pages[k],c,this.pages[k]!=this.currentPage,k+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);c=this.createPageMenuTab();this.tabContainer.appendChild(c);
-c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(e.clientWidth>this.tabContainer.clientWidth-d){null!=c&&(c.style.position="absolute",c.style.right="0px",e.style.marginRight="30px");var n=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");n.style.position="absolute";n.style.right=this.editor.chromeless?"29px":"55px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var f=this.createControlTab(4,"&nbsp;&#10095;");f.style.position="absolute";
-f.style.right=this.editor.chromeless?"0px":"29px";f.style.fontSize="13pt";this.tabContainer.appendChild(f);var l=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=l+"px";mxEvent.addListener(n,"click",mxUtils.bind(this,function(b){e.scrollLeft-=Math.max(20,l-20);mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(b)}));mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,
-e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){e.scrollLeft+=Math.max(20,l-20);mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(b)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+1),k=null,g=0;g<this.pages.length;g++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(d){b.isEnabled()?(mxClient.IS_FF&&d.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(d)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(b){k=null;b.stopPropagation();
+b.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null!=k&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=k&&c!=k&&this.movePage(k,c);b.stopPropagation();b.preventDefault()}));e.appendChild(d)})(g,this.createTabForPage(this.pages[g],c,this.pages[g]!=this.currentPage,g+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);c=this.createPageMenuTab();this.tabContainer.appendChild(c);
+c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(e.clientWidth>this.tabContainer.clientWidth-d){null!=c&&(c.style.position="absolute",c.style.right="0px",e.style.marginRight="30px");var m=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");m.style.position="absolute";m.style.right=this.editor.chromeless?"29px":"55px";m.style.fontSize="13pt";this.tabContainer.appendChild(m);var f=this.createControlTab(4,"&nbsp;&#10095;");f.style.position="absolute";
+f.style.right=this.editor.chromeless?"0px":"29px";f.style.fontSize="13pt";this.tabContainer.appendChild(f);var l=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=l+"px";mxEvent.addListener(m,"click",mxUtils.bind(this,function(b){e.scrollLeft-=Math.max(20,l-20);mxUtils.setOpacity(m,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(b)}));mxUtils.setOpacity(m,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,
+e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){e.scrollLeft+=Math.max(20,l-20);mxUtils.setOpacity(m,0<e.scrollLeft?100:50);mxUtils.setOpacity(f,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(b)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(b){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(b))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(b){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(b)})));return e};
EditorUi.prototype.createControlTab=function(b,e,d){d=this.createTab(null!=d?d:!0);d.style.lineHeight=this.tabContainerHeight+"px";d.style.paddingTop=b+"px";d.style.cursor="pointer";d.style.width="30px";d.innerHTML=e;null!=d.firstChild&&null!=d.firstChild.style&&mxUtils.setOpacity(d.firstChild,40);return d};
@@ -11826,29 +11832,29 @@ var c=new mxPopupMenu(mxUtils.bind(this,function(b,c){for(var d=0;d<this.pages.l
null,mxUtils.bind(this,function(){this.insertPage()}),c);var e=this.currentPage;null!=e&&(b.addSeparator(c),d=e.getName(),b.addItem(mxResources.get("removeIt",[d]),null,mxUtils.bind(this,function(){this.removePage(e)}),c),b.addItem(mxResources.get("renameIt",[d]),null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),c),b.addSeparator(c),b.addItem(mxResources.get("duplicateIt",[d]),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.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(b),e=mxEvent.getClientY(b);c.popup(d,e,null,b);this.setCurrentMenu(c);mxEvent.consume(b)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.insertPage();mxEvent.consume(b)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
-EditorUi.prototype.createTabForPage=function(b,e,d,c){d=this.createTab(d);var g=b.getName()||mxResources.get("untitled"),k=b.getId();d.setAttribute("title",g+(null!=k?" ("+k+")":"")+" ["+c+"]");mxUtils.write(d,g);d.style.maxWidth=e+"px";d.style.width=e+"px";this.addTabListeners(b,d);42<e&&(d.style.textOverflow="ellipsis");return d};
-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var d=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(c){this.renamePage(b);mxEvent.consume(c)}));var c=!1,g=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(e){c=null!=this.currentMenu;g=b==this.currentPage;d.isMouseDown||g||this.selectPage(b)}),null,mxUtils.bind(this,function(k){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(k)&&g||mxEvent.isPopupTrigger(k))){d.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!c){var n=new mxPopupMenu(this.createPageMenu(b));n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);this.resetCurrentMenu();n.destroy()});var f=mxEvent.getClientX(k),l=mxEvent.getClientY(k);n.popup(f,l,null,k);this.setCurrentMenu(n,e)}mxEvent.consume(k)}}))};
-EditorUi.prototype.getLinkForPage=function(b,e,d){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var c=this.getCurrentFile();if(null!=c&&c.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var g=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),g=g+((0==g.length?"?":"&")+"page-id="+b.getId());null!=e&&(g+="&"+e.join("&"));return(d&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+g+"#"+c.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(d,c){var g=this.editor.graph;d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),c);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),c);null!=this.getLinkForPage(b)&&(d.addSeparator(c),d.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,d,e,l,m,p){c=this.createUrlParameters(c,d,e,l,m,p);e||c.push("hide-pages=1");g.isSelectionEmpty()||(e=g.getBoundingBox(g.getSelectionCells()),d=g.view.translate,m=g.view.scale,e.width/=m,e.height/=m,e.x=e.x/m-d.x,e.y=e.y/m-d.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height),border:100}))));
+EditorUi.prototype.createTabForPage=function(b,e,d,c){d=this.createTab(d);var k=b.getName()||mxResources.get("untitled"),g=b.getId();d.setAttribute("title",k+(null!=g?" ("+g+")":"")+" ["+c+"]");mxUtils.write(d,k);d.style.maxWidth=e+"px";d.style.width=e+"px";this.addTabListeners(b,d);42<e&&(d.style.textOverflow="ellipsis");return d};
+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var d=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(c){this.renamePage(b);mxEvent.consume(c)}));var c=!1,k=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(e){c=null!=this.currentMenu;k=b==this.currentPage;d.isMouseDown||k||this.selectPage(b)}),null,mxUtils.bind(this,function(g){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(g)&&k||mxEvent.isPopupTrigger(g))){d.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(g)||!c){var m=new mxPopupMenu(this.createPageMenu(b));m.div.className+=" geMenubarMenu";m.smartSeparators=!0;m.showDisabled=!0;m.autoExpand=!0;m.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(m,arguments);this.resetCurrentMenu();m.destroy()});var f=mxEvent.getClientX(g),l=mxEvent.getClientY(g);m.popup(f,l,null,g);this.setCurrentMenu(m,e)}mxEvent.consume(g)}}))};
+EditorUi.prototype.getLinkForPage=function(b,e,d){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var c=this.getCurrentFile();if(null!=c&&c.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var k=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),k=k+((0==k.length?"?":"&")+"page-id="+b.getId());null!=e&&(k+="&"+e.join("&"));return(d&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+k+"#"+c.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(d,c){var k=this.editor.graph;d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),c);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),c);null!=this.getLinkForPage(b)&&(d.addSeparator(c),d.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,d,e,l,n,p){c=this.createUrlParameters(c,d,e,l,n,p);e||c.push("hide-pages=1");k.isSelectionEmpty()||(e=k.getBoundingBox(k.getSelectionCells()),d=k.view.translate,n=k.view.scale,e.width/=n,e.height/=n,e.x=e.x/n-d.x,e.y=e.y/n-d.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height),border:100}))));
l=new EmbedDialog(this,this.getLinkForPage(b,c,l));this.showDialog(l.container,440,240,!0,!0);l.init()}))})));d.addSeparator(c);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(d.addSeparator(c),d.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),c))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};b.afterDecode=function(b,d,c){b=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=b;return c};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};b.afterDecode=function(b,d,c){b=c.previous;c.previous=c.name;c.name=b;return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),e="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");b.afterEncode=function(b,c,g){g.setAttribute("relatedPage",c.relatedPage.getId());null==c.index&&(g.setAttribute("name",c.relatedPage.getName()),null!=c.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(c.relatedPage.viewState,function(b,c){return 0>mxUtils.indexOf(e,
-b)?c:void 0})),null!=c.relatedPage.root&&b.encodeCell(c.relatedPage.root,g));return g};b.beforeDecode=function(b,c,e){e.ui=b.ui;e.relatedPage=e.ui.getPageById(c.getAttribute("relatedPage"));if(null==e.relatedPage){var d=c.ownerDocument.createElement("diagram");d.setAttribute("id",c.getAttribute("relatedPage"));d.setAttribute("name",c.getAttribute("name"));e.relatedPage=new DiagramPage(d);d=c.getAttribute("viewState");null!=d&&(e.relatedPage.viewState=JSON.parse(d),c.removeAttribute("viewState"));
-c=c.cloneNode(!0);d=c.firstChild;if(null!=d)for(e.relatedPage.root=b.decodeCell(d,!1),e=d.nextSibling,d.parentNode.removeChild(d),d=e;null!=d;){e=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var g=d.getAttribute("id");null==b.lookup(g)&&b.decodeCell(d)}d.parentNode.removeChild(d);d=e}}return c};b.afterDecode=function(b,c,e){e.index=e.previousIndex;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,d,e,n,f){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var g=e.slice(),k=0;k<e.length;k++)"1"==mxUtils.getValue(this.getCurrentCellStyle(e[k]),"treeFolding","0")&&this.foldTreeCell(c,e[k]);e=g;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};Graph.prototype.foldTreeCell=
-function(b,d){this.model.beginUpdate();try{var c=[];this.traverse(d,!0,mxUtils.bind(this,function(b,e){var f=null!=e&&this.isTreeEdge(e);f&&c.push(e);b==d||null!=e&&!f||c.push(b);return(null==e||f)&&(b==d||!this.model.isCollapsed(b))}));this.model.setCollapsed(d,b);for(var e=0;e<c.length;e++)this.model.setVisible(c[e],!b)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(b){return!this.isEdgeIgnored(b)};Graph.prototype.getTreeEdges=function(b,d,e,n,f,l){return this.model.filterCells(this.getEdges(b,
-d,e,n,f,l),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.prototype.getIncomingTreeEdges=function(b,d){return this.getTreeEdges(b,d,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(b,d){return this.getTreeEdges(b,d,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(b){return x.isVertex(b)&&e(b)}function d(b){var c=
-!1;null!=b&&(c="1"==v.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=x.getParent(b),c=v.view.getState(b),c="tree"==(null!=c?c.style:v.getCellStyle(b)).containerType);return c}function n(b){var c=!1;null!=b&&(b=x.getParent(b),c=v.view.getState(b),v.view.getState(b),c=null!=(null!=c?c.style:v.getCellStyle(b)).childLayout);return c}function f(b){b=v.view.getState(b);if(null!=b){var c=v.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=v.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),e="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");b.afterEncode=function(b,c,k){k.setAttribute("relatedPage",c.relatedPage.getId());null==c.index&&(k.setAttribute("name",c.relatedPage.getName()),null!=c.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(c.relatedPage.viewState,function(b,c){return 0>mxUtils.indexOf(e,
+b)?c:void 0})),null!=c.relatedPage.root&&b.encodeCell(c.relatedPage.root,k));return k};b.beforeDecode=function(b,c,e){e.ui=b.ui;e.relatedPage=e.ui.getPageById(c.getAttribute("relatedPage"));if(null==e.relatedPage){var d=c.ownerDocument.createElement("diagram");d.setAttribute("id",c.getAttribute("relatedPage"));d.setAttribute("name",c.getAttribute("name"));e.relatedPage=new DiagramPage(d);d=c.getAttribute("viewState");null!=d&&(e.relatedPage.viewState=JSON.parse(d),c.removeAttribute("viewState"));
+c=c.cloneNode(!0);d=c.firstChild;if(null!=d)for(e.relatedPage.root=b.decodeCell(d,!1),e=d.nextSibling,d.parentNode.removeChild(d),d=e;null!=d;){e=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var k=d.getAttribute("id");null==b.lookup(k)&&b.decodeCell(d)}d.parentNode.removeChild(d);d=e}}return c};b.afterDecode=function(b,c,e){e.index=e.previousIndex;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,d,e,m,f){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var g=e.slice(),k=0;k<e.length;k++)"1"==mxUtils.getValue(this.getCurrentCellStyle(e[k]),"treeFolding","0")&&this.foldTreeCell(c,e[k]);e=g;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};Graph.prototype.foldTreeCell=
+function(b,d){this.model.beginUpdate();try{var c=[];this.traverse(d,!0,mxUtils.bind(this,function(b,e){var f=null!=e&&this.isTreeEdge(e);f&&c.push(e);b==d||null!=e&&!f||c.push(b);return(null==e||f)&&(b==d||!this.model.isCollapsed(b))}));this.model.setCollapsed(d,b);for(var e=0;e<c.length;e++)this.model.setVisible(c[e],!b)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(b){return!this.isEdgeIgnored(b)};Graph.prototype.getTreeEdges=function(b,d,e,m,f,l){return this.model.filterCells(this.getEdges(b,
+d,e,m,f,l),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.prototype.getIncomingTreeEdges=function(b,d){return this.getTreeEdges(b,d,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(b,d){return this.getTreeEdges(b,d,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(b){return x.isVertex(b)&&e(b)}function d(b){var c=
+!1;null!=b&&(c="1"==v.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=x.getParent(b),c=v.view.getState(b),c="tree"==(null!=c?c.style:v.getCellStyle(b)).containerType);return c}function m(b){var c=!1;null!=b&&(b=x.getParent(b),c=v.view.getState(b),v.view.getState(b),c=null!=(null!=c?c.style:v.getCellStyle(b)).childLayout);return c}function f(b){b=v.view.getState(b);if(null!=b){var c=v.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=v.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function l(b,c){c=null!=c?c:!0;v.model.beginUpdate();try{var d=v.model.getParent(b),e=v.getIncomingTreeEdges(b),g=v.cloneCells([e[0],b]);v.model.setTerminal(g[0],v.model.getTerminal(e[0],
-!0),!0);var k=f(b),l=d.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;v.view.currentRoot!=d&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var n=v.view.getState(b),m=v.view.scale;if(null!=n){var p=mxRectangle.fromRectangle(n);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?p.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*m:p.y+=(c?
-b.geometry.height+10:-g[1].geometry.height-10)*m;var q=v.getOutgoingTreeEdges(v.model.getTerminal(e[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,u=l=e=0;u<q.length;u++){var y=v.model.getTerminal(q[u],!1);if(k==f(y)){var x=v.view.getState(y);y!=b&&null!=x&&(t&&c!=x.getCenterX()<n.getCenterX()||!t&&c!=x.getCenterY()<n.getCenterY())&&mxUtils.intersects(p,x)&&(e=10+Math.max(e,(Math.min(p.x+p.width,x.x+x.width)-Math.max(p.x,x.x))/m),l=10+Math.max(l,(Math.min(p.y+
-p.height,x.y+x.height)-Math.max(p.y,x.y))/m))}}t?l=0:e=0;for(u=0;u<q.length;u++)if(y=v.model.getTerminal(q[u],!1),k==f(y)&&(x=v.view.getState(y),y!=b&&null!=x&&(t&&c!=x.getCenterX()<n.getCenterX()||!t&&c!=x.getCenterY()<n.getCenterY()))){var B=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&B.push(c);(null==c||d)&&B.push(b);return null==c||d});v.moveCells(B,(c?1:-1)*e,(c?1:-1)*l)}}}return v.addCells(g,d)}finally{v.model.endUpdate()}}function m(b){v.model.beginUpdate();try{var c=
-f(b),d=v.getIncomingTreeEdges(b),e=v.cloneCells([d[0],b]);v.model.setTerminal(d[0],e[1],!1);v.model.setTerminal(e[0],e[1],!0);v.model.setTerminal(e[0],b,!1);var g=v.model.getParent(b),k=g.geometry,l=[];v.view.currentRoot!=g&&(e[1].geometry.x-=k.x,e[1].geometry.y-=k.y);v.traverse(b,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var n=b.geometry.width+40,m=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?n=0:c==mxConstants.DIRECTION_NORTH?
-(n=0,m=-m):c==mxConstants.DIRECTION_WEST?(n=-n,m=0):c==mxConstants.DIRECTION_EAST&&(m=0);v.moveCells(l,n,m);return v.addCells(e,g)}finally{v.model.endUpdate()}}function p(b,c){v.model.beginUpdate();try{var d=v.model.getParent(b),e=v.getIncomingTreeEdges(b),g=f(b);0==e.length&&(e=[v.createEdge(d,null,"",null,null,v.createCurrentEdgeStyle())],g=c);var k=v.cloneCells([e[0],b]);v.model.setTerminal(k[0],b,!0);if(null==v.model.getTerminal(k[0],!1)){v.model.setTerminal(k[0],k[1],!1);var l=v.getCellStyle(k[1]).newEdgeStyle;
-if(null!=l)try{var n=JSON.parse(l),m;for(m in n)v.setCellStyles(m,n[m],[k[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==n[m]&&v.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(W){}}var e=v.getOutgoingTreeEdges(b),p=d.geometry,l=[];v.view.currentRoot==d&&(p=new mxRectangle);for(n=0;n<e.length;n++){var q=v.model.getTerminal(e[n],!1);null!=q&&l.push(q)}var t=v.view.getBounds(l),u=v.view.translate,y=v.view.scale;g==mxConstants.DIRECTION_SOUTH?
+!0),!0);var k=f(b),l=d.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;v.view.currentRoot!=d&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var m=v.view.getState(b),n=v.view.scale;if(null!=m){var p=mxRectangle.fromRectangle(m);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?p.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*n:p.y+=(c?
+b.geometry.height+10:-g[1].geometry.height-10)*n;var q=v.getOutgoingTreeEdges(v.model.getTerminal(e[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,u=l=e=0;u<q.length;u++){var y=v.model.getTerminal(q[u],!1);if(k==f(y)){var x=v.view.getState(y);y!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(p,x)&&(e=10+Math.max(e,(Math.min(p.x+p.width,x.x+x.width)-Math.max(p.x,x.x))/n),l=10+Math.max(l,(Math.min(p.y+
+p.height,x.y+x.height)-Math.max(p.y,x.y))/n))}}t?l=0:e=0;for(u=0;u<q.length;u++)if(y=v.model.getTerminal(q[u],!1),k==f(y)&&(x=v.view.getState(y),y!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var B=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&B.push(c);(null==c||d)&&B.push(b);return null==c||d});v.moveCells(B,(c?1:-1)*e,(c?1:-1)*l)}}}return v.addCells(g,d)}finally{v.model.endUpdate()}}function n(b){v.model.beginUpdate();try{var c=
+f(b),d=v.getIncomingTreeEdges(b),e=v.cloneCells([d[0],b]);v.model.setTerminal(d[0],e[1],!1);v.model.setTerminal(e[0],e[1],!0);v.model.setTerminal(e[0],b,!1);var g=v.model.getParent(b),k=g.geometry,l=[];v.view.currentRoot!=g&&(e[1].geometry.x-=k.x,e[1].geometry.y-=k.y);v.traverse(b,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var m=b.geometry.width+40,n=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?m=0:c==mxConstants.DIRECTION_NORTH?
+(m=0,n=-n):c==mxConstants.DIRECTION_WEST?(m=-m,n=0):c==mxConstants.DIRECTION_EAST&&(n=0);v.moveCells(l,m,n);return v.addCells(e,g)}finally{v.model.endUpdate()}}function p(b,c){v.model.beginUpdate();try{var d=v.model.getParent(b),e=v.getIncomingTreeEdges(b),g=f(b);0==e.length&&(e=[v.createEdge(d,null,"",null,null,v.createCurrentEdgeStyle())],g=c);var k=v.cloneCells([e[0],b]);v.model.setTerminal(k[0],b,!0);if(null==v.model.getTerminal(k[0],!1)){v.model.setTerminal(k[0],k[1],!1);var l=v.getCellStyle(k[1]).newEdgeStyle;
+if(null!=l)try{var m=JSON.parse(l),n;for(n in m)v.setCellStyles(n,m[n],[k[0]]),"edgeStyle"==n&&"elbowEdgeStyle"==m[n]&&v.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(W){}}var e=v.getOutgoingTreeEdges(b),p=d.geometry,l=[];v.view.currentRoot==d&&(p=new mxRectangle);for(m=0;m<e.length;m++){var q=v.model.getTerminal(e[m],!1);null!=q&&l.push(q)}var t=v.view.getBounds(l),u=v.view.translate,y=v.view.scale;g==mxConstants.DIRECTION_SOUTH?
(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/y-u.x-p.x+10,k[1].geometry.y+=k[1].geometry.height-p.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/y-u.x+-p.x+10,k[1].geometry.y-=k[1].geometry.height+p.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+p.x+40):k[1].geometry.x+(k[1].geometry.width-p.x+40),k[1].geometry.y=null==t?b.geometry.y+
(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/y-u.y+-p.y+10);return v.addCells(k,d)}finally{v.model.endUpdate()}}function q(b,c,d){b=v.getOutgoingTreeEdges(b);d=v.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=v.view.getState(v.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
d.y-d.height})}return e}function t(b,c){var d=f(b),e=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==e&&d!=c?u.actions.get("selectParent").funct():d==c?(e=v.getOutgoingTreeEdges(b),null!=e&&0<e.length&&v.setSelectionCell(v.model.getTerminal(e[0],!1))):(d=v.getIncomingTreeEdges(b),null!=d&&0<d.length&&(e=q(v.model.getTerminal(d[0],!0),e,b),d=v.view.getState(b),null!=d&&(d=mxUtils.indexOf(e,d),0<=d&&(d+=c==mxConstants.DIRECTION_NORTH||
@@ -11857,31 +11863,31 @@ c==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=e.length-1&&v.setSelectionCell(e[d].
1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);if(null!=b&&0<b.length&&(b=v.getOutgoingTreeEdges(v.model.getTerminal(b[0],!0)),null!=b)){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);null!=b&&0<b.length&&v.setSelectionCell(v.model.getTerminal(b[0],
!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(b,c){var d=v.getSelectionCell();if(v.isEnabled()&&v.model.isVertex(d)){if(null!=c&&mxEvent.isAltDown(c))v.setSelectionCells(v.model.getTreeEdges(d,null==c||!mxEvent.isShiftDown(c),null==c||!mxEvent.isControlDown(c)));else{var e=[];v.traverse(d,!0,function(b,d){var f=null!=d&&v.isTreeEdge(d);f&&e.push(d);null!=d&&!f||null!=c&&mxEvent.isShiftDown(c)||e.push(b);return null==d||f})}v.setSelectionCells(e)}},null,null,"Alt+Shift+D");
var z=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];x.isEdge(k)&&e(k)&&(f.push(k),k=x.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
-f;return z.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var y=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=y.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var n=
-v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==n.length&&0<k.length){var m=this.cloneCell(k[0]);this.addEdge(m,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var B=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var n=null;this.model.beginUpdate();try{var m=g,p=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
-!0)){g=v.model.getParent(c[q]);break}if(null!=m&&g!=m&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var y=v.view.getState(m);null!=y&&(d=(y.getCenterX()-u.getCenterX())/v.view.scale,e=(y.getCenterY()-u.getCenterY())/v.view.scale)}}}}n=B.apply(this,arguments);if(null!=n&&null!=c&&n.length==c.length)for(q=0;q<n.length;q++)if(this.model.isEdge(n[q]))b(m)&&0>mxUtils.indexOf(n,this.model.getTerminal(n[q],
-!0))&&this.model.setTerminal(n[q],m,!0);else if(b(c[q])&&(t=v.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(m)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],m,!0);else if(0==v.getIncomingTreeEdges(n[q]).length){p=m;if(null==p||p==v.model.getParent(c[q]))p=v.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,v.getDefaultParent(),p,n[q])}}finally{this.model.endUpdate()}return n};if(null!=u.sidebar){var C=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
-function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=C.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var n=v.getCellGeometry(k[l]);n.points=null;null!=n.getTerminalPoint(!0)&&n.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var D={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},E=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
-!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?m(v.getSelectionCell()):p(v.getSelectionCell()):13==c.which&&(d=l(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
+f;return z.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var y=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=y.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
+v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var B=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var n=g,p=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
+!0)){g=v.model.getParent(c[q]);break}if(null!=n&&g!=n&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var y=v.view.getState(n);null!=y&&(d=(y.getCenterX()-u.getCenterX())/v.view.scale,e=(y.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=B.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
+!0))&&this.model.setTerminal(m[q],n,!0);else if(b(c[q])&&(t=v.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(n)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==v.getIncomingTreeEdges(m[q]).length){p=n;if(null==p||p==v.model.getParent(c[q]))p=v.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,v.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=u.sidebar){var C=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
+function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=C.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=v.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var D={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},G=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
+!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?n(v.getSelectionCell()):p(v.getSelectionCell()):13==c.which&&(d=l(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=D[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(t(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(t(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(c))}}catch(K){u.handleError(K)}mxEvent.isConsumed(c)||E.apply(this,arguments)};var G=v.connectVertex;v.connectVertex=function(c,d,e,g,k,n,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=f(c),y=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return u==d||0==t.length?p(c,d):y==x?m(c):l(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return G.apply(this,arguments)};v.getSubtree=function(c){var e=
-[c];!d(c)&&!b(c)||n(c)||v.traverse(c,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);(d(this.state.cell)||b(this.state.cell))&&!n(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+mxEvent.consume(c))}}catch(K){u.handleError(K)}mxEvent.isConsumed(c)||G.apply(this,arguments)};var H=v.connectVertex;v.connectVertex=function(c,d,e,g,k,m,q){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=f(c),y=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST;return u==d||0==t.length?p(c,d):y==x?n(c):l(c,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)}return H.apply(this,arguments)};v.getSubtree=function(c){var e=
+[c];!d(c)&&!b(c)||m(c)||v.traverse(c,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var E=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){E.apply(this,arguments);(d(this.state.cell)||b(this.state.cell))&&!m(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(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(b){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(b);
this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(b)})))};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 L=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){L.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var H=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=d.apply(this,arguments),e=this.graph;return b.concat([this.addEntry("tree container",
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=d.apply(this,arguments),e=this.graph;return b.concat([this.addEntry("tree container",
function(){var b=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");b.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 d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);b.insert(e);b.insert(c);b.insert(d);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var b=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
b.vertex=!0;var c=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');c.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-g.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;c.insertEdge(p,!0);g.insertEdge(p,!1);var q=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};');
+d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.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 p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;c.insertEdge(p,!0);k.insertEdge(p,!1);var q=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};');
q.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");t.geometry.relative=!0;t.edge=!0;c.insertEdge(t,!0);q.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 v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.relative=!0;v.edge=!0;c.insertEdge(v,!0);u.insertEdge(v,!1);b.insert(e);b.insert(p);b.insert(t);b.insert(v);b.insert(c);b.insert(d);b.insert(g);b.insert(q);b.insert(u);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=new mxCell("Central Idea",
+u.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.relative=!0;v.edge=!0;c.insertEdge(v,!0);u.insertEdge(v,!1);b.insert(e);b.insert(p);b.insert(t);b.insert(v);b.insert(c);b.insert(d);b.insert(k);b.insert(q);b.insert(u);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=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;');b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var b=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var b=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;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 c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree orgchart organization division",function(){var b=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
b.vertex=!0;var c=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');e.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;c.insertEdge(g,!0);d.insertEdge(g,!1);var m=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');m.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-p.geometry.relative=!0;p.edge=!0;c.insertEdge(p,!0);m.insertEdge(p,!1);b.insert(g);b.insert(p);b.insert(c);b.insert(d);b.insert(m);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree root",function(){var b=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');e.setAttributeForCell(b,"treeRoot",
+d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);d.insertEdge(k,!1);var n=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');n.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+p.geometry.relative=!0;p.edge=!0;c.insertEdge(p,!0);n.insertEdge(p,!1);b.insert(k);b.insert(p);b.insert(c);b.insert(d);b.insert(n);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree root",function(){var b=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');e.setAttributeForCell(b,"treeRoot",
"1");b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree division",function(){var b=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
c.geometry.setTerminalPoint(new mxPoint(0,0),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree sub sections",function(){var b=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");e.geometry.setTerminalPoint(new mxPoint(110,-40),!0);e.geometry.relative=
@@ -11898,20 +11904,20 @@ this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,argume
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="none"/>').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="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><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.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="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
-EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);mxSettings.settings.darkMode=b;mxSettings.save();this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var g=document.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("href",STYLE_PATH+"/dark.css");g.setAttribute("charset","UTF-8");g.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=
+EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(b);mxSettings.settings.darkMode=b;mxSettings.save();this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var k=document.createElement("link");k.setAttribute("rel","stylesheet");k.setAttribute("href",STYLE_PATH+"/dark.css");k.setAttribute("charset","UTF-8");k.setAttribute("type","text/css");EditorUi.prototype.doSetDarkMode=
function(b){if(Editor.darkMode!=b){var c=this.editor.graph;Editor.darkMode=b;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";this.setGridColor(Editor.isDarkMode()?c.view.defaultDarkGridColor:c.view.defaultGridColor);c.defaultPageBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";c.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";c.loadStylesheet();
null!=this.actions.layersWindow&&(b=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,b&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Dialog.backdropColor=Editor.isDarkMode()?"#2a2a2a":"white";
StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;
-document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";k.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }":
+document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";g.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==k.parentNode&&document.getElementsByTagName("head")[0].appendChild(k):null!=k.parentNode&&k.parentNode.removeChild(k)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html body .geStatus { padding-top:3px !important; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?"#2a2a2a":"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var k=document.createElement("style");k.type="text/css";k.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(k);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="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");n.apply(this,arguments)};var f=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){f.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(b,
-c){null!=c.shortcut&&900>d&&!mxClient.IS_IOS?b.firstChild.nextSibling.setAttribute("title",c.shortcut):l.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var b=this.userElement;b.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+b.style.display;b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.userImage+")";b.style.backgroundPosition="center center";
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var g=document.createElement("style");g.type="text/css";g.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(g);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="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");m.apply(this,arguments)};var f=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){f.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(b,
+c){null!=c.shortcut&&900>d&&!mxClient.IS_IOS?b.firstChild.nextSibling.setAttribute("title",c.shortcut):l.apply(this,arguments)};var n=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){n.apply(this,arguments);if(null!=this.userElement){var b=this.userElement;b.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+b.style.display;b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.userImage+")";b.style.backgroundPosition="center center";
b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var p=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){p.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.shareImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var b=
document.createElement("div");b.style.display="inline-block";b.style.position="relative";b.style.marginTop="6px";b.style.marginRight="4px";var c=document.createElement("a");c.className="geMenuItem gePrimaryBtn";c.style.marginLeft="8px";c.style.padding="6px";if("1"==urlParams.noSaveBtn){var d="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,d);c.setAttribute("title",d);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
@@ -11935,88 +11941,88 @@ null!=e&&e.constructor==DriveFile&&c.menus.addMenuItems(b,["share"],d),mxClient.
["comments"],d));c.menus.addMenuItems(b,["-","findReplace","layers","tags"],d);c.menus.addMenuItems(b,["-","pageSetup","pageScale"],d);mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(b,["print"],d);null!=e&&null!=c.fileNode&&(e=null!=e.getTitle()?e.getTitle():c.defaultFilename,/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||this.addMenuItems(b,["-","properties"]));b.addSeparator(d);c.menus.addSubmenu("help",b,d);"1"==urlParams.embed?c.menus.addMenuItems(b,["-","exit"],d):c.menus.addMenuItems(b,
["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(b,d){var e=c.getCurrentFile();null!=e&&e.constructor==DriveFile?c.menus.addMenuItems(b,["save","makeCopy","-","rename","moveToFolder"],d):(c.menus.addMenuItems(b,["save","saveAs","-","rename"],d),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(b,["upload"],d):c.menus.addMenuItems(b,["makeCopy"],d));"1"!=urlParams.sketch||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==
e||e.constructor==LocalFile||c.menus.addMenuItems(b,["-","synchronize"],d);c.menus.addMenuItems(b,["-","autosave"],d);null!=e&&e.isRevisionHistorySupported()&&c.menus.addMenuItems(b,["-","revisionHistory"],d)})));var k=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(b,d){k.funct(b,d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(b,["publishLink"],d);b.addSeparator(d);c.menus.addSubmenu("embed",b,d)})));var l=this.get("language");this.put("table",
-new Menu(mxUtils.bind(this,function(b,d){c.menus.addInsertTableCellItem(b,d)})));var n=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,e){n.funct(b,e);this.addMenuItems(b,["editDiagram"],e);"1"==urlParams.sketch&&(b.addSeparator(e),b.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},e,null,mxUtils.bind(d,d.isEnabled)),c.addInsertMenuItems(b,e,["formatSql","-","fromText","plantUml","mermaid"]))})));this.put("extras",new Menu(mxUtils.bind(this,
+new Menu(mxUtils.bind(this,function(b,d){c.menus.addInsertTableCellItem(b,d)})));var m=this.get("importFrom");this.put("importFrom",new Menu(mxUtils.bind(this,function(b,e){m.funct(b,e);this.addMenuItems(b,["editDiagram"],e);"1"==urlParams.sketch&&(b.addSeparator(e),b.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},e,null,mxUtils.bind(d,d.isEnabled)),c.addInsertMenuItems(b,e,["formatSql","-","fromText","plantUml","mermaid"]))})));this.put("extras",new Menu(mxUtils.bind(this,
function(b,d){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",b,d);null!=l&&c.menus.addSubmenu("language",b,d);c.menus.addSubmenu("units",b,d);b.addSeparator(d);c.menus.addMenuItems(b,"scrollbars tooltips ruler - copyConnect collapseExpand -".split(" "),d);"1"==urlParams.sketch&&this.addMenuItems(b,["toggleSketchMode"],d);this.addMenuItems(b,["toggleDarkMode"],d);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(b,["-","showStartScreen","search","scratchpad"],d);
"1"==urlParams.sketch&&this.addMenuItems(b,["togglePagesVisible"],d);b.addSeparator(d);c.menus.addMenuItem(b,"configuration",d);!c.isOfflineApp()&&isLocalStorage&&c.menus.addMenuItem(b,"plugins",d);this.addMenuItems(b,["-","fullscreen"],d);b.addSeparator(d)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,d){c.menus.addMenuItems(b,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),d)})));mxUtils.bind(this,function(){var b=this.get("insert"),
-d=b.funct;b.funct=function(b,e){"1"==urlParams.sketch?(c.menus.addMenuItems(b,["insertFreehand"],e),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(b,["insertTemplate"],e)):(d.apply(this,arguments),c.menus.addSubmenu("table",b,e),b.addSeparator(e));c.menus.addMenuItems(b,["-","toggleShapes"],e)}})();var m="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,d,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(c,
-e,f);c.showDialog(b.container,620,420,!0,!1);b.init()}),d)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<m.length;d++)"-"==m[d]?b.addSeparator(c):p(b,c,mxResources.get(m[d])+"...",m[d])})))};EditorUi.prototype.installFormatToolbar=function(b){var c=this.editor.graph,d=document.createElement("div");d.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
-c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var z=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(b,c,d){var e=m.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";f.style.display=
-"inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));m.menus.menuCreated(e,f,"geMenuItem");null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+
+d=b.funct;b.funct=function(b,e){"1"==urlParams.sketch?(c.menus.addMenuItems(b,["insertFreehand"],e),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(b,["insertTemplate"],e)):(d.apply(this,arguments),c.menus.addSubmenu("table",b,e),b.addSeparator(e));c.menus.addMenuItems(b,["-","toggleShapes"],e)}})();var n="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),p=function(b,d,e,f){b.addItem(e,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(c,
+e,f);c.showDialog(b.container,620,420,!0,!1);b.init()}),d)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(b,c){for(var d=0;d<n.length;d++)"-"==n[d]?b.addSeparator(c):p(b,c,mxResources.get(n[d])+"...",n[d])})))};EditorUi.prototype.installFormatToolbar=function(b){var c=this.editor.graph,d=document.createElement("div");d.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(e,f){0<c.getSelectionCount()?(b.appendChild(d),d.innerHTML="Selected: "+c.getSelectionCount()):null!=d.parentNode&&d.parentNode.removeChild(d)}))};var z=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(b,c,d){var e=n.menus.get(b),f=u.addMenu(mxResources.get(b),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}),t);f.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";f.style.display=
+"inline-block";f.style.boxSizing="border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.style.cursor="pointer";f.setAttribute("title",mxResources.get(b));n.menus.menuCreated(e,f,"geMenuItem");null!=d?(f.style.backgroundImage="url("+d+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML=""):c||(f.style.backgroundImage="url("+
mxWindow.prototype.normalizeImage+")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function f(b,c,d,e,f,g){var k=document.createElement("a");k.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";k.style.display="inline-block";k.style.boxSizing="border-box";k.style.height="30px";k.style.padding="6px";k.style.position="relative";k.style.verticalAlign="top";k.style.top="0px";"1"==urlParams.sketch&&(k.style.borderStyle=
-"none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=m.statusContainer?q.insertBefore(k,m.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(k,"click",
+"none",k.style.boxShadow="none",k.style.padding="6px",k.style.margin="0px");null!=n.statusContainer?q.insertBefore(k,n.statusContainer):q.appendChild(k);null!=g?(k.style.backgroundImage="url("+g+")",k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",k.style.width="34px"):mxUtils.write(k,b);mxEvent.addListener(k,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(k,"click",
function(b){"disabled"!=k.getAttribute("disabled")&&c(b);mxEvent.consume(b)});null==d&&(k.style.marginRight="4px");null!=e&&k.setAttribute("title",e);null!=f&&(b=function(){f.isEnabled()?(k.removeAttribute("disabled"),k.style.cursor="pointer"):(k.setAttribute("disabled","disabled"),k.style.cursor="default")},f.addListener("stateChanged",b),p.addListener("enabledChanged",b),b());return k}function g(b,c,d){d=document.createElement("div");d.className="geMenuItem";d.style.display="inline-block";d.style.verticalAlign=
-"top";d.style.marginRight="6px";d.style.padding="0 4px 0 4px";d.style.height="30px";d.style.position="relative";d.style.top="0px";"1"==urlParams.sketch&&(d.style.boxShadow="none");for(var e=0;e<b.length;e++)null!=b[e]&&("1"==urlParams.sketch&&(b[e].style.padding="10px 8px",b[e].style.width="30px"),b[e].style.margin="0px",b[e].style.boxShadow="none",d.appendChild(b[e]));null!=c&&mxUtils.setOpacity(d,c);null!=m.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,m.statusContainer):q.appendChild(d);
-return d}function k(){for(var b=q.firstChild;null!=b;){var e=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=e}t=q.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>d||"1"==urlParams.sketch,k=null;b||(k=c("diagram"));"1"==urlParams.sketch?Y.style.left=58>O.offsetTop-O.offsetHeight/2?"70px":"10px":(e=b?c("diagram",null,Editor.drawLogoImage):null,null!=e&&(k=e),g([k,f(mxResources.get("shapes"),m.actions.get("toggleShapes").funct,
-null,mxResources.get("shapes"),m.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),m.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+m.actions.get("formatPanel").shortcut+")",m.actions.get("image"),b?Editor.formatImage:null)],b?60:null),e=c("insert",!0,b?T:null),g([e,f(mxResources.get("delete"),m.actions.get("delete").funct,null,mxResources.get("delete"),m.actions.get("delete"),b?Editor.trashImage:null)],b?60:null),411<=d&&(g([V,na],60),520<=d&&g([ua,
-640<=d?f("",N.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",N,Editor.zoomInImage):null,640<=d?f("",ma.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ma,Editor.zoomOutImage):null],60)));null!=k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&m.appIconClicked(b)}),null,null));e=m.menus.get("language");null!=
+"top";d.style.marginRight="6px";d.style.padding="0 4px 0 4px";d.style.height="30px";d.style.position="relative";d.style.top="0px";"1"==urlParams.sketch&&(d.style.boxShadow="none");for(var e=0;e<b.length;e++)null!=b[e]&&("1"==urlParams.sketch&&(b[e].style.padding="10px 8px",b[e].style.width="30px"),b[e].style.margin="0px",b[e].style.boxShadow="none",d.appendChild(b[e]));null!=c&&mxUtils.setOpacity(d,c);null!=n.statusContainer&&"1"!=urlParams.sketch?q.insertBefore(d,n.statusContainer):q.appendChild(d);
+return d}function k(){for(var b=q.firstChild;null!=b;){var e=b.nextSibling;"geMenuItem"!=b.className&&"geItem"!=b.className||b.parentNode.removeChild(b);b=e}t=q.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var b=1E3>d||"1"==urlParams.sketch,k=null;b||(k=c("diagram"));"1"==urlParams.sketch?Y.style.left=58>O.offsetTop-O.offsetHeight/2?"70px":"10px":(e=b?c("diagram",null,Editor.drawLogoImage):null,null!=e&&(k=e),g([k,f(mxResources.get("shapes"),n.actions.get("toggleShapes").funct,
+null,mxResources.get("shapes"),n.actions.get("image"),b?Editor.shapesImage:null),f(mxResources.get("format"),n.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+n.actions.get("formatPanel").shortcut+")",n.actions.get("image"),b?Editor.formatImage:null)],b?60:null),e=c("insert",!0,b?T:null),g([e,f(mxResources.get("delete"),n.actions.get("delete").funct,null,mxResources.get("delete"),n.actions.get("delete"),b?Editor.trashImage:null)],b?60:null),411<=d&&(g([V,na],60),520<=d&&g([ua,
+640<=d?f("",N.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",N,Editor.zoomInImage):null,640<=d?f("",ma.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ma,Editor.zoomOutImage):null],60)));null!=k&&(mxEvent.disableContextMenu(k),mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&n.appIconClicked(b)}),null,null));e=n.menus.get("language");null!=
e&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==ia&&(e=u.addMenu("",e.funct),e.setAttribute("title",mxResources.get("language")),e.className="geToolbarButton",e.style.backgroundImage="url("+Editor.globeImage+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.position="absolute",e.style.height="24px",e.style.width="24px",e.style.zIndex="1",e.style.right="8px",e.style.cursor="pointer",
-e.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(e),ia=e),m.buttonContainer.style.paddingRight="34px"):(m.buttonContainer.style.paddingRight="4px",null!=ia&&(ia.parentNode.removeChild(ia),ia=null))}z.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:mxSettings.settings.darkMode);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom=
+e.style.top="1"==urlParams.embed?"12px":"11px",q.appendChild(e),ia=e),n.buttonContainer.style.paddingRight="34px"):(n.buttonContainer.style.paddingRight="4px",null!=ia&&(ia.parentNode.removeChild(ia),ia=null))}z.apply(this,arguments);this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:mxSettings.settings.darkMode);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom=
"1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(l);"1"==urlParams.sketch&&this.toggleScratchpad();if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])e(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));this.keyHandler.bindAction(75,!0,"toggleShapes",!0);if("1"==
-urlParams.sketch||1E3<=d)if(b(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);var n=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){n.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(b){mxEvent.getSource(b)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var m=this,p=m.editor.graph;m.toolbar=this.createToolbar(m.createDiv("geToolbar"));m.defaultLibraryName=mxResources.get("untitledLibrary");var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(m,q);m.statusContainer=m.createStatusContainer();
-m.statusContainer.style.position="relative";m.statusContainer.style.maxWidth="";m.statusContainer.style.marginTop="7px";m.statusContainer.style.marginLeft="6px";m.statusContainer.style.color="gray";m.statusContainer.style.cursor="default";var v=m.hideCurrentMenu;m.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=m.descriptorChanged;m.descriptorChanged=function(){x.apply(this,arguments);var b=m.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=
-b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==c?c="gitLab":"onedrive"==c&&(c="oneDrive");c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};m.setStatusText(m.editor.getStatus());q.appendChild(m.statusContainer);m.buttonContainer=document.createElement("div");m.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
-q.appendChild(m.buttonContainer);m.menubarContainer=m.buttonContainer;m.tabContainer=document.createElement("div");m.tabContainer.className="geTabContainer";m.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=m.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";m.diagramContainer.style.top="1"==urlParams.sketch?
-"0px":"47px";var I=m.menus.get("viewZoom"),T="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,R="1"==urlParams.sketch?document.createElement("div"):null,O="1"==urlParams.sketch?document.createElement("div"):null,Y="1"==urlParams.sketch?document.createElement("div"):null,aa=mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&
-(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.view.validateBackground()});m.addListener("darkModeChanged",aa);m.addListener("sketchModeChanged",aa);Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=m.hoverIcons){var ga=m.hoverIcons.update;m.hoverIcons.update=function(){p.freehand.isDrawing()||
-ga.apply(this,arguments)}}if(null!=p.freehand){var ca=p.freehand.createStyle;p.freehand.createStyle=function(b){return ca.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){O.className="geToolbarContainer";R.className="geToolbarContainer";Y.className="geToolbarContainer";q.className="geToolbarContainer";m.picker=O;var ea=!1;mxEvent.addListener(q,"mouseenter",function(){m.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){ea||(m.statusContainer.style.display=
-"none")});var la=mxUtils.bind(this,function(b){null!=m.notificationBtn&&(null!=b?m.notificationBtn.setAttribute("title",b):m.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&(q.style.visibility=14>q.clientWidth?"hidden":"",m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus());if(0==m.statusContainer.children.length||1==m.statusContainer.children.length&&null==m.statusContainer.firstChild.getAttribute("class")){var b=null!=m.statusContainer.firstChild?
-m.statusContainer.firstChild.getAttribute("title"):m.editor.getStatus();la(b);var c=m.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?(m.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(c))+'..."src="'+Editor.tailSpin+'">',m.statusContainer.style.display="inline-block",ea=!0):6<m.buttonContainer.clientWidth&&(m.statusContainer.style.display="none",ea=!1)}else m.statusContainer.style.display="inline-block",la(null),
-ea=!0;q.style.visibility=12<q.clientWidth?"":"hidden"})));U=c("diagram",null,Editor.menuImage);U.style.boxShadow="none";U.style.padding="6px";U.style.margin="0px";Y.appendChild(U);mxEvent.disableContextMenu(U);mxEvent.addGestureListeners(U,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);m.statusContainer.style.position="";m.statusContainer.style.display="none";
-m.statusContainer.style.margin="0px";m.statusContainer.style.padding="6px 0px";m.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";m.statusContainer.style.display="inline-block";m.statusContainer.style.textOverflow="ellipsis";m.buttonContainer.style.position="";m.buttonContainer.style.paddingRight="0px";m.buttonContainer.style.display="inline-block";var W=document.createElement("a");W.style.padding="0px";W.style.boxShadow="none";W.className="geMenuItem";W.style.display="inline-block";W.style.width=
-"40px";W.style.height="12px";W.style.marginBottom="-2px";W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";W.style.backgroundPosition="top center";W.style.backgroundRepeat="no-repeat";W.setAttribute("title","Minimize");var fa=!1,X=mxUtils.bind(this,function(){O.innerHTML="";if(!fa){var b=function(b,c,e){b=f("",b.funct,null,c,b,e);b.style.width="40px";b.style.opacity="0.7";return d(b,null,"pointer")},d=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";
-b.style.margin="2px 0px";O.appendChild(b);mxUtils.br(O);return b};d(m.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!0,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");d(m.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));d(m.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");d(m.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;d(m.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,
-20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=d(m.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(m.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var e=m.actions.get("toggleShapes");b(e,mxResources.get("shapes")+" ("+e.shortcut+
-")",T);U=c("table",null,Editor.tableImage);U.style.boxShadow="none";U.style.opacity="0.7";U.style.padding="6px";U.style.margin="0px";U.style.width="37px";d(U,null,"pointer");b(m.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}O.appendChild(W)});mxEvent.addListener(W,"click",mxUtils.bind(this,function(){fa?(mxUtils.setPrefixedStyle(O.style,"transform","translate(0, -50%)"),O.style.padding="8px 6px 4px",O.style.top="50%",O.style.bottom="",O.style.height="",W.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")",W.style.width="40px",W.style.height="12px",W.setAttribute("title","Minimize"),fa=!1,X()):(O.innerHTML="",O.appendChild(W),mxUtils.setPrefixedStyle(O.style,"transform","translate(0, 0)"),O.style.top="",O.style.bottom="12px",O.style.padding="0px",O.style.height="24px",W.style.height="24px",W.style.backgroundImage="url("+Editor.plusImage+")",W.setAttribute("title",mxResources.get("insert")),W.style.width="24px",fa=!0)}));X();m.addListener("darkModeChanged",
-X);m.addListener("sketchModeChanged",X)}else m.editor.addListener("statusChanged",mxUtils.bind(this,function(){m.setStatusText(m.editor.getStatus())}));if(null!=I){var aa=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?m.actions.get("customZoom").funct():m.actions.get("smartFit").funct()},N=m.actions.get("zoomIn"),ma=m.actions.get("zoomOut"),Q=m.actions.get("resetView"),ba=m.actions.get("fullscreen");m.actions.get("toggleDarkMode");var oa=m.actions.get("undo"),ka=m.actions.get("redo"),
-V=f("",oa.funct,null,mxResources.get("undo")+" ("+oa.shortcut+")",oa,Editor.undoImage),na=f("",ka.funct,null,mxResources.get("redo")+" ("+ka.shortcut+")",ka,Editor.redoImage);if(null!=R){var I=function(){da.style.display="1"==urlParams.pages||null!=m.pages&&1<m.pages.length||Editor.pagesVisible?"inline-block":"none"},Z=m.actions.get("delete"),ha=f("",Z.funct,null,mxResources.get("delete"),Z,Editor.trashImage);ha.style.opacity="0.1";Y.appendChild(ha);Z.addListener("stateChanged",function(){ha.style.opacity=
-Z.enabled?"":"0.1"});Q=function(){V.style.display=0<m.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";na.style.display=V.style.display;V.style.opacity=oa.enabled?"":"0.1";na.style.opacity=ka.enabled?"":"0.1"};Y.appendChild(V);Y.appendChild(na);oa.addListener("stateChanged",Q);ka.addListener("stateChanged",Q);Q();null!=urlParams.layers&&(Q=m.actions.get("layers"),Q=f("",Q.funct,null,mxResources.get("layers"),Q,Editor.layersImage),Q.style.opacity="0.4",R.appendChild(Q));null!=
-urlParams.tags&&(Q=m.actions.get("tags"),Q=f("",Q.funct,null,mxResources.get("tags"),Q,Editor.tagsImage),Q.style.opacity="0.4",R.appendChild(Q));Q=m.actions.get("outline");Q=f("",Q.funct,null,mxResources.get("outline"),Q,Editor.outlineImage);R.appendChild(Q);Q=f("",ma.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ma,Editor.zoomOutImage);R.appendChild(Q);var U=document.createElement("div");U.innerHTML="100%";U.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+
+urlParams.sketch||1E3<=d)if(b(this,!0),"1"==urlParams.sketch){this.formatWindow.window.setClosable(!1);var m=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){m.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};
+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(b){mxEvent.getSource(b)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.toggleMinimized()}var n=this,p=n.editor.graph;n.toolbar=this.createToolbar(n.createDiv("geToolbar"));n.defaultLibraryName=mxResources.get("untitledLibrary");var q=document.createElement("div");q.className="geMenubarContainer";var t=null,u=new Menubar(n,q);n.statusContainer=n.createStatusContainer();
+n.statusContainer.style.position="relative";n.statusContainer.style.maxWidth="";n.statusContainer.style.marginTop="7px";n.statusContainer.style.marginLeft="6px";n.statusContainer.style.color="gray";n.statusContainer.style.cursor="default";var v=n.hideCurrentMenu;n.hideCurrentMenu=function(){v.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var x=n.descriptorChanged;n.descriptorChanged=function(){x.apply(this,arguments);var b=n.getCurrentFile();if(null!=b&&null!=b.getTitle()){var c=
+b.getMode();"google"==c?c="googleDrive":"github"==c?c="gitHub":"gitlab"==c?c="gitLab":"onedrive"==c&&(c="oneDrive");c=mxResources.get(c);q.setAttribute("title",b.getTitle()+(null!=c?" ("+c+")":""))}else q.removeAttribute("title")};n.setStatusText(n.editor.getStatus());q.appendChild(n.statusContainer);n.buttonContainer=document.createElement("div");n.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
+q.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabContainer=document.createElement("div");n.tabContainer.className="geTabContainer";n.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";var l=n.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";n.diagramContainer.style.top="1"==urlParams.sketch?
+"0px":"47px";var I=n.menus.get("viewZoom"),T="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,R="1"==urlParams.sketch?document.createElement("div"):null,O="1"==urlParams.sketch?document.createElement("div"):null,Y="1"==urlParams.sketch?document.createElement("div"):null,aa=mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&
+(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.view.validateBackground()});n.addListener("darkModeChanged",aa);n.addListener("sketchModeChanged",aa);Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=n.hoverIcons){var ga=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||
+ga.apply(this,arguments)}}if(null!=p.freehand){var ca=p.freehand.createStyle;p.freehand.createStyle=function(b){return ca.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){O.className="geToolbarContainer";R.className="geToolbarContainer";Y.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=O;var ea=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){ea||(n.statusContainer.style.display=
+"none")});var la=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&(q.style.visibility=14>q.clientWidth?"hidden":"",n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&"function"===typeof n.statusContainer.firstChild.getAttribute&&null==n.statusContainer.firstChild.getAttribute("class")){var b=
+null!=n.statusContainer.firstChild?n.statusContainer.firstChild.getAttribute("title"):n.editor.getStatus();la(b);var c=n.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(c))+'..."src="'+Editor.tailSpin+'">',n.statusContainer.style.display="inline-block",ea=!0):6<n.buttonContainer.clientWidth&&(n.statusContainer.style.display="none",ea=!1)}else n.statusContainer.style.display=
+"inline-block",la(null),ea=!0;q.style.visibility=12<q.clientWidth?"":"hidden"})));U=c("diagram",null,Editor.menuImage);U.style.boxShadow="none";U.style.padding="6px";U.style.margin="0px";Y.appendChild(U);mxEvent.disableContextMenu(U);mxEvent.addGestureListeners(U,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position="";n.statusContainer.style.display=
+"none";n.statusContainer.style.margin="0px";n.statusContainer.style.padding="6px 0px";n.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";n.statusContainer.style.display="inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var W=document.createElement("a");W.style.padding="0px";W.style.boxShadow="none";W.className="geMenuItem";W.style.display="inline-block";
+W.style.width="40px";W.style.height="12px";W.style.marginBottom="-2px";W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";W.style.backgroundPosition="top center";W.style.backgroundRepeat="no-repeat";W.setAttribute("title","Minimize");var fa=!1,X=mxUtils.bind(this,function(){O.innerHTML="";if(!fa){var b=function(b,c,e){b=f("",b.funct,null,c,b,e);b.style.width="40px";b.style.opacity="0.7";return d(b,null,"pointer")},d=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=
+null!=d?d:"default";b.style.margin="2px 0px";O.appendChild(b);mxUtils.br(O);return b};d(n.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!0,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");d(n.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));d(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");d(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;d(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,
+20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=d(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var e=n.actions.get("toggleShapes");b(e,mxResources.get("shapes")+" ("+e.shortcut+
+")",T);U=c("table",null,Editor.tableImage);U.style.boxShadow="none";U.style.opacity="0.7";U.style.padding="6px";U.style.margin="0px";U.style.width="37px";d(U,null,"pointer");b(n.actions.get("insertTemplate"),mxResources.get("template"),Editor.templateImage)}O.appendChild(W)});mxEvent.addListener(W,"click",mxUtils.bind(this,function(){fa?(mxUtils.setPrefixedStyle(O.style,"transform","translate(0, -50%)"),O.style.padding="8px 6px 4px",O.style.top="50%",O.style.bottom="",O.style.height="",W.style.backgroundImage=
+"url("+mxWindow.prototype.normalizeImage+")",W.style.width="40px",W.style.height="12px",W.setAttribute("title","Minimize"),fa=!1,X()):(O.innerHTML="",O.appendChild(W),mxUtils.setPrefixedStyle(O.style,"transform","translate(0, 0)"),O.style.top="",O.style.bottom="12px",O.style.padding="0px",O.style.height="24px",W.style.height="24px",W.style.backgroundImage="url("+Editor.plusImage+")",W.setAttribute("title",mxResources.get("insert")),W.style.width="24px",fa=!0)}));X();n.addListener("darkModeChanged",
+X);n.addListener("sketchModeChanged",X)}else n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus())}));if(null!=I){var aa=function(b){p.popupMenuHandler.hideMenu();mxEvent.isAltDown(b)?n.actions.get("customZoom").funct():n.actions.get("smartFit").funct()},N=n.actions.get("zoomIn"),ma=n.actions.get("zoomOut"),Q=n.actions.get("resetView"),ba=n.actions.get("fullscreen");n.actions.get("toggleDarkMode");var oa=n.actions.get("undo"),ka=n.actions.get("redo"),
+V=f("",oa.funct,null,mxResources.get("undo")+" ("+oa.shortcut+")",oa,Editor.undoImage),na=f("",ka.funct,null,mxResources.get("redo")+" ("+ka.shortcut+")",ka,Editor.redoImage);if(null!=R){var I=function(){da.style.display="1"==urlParams.pages||null!=n.pages&&1<n.pages.length||Editor.pagesVisible?"inline-block":"none"},Z=n.actions.get("delete"),ha=f("",Z.funct,null,mxResources.get("delete"),Z,Editor.trashImage);ha.style.opacity="0.1";Y.appendChild(ha);Z.addListener("stateChanged",function(){ha.style.opacity=
+Z.enabled?"":"0.1"});Q=function(){V.style.display=0<n.editor.undoManager.history.length||p.isEditing()?"inline-block":"none";na.style.display=V.style.display;V.style.opacity=oa.enabled?"":"0.1";na.style.opacity=ka.enabled?"":"0.1"};Y.appendChild(V);Y.appendChild(na);oa.addListener("stateChanged",Q);ka.addListener("stateChanged",Q);Q();null!=urlParams.layers&&(Q=n.actions.get("layers"),Q=f("",Q.funct,null,mxResources.get("layers"),Q,Editor.layersImage),Q.style.opacity="0.4",R.appendChild(Q));null!=
+urlParams.tags&&(Q=n.actions.get("tags"),Q=f("",Q.funct,null,mxResources.get("tags"),Q,Editor.tagsImage),Q.style.opacity="0.4",R.appendChild(Q));Q=n.actions.get("outline");Q=f("",Q.funct,null,mxResources.get("outline"),Q,Editor.outlineImage);R.appendChild(Q);Q=f("",ma.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ma,Editor.zoomOutImage);R.appendChild(Q);var U=document.createElement("div");U.innerHTML="100%";U.setAttribute("title",mxResources.get("fitWindow")+"/"+mxResources.get("resetView")+
" (Enter)");U.style.display="inline-block";U.style.cursor="pointer";U.style.textAlign="center";U.style.whiteSpace="nowrap";U.style.paddingRight="10px";U.style.textDecoration="none";U.style.verticalAlign="top";U.style.padding="6px 0";U.style.fontSize="14px";U.style.width="40px";U.style.opacity="0.4";R.appendChild(U);mxEvent.addListener(U,"click",aa);aa=f("",N.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",N,Editor.zoomInImage);R.appendChild(aa);var da=this.createPageMenuTab(!1);
-da.style.display="none";da.style.position="";da.style.marginLeft="";da.style.top="";da.style.left="";da.style.height="100%";da.style.lineHeight="";da.style.borderStyle="none";da.style.padding="3px 0";da.style.margin="0px";da.style.background="";da.style.border="";da.style.boxShadow="none";da.style.verticalAlign="top";da.firstChild.style.height="100%";da.firstChild.style.opacity="0.6";da.firstChild.style.margin="0px";R.appendChild(da);m.addListener("fileDescriptorChanged",I);m.addListener("pagesVisibleChanged",
-I);I();m.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Y.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+da.style.display="none";da.style.position="";da.style.marginLeft="";da.style.top="";da.style.left="";da.style.height="100%";da.style.lineHeight="";da.style.borderStyle="none";da.style.padding="3px 0";da.style.margin="0px";da.style.background="";da.style.border="";da.style.boxShadow="none";da.style.verticalAlign="top";da.firstChild.style.height="100%";da.firstChild.style.opacity="0.6";da.firstChild.style.margin="0px";R.appendChild(da);n.addListener("fileDescriptorChanged",I);n.addListener("pagesVisibleChanged",
+I);I();n.tabContainer.style.visibility="hidden";q.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Y.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
R.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";A.appendChild(Y);A.appendChild(R);O.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";A.appendChild(O);window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,
"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(A)}else{f("",ba.funct,null,mxResources.get("fullscreen"),ba,Editor.fullscreenImage);var ua=f("",aa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Q,Editor.zoomFitImage);q.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";U=u.addMenu("100%",I.funct);U.setAttribute("title",mxResources.get("zoom")+
-" (Alt+Mousewheel)");U.style.whiteSpace="nowrap";U.style.paddingRight="10px";U.style.textDecoration="none";U.style.textDecoration="none";U.style.overflow="hidden";U.style.visibility="hidden";U.style.textAlign="center";U.style.cursor="pointer";U.style.height=parseInt(m.tabContainerHeight)-1+"px";U.style.lineHeight=parseInt(m.tabContainerHeight)+1+"px";U.style.position="absolute";U.style.display="block";U.style.fontSize="12px";U.style.width="59px";U.style.right="0px";U.style.bottom="0px";U.style.backgroundImage=
-"url("+mxWindow.prototype.minimizeImage+")";U.style.backgroundPosition="right 6px center";U.style.backgroundRepeat="no-repeat";A.appendChild(U)}(function(b){var c=mxUtils.bind(this,function(){b.innerHTML=Math.round(100*m.editor.graph.view.scale)+"%"});m.editor.graph.view.addListener(mxEvent.EVENT_SCALE,c);m.editor.addListener("resetGraphView",c);m.editor.addListener("pageSelected",c)})(U);var ja=m.setGraphEnabled;m.setGraphEnabled=function(){ja.apply(this,arguments);null!=this.tabContainer&&(U.style.visibility=
-this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==R?this.tabContainerHeight+"px":"0px")}}A.appendChild(q);A.appendChild(m.diagramContainer);l.appendChild(A);m.updateTabContainer();null==R&&A.appendChild(m.tabContainer);var ia=null;k();mxEvent.addListener(window,"resize",function(){k();null!=m.sidebarWindow&&m.sidebarWindow.window.fit();null!=m.formatWindow&&m.formatWindow.window.fit();null!=m.actions.outlineWindow&&m.actions.outlineWindow.window.fit();
-null!=m.actions.layersWindow&&m.actions.layersWindow.window.fit();null!=m.menus.tagsWindow&&m.menus.tagsWindow.window.fit();null!=m.menus.findWindow&&m.menus.findWindow.window.fit();null!=m.menus.findReplaceWindow&&m.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,d,e,n){var f=d.y,g=d.x,k=!1,p=!1;if(null!=this.states&&null!=c&&null!=d){var q=this,t=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);t.x=c.x+g;t.y=c.y+f;t.width=c.width;t.height=c.height;for(var x=[],A=[],z=0;z<this.states.length;z++){var y=this.states[z];y instanceof mxCellState&&(n||!this.graph.isCellSelected(y.cell))&&((t.x>=y.x&&t.x<=y.x+y.width||y.x>=t.x&&y.x<=t.x+t.width)&&(t.y>
-y.y+y.height+4||t.y+t.height+4<y.y)?x.push(y):(t.y>=y.y&&t.y<=y.y+y.height||y.y>=t.y&&y.y<=t.y+t.height)&&(t.x>y.x+y.width+4||t.x+t.width+4<y.x)&&A.push(y))}var B=0,C=0,D=y=0,E=0,G=0,F=0,J=0,L=5*u;if(1<x.length){x.push(t);x.sort(function(b,c){return b.y-c.y});var H=!1,z=t==x[0],u=t==x[x.length-1];if(!z&&!u)for(z=1;z<x.length-1;z++)if(t==x[z]){u=x[z-1];z=x[z+1];y=C=D=(z.y-u.y-u.height-t.height)/2;break}for(z=0;z<x.length-1;z++){var u=x[z],M=x[z+1],P=t==u||t==M,M=M.y-u.y-u.height,H=H|t==u;if(0==C&&
-0==B)C=M,B=1;else if(Math.abs(C-M)<=(P||1==z&&H?v:0))B+=1;else if(1<B&&H){x=x.slice(0,z+1);break}else if(3<=x.length-z&&!H)B=0,y=C=0!=D?D:0,x.splice(0,0==z?1:z),z=-1;else break;0!=y||P||(C=y=M)}3==x.length&&x[1]==t&&(y=0)}if(1<A.length){A.push(t);A.sort(function(b,c){return b.x-c.x});H=!1;z=t==A[0];u=t==A[A.length-1];if(!z&&!u)for(z=1;z<A.length-1;z++)if(t==A[z]){u=A[z-1];z=A[z+1];F=G=J=(z.x-u.x-u.width-t.width)/2;break}for(z=0;z<A.length-1;z++){u=A[z];M=A[z+1];P=t==u||t==M;M=M.x-u.x-u.width;H|=t==
-u;if(0==G&&0==E)G=M,E=1;else if(Math.abs(G-M)<=(P||1==z&&H?v:0))E+=1;else if(1<E&&H){A=A.slice(0,z+1);break}else if(3<=A.length-z&&!H)E=0,F=G=0!=J?J:0,A.splice(0,0==z?1:z),z=-1;else break;0!=F||P||(G=F=M)}3==A.length&&A[1]==t&&(F=0)}v=function(b,c,d,e){var f=[],g;e?(e=L,g=0):(e=0,g=L);f.push(new mxPoint(b.x-e,b.y-g));f.push(new mxPoint(b.x+e,b.y+g));f.push(b);f.push(c);f.push(new mxPoint(c.x-e,c.y-g));f.push(new mxPoint(c.x+e,c.y+g));if(null!=d)return d.points=f,d;b=new mxPolyline(f,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);b.dialect=mxConstants.DIALECT_SVG;b.pointerEvents=!1;b.init(q.graph.getView().getOverlayPane());return b};G=function(b,c){if(b&&null!=q.guidesArrHor)for(var d=0;d<q.guidesArrHor.length;d++)q.guidesArrHor[d].node.style.visibility="hidden";if(c&&null!=q.guidesArrVer)for(d=0;d<q.guidesArrVer.length;d++)q.guidesArrVer[d].node.style.visibility="hidden"};if(1<E&&E==A.length-1){E=[];J=q.guidesArrHor;k=[];g=0;z=A[0]==t?1:0;H=A[z].y+A[z].height;if(0<F)for(z=0;z<A.length-1;z++)u=
-A[z],M=A[z+1],t==u?(g=M.x-u.width-F,k.push(new mxPoint(g+u.width+L,H)),k.push(new mxPoint(M.x-L,H))):t==M?(k.push(new mxPoint(u.x+u.width+L,H)),g=u.x+u.width+F,k.push(new mxPoint(g-L,H))):(k.push(new mxPoint(u.x+u.width+L,H)),k.push(new mxPoint(M.x-L,H)));else u=A[0],z=A[2],g=u.x+u.width+(z.x-u.x-u.width-t.width)/2,k.push(new mxPoint(u.x+u.width+L,H)),k.push(new mxPoint(g-L,H)),k.push(new mxPoint(g+t.width+L,H)),k.push(new mxPoint(z.x-L,H));for(z=0;z<k.length;z+=2)A=k[z],F=k[z+1],A=v(A,F,null!=J?
-J[z/2]:null),A.node.style.visibility="visible",A.redraw(),E.push(A);for(z=k.length/2;null!=J&&z<J.length;z++)J[z].destroy();q.guidesArrHor=E;g-=c.x;k=!0}else G(!0);if(1<B&&B==x.length-1){E=[];J=q.guidesArrVer;p=[];f=0;z=x[0]==t?1:0;B=x[z].x+x[z].width;if(0<y)for(z=0;z<x.length-1;z++)u=x[z],M=x[z+1],t==u?(f=M.y-u.height-y,p.push(new mxPoint(B,f+u.height+L)),p.push(new mxPoint(B,M.y-L))):t==M?(p.push(new mxPoint(B,u.y+u.height+L)),f=u.y+u.height+y,p.push(new mxPoint(B,f-L))):(p.push(new mxPoint(B,u.y+
-u.height+L)),p.push(new mxPoint(B,M.y-L)));else u=x[0],z=x[2],f=u.y+u.height+(z.y-u.y-u.height-t.height)/2,p.push(new mxPoint(B,u.y+u.height+L)),p.push(new mxPoint(B,f-L)),p.push(new mxPoint(B,f+t.height+L)),p.push(new mxPoint(B,z.y-L));for(z=0;z<p.length;z+=2)A=p[z],F=p[z+1],A=v(A,F,null!=J?J[z/2]:null,!0),A.node.style.visibility="visible",A.redraw(),E.push(A);for(z=p.length/2;null!=J&&z<J.length;z++)J[z].destroy();q.guidesArrVer=E;f-=c.y;p=!0}else G(!1,!0)}if(k||p)return t=new mxPoint(g,f),x=b.call(this,
-c,t,e,n),k&&!p?t.y=x.y:p&&!k&&(t.x=x.x),x.y!=t.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),x.x!=t.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),t;G(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(b){e.call(this,b);var c=this.guidesArrVer,d=this.guidesArrHor;if(null!=c)for(var n=0;n<c.length;n++)c[n].node.style.visibility=b?"visible":"hidden";if(null!=
-d)for(n=0;n<d.length;n++)d[n].node.style.visibility=b?"visible":"hidden"};var d=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){d.call(this);var b=this.guidesArrVer,e=this.guidesArrHor;if(null!=b){for(var k=0;k<b.length;k++)b[k].destroy();this.guidesArrVer=null}if(null!=e){for(k=0;k<e.length;k++)e[k].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,d,c){function g(){var c=b.diagramContainer;q.style.top=c.offsetTop-l+"px";q.style.left=c.offsetLeft-l+"px";q.style.width=(d?0:c.offsetWidth)+l+"px";q.style.height=(d?c.offsetHeight:0)+l+"px"}function k(b,c,d){if(null!=n)return b;var e;return function(){var f=this,g=arguments,k=d&&!e;clearTimeout(e);e=setTimeout(function(){e=null;d||b.apply(f,g)},c);k&&b.apply(f,g)}}var n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
-f=window.cancelAnimationFrame||window.mozCancelAnimationFrame,l=this.RULER_THICKNESS,m=this;this.unit=e;var p=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},q=document.createElement("div");q.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){p=Editor.isDarkMode()?{bkgClr:"#202020",
-outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};q.style.background=p.bkgClr;q.style[d?"borderRight":"borderBottom"]="0.5px solid "+p.strokeClr;q.style.borderLeft="0.5px solid "+p.strokeClr});this.updateStyle();document.body.appendChild(q);mxEvent.disableContextMenu(q);this.editorUiRefresh=b.refresh;b.refresh=function(c){m.editorUiRefresh.apply(b,
-arguments);g()};g();var t=document.createElement("canvas");t.width=q.offsetWidth;t.height=q.offsetHeight;q.style.overflow="hidden";t.style.position="relative";q.appendChild(t);var u=t.getContext("2d");this.ui=b;var v=b.editor.graph;this.graph=v;this.container=q;this.canvas=t;var x=function(b,c,e,f,g){b=Math.round(b);c=Math.round(c);e=Math.round(e);f=Math.round(f);u.beginPath();u.moveTo(b+.5,c+.5);u.lineTo(e+.5,f+.5);u.stroke();g&&(d?(u.save(),u.translate(b,c),u.rotate(-Math.PI/2),u.fillText(g,0,0),
-u.restore()):u.fillText(g,b,c))},A=function(){u.clearRect(0,0,t.width,t.height);u.beginPath();u.lineWidth=.7;u.strokeStyle=p.strokeClr;u.setLineDash([]);u.font="9px Arial";u.textAlign="center";var b=v.view.scale,c=v.view.getBackgroundPageBounds(),e=v.view.translate,f=v.pageVisible,e=f?l+(d?c.y-v.container.scrollTop:c.x-v.container.scrollLeft):l+(d?e.y*b-v.container.scrollTop:e.x*b-v.container.scrollLeft),g=0;f&&(g=v.getPageLayout(),g=d?g.y*v.pageFormat.height:g.x*v.pageFormat.width);var k,n,q;switch(m.unit){case mxConstants.POINTS:k=
-q=10;n=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:q=10;k=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:q=.5>=b||4<=b?8:16,k=mxConstants.PIXELS_PER_INCH/q,n=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=k;2<=b?y=k/(2*Math.floor(b/2)):.5>=b&&(y=k*Math.floor(1/b/2)*(m.unit==mxConstants.MILLIMETERS?2:1));k=null;c=f?Math.min(e+(d?c.height:c.width),d?t.height:t.width):d?t.height:t.width;if(f)if(u.fillStyle=p.outBkgClr,d){var z=e-l;0<z&&u.fillRect(0,l,l,z);c<t.height&&
-u.fillRect(0,c,l,t.height)}else z=e-l,0<z&&u.fillRect(l,0,z,l),c<t.width&&u.fillRect(c,0,t.width,l);u.fillStyle=p.fontClr;for(f=f?e:e%(y*b);f<=c;f+=y*b)if(z=Math.round((f-e)/b/y),!(f<l||z==k)){k=z;var A=null;0==z%q&&(A=m.formatText(g+z*y)+"");d?x(l-n[Math.abs(z)%q],f,l,f,A):x(f,l-n[Math.abs(z)%q],f,l,A)}u.lineWidth=1;x(d?0:l,d?l:0,l,l);u.fillStyle=p.cornerClr;u.fillRect(0,0,l,l)},z=-1,y=function(){null!=n?(null!=f&&f(z),z=n(A)):A()};this.drawRuler=y;this.sizeListener=e=k(function(){var b=v.container;
-d?(b=b.offsetHeight+l,t.height!=b&&(t.height=b,q.style.height=b+"px",y())):(b=b.offsetWidth+l,t.width!=b&&(t.width=b,q.style.width=b+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=c=k(function(){var b=d?v.container.scrollTop:v.container.scrollLeft;m.lastScroll!=b&&(m.lastScroll=b,y())},10);this.unitListener=function(b,c){m.setUnit(c.getProperty("unit"))};v.addListener(mxEvent.SIZE,e);v.container.addEventListener("scroll",c);v.view.addListener("unitChanged",this.unitListener);
-b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(b){p=b;q.style.background=p.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,f){var g;if(d&&4<b.height||!d&&4<b.width){if(null!=m.guidePart)try{u.putImageData(m.guidePart.imgData1,m.guidePart.x1,m.guidePart.y1),u.putImageData(m.guidePart.imgData2,m.guidePart.x2,m.guidePart.y2),u.putImageData(m.guidePart.imgData3,
-m.guidePart.x3,m.guidePart.y3)}catch(T){}g=m.origGuideMove.apply(this,arguments);try{var k,n,q,t,v,y,z,A,B;u.lineWidth=.5;u.strokeStyle=p.guideClr;u.setLineDash([2]);d?(n=b.y+g.y+l-this.graph.container.scrollTop,k=0,v=n+b.height/2,t=l/2,A=n+b.height,z=0,q=u.getImageData(k,n-1,l,3),x(k,n,l,n),n--,y=u.getImageData(t,v-1,l,3),x(t,v,l,v),v--,B=u.getImageData(z,A-1,l,3),x(z,A,l,A),A--):(n=0,k=b.x+g.x+l-this.graph.container.scrollLeft,v=l/2,t=k+b.width/2,A=0,z=k+b.width,q=u.getImageData(k-1,n,3,l),x(k,
-n,k,l),k--,y=u.getImageData(t-1,v,3,l),x(t,v,t,l),t--,B=u.getImageData(z-1,A,3,l),x(z,A,z,l),z--);if(null==m.guidePart||m.guidePart.x1!=k||m.guidePart.y1!=n)m.guidePart={imgData1:q,x1:k,y1:n,imgData2:y,x2:t,y2:v,imgData3:B,x3:z,y3:A}}catch(T){}}else g=m.origGuideMove.apply(this,arguments);return g};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var b=m.origGuideDestroy.apply(this,arguments);if(null!=m.guidePart)try{u.putImageData(m.guidePart.imgData1,m.guidePart.x1,
-m.guidePart.y1),u.putImageData(m.guidePart.imgData2,m.guidePart.x2,m.guidePart.y2),u.putImageData(m.guidePart.imgData3,m.guidePart.x3,m.guidePart.y3),m.guidePart=null}catch(C){}return b}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
+" (Alt+Mousewheel)");U.style.whiteSpace="nowrap";U.style.paddingRight="10px";U.style.textDecoration="none";U.style.textDecoration="none";U.style.overflow="hidden";U.style.visibility="hidden";U.style.textAlign="center";U.style.cursor="pointer";U.style.height=parseInt(n.tabContainerHeight)-1+"px";U.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px";U.style.position="absolute";U.style.display="block";U.style.fontSize="12px";U.style.width="59px";U.style.right="0px";U.style.bottom="0px";U.style.backgroundImage=
+"url("+mxWindow.prototype.minimizeImage+")";U.style.backgroundPosition="right 6px center";U.style.backgroundRepeat="no-repeat";A.appendChild(U)}(function(b){var c=mxUtils.bind(this,function(){b.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,c);n.editor.addListener("resetGraphView",c);n.editor.addListener("pageSelected",c)})(U);var ja=n.setGraphEnabled;n.setGraphEnabled=function(){ja.apply(this,arguments);null!=this.tabContainer&&(U.style.visibility=
+this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==R?this.tabContainerHeight+"px":"0px")}}A.appendChild(q);A.appendChild(n.diagramContainer);l.appendChild(A);n.updateTabContainer();null==R&&A.appendChild(n.tabContainer);var ia=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();
+null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,d,e,m){var f=d.y,g=d.x,k=!1,p=!1;if(null!=this.states&&null!=c&&null!=d){var q=this,t=new mxCellState,u=this.graph.getView().scale,v=Math.max(2,this.getGuideTolerance()/2);t.x=c.x+g;t.y=c.y+f;t.width=c.width;t.height=c.height;for(var x=[],A=[],z=0;z<this.states.length;z++){var y=this.states[z];y instanceof mxCellState&&(m||!this.graph.isCellSelected(y.cell))&&((t.x>=y.x&&t.x<=y.x+y.width||y.x>=t.x&&y.x<=t.x+t.width)&&(t.y>
+y.y+y.height+4||t.y+t.height+4<y.y)?x.push(y):(t.y>=y.y&&t.y<=y.y+y.height||y.y>=t.y&&y.y<=t.y+t.height)&&(t.x>y.x+y.width+4||t.x+t.width+4<y.x)&&A.push(y))}var B=0,C=0,D=y=0,G=0,H=0,E=0,J=0,L=5*u;if(1<x.length){x.push(t);x.sort(function(b,c){return b.y-c.y});var F=!1,z=t==x[0],u=t==x[x.length-1];if(!z&&!u)for(z=1;z<x.length-1;z++)if(t==x[z]){u=x[z-1];z=x[z+1];y=C=D=(z.y-u.y-u.height-t.height)/2;break}for(z=0;z<x.length-1;z++){var u=x[z],M=x[z+1],P=t==u||t==M,M=M.y-u.y-u.height,F=F|t==u;if(0==C&&
+0==B)C=M,B=1;else if(Math.abs(C-M)<=(P||1==z&&F?v:0))B+=1;else if(1<B&&F){x=x.slice(0,z+1);break}else if(3<=x.length-z&&!F)B=0,y=C=0!=D?D:0,x.splice(0,0==z?1:z),z=-1;else break;0!=y||P||(C=y=M)}3==x.length&&x[1]==t&&(y=0)}if(1<A.length){A.push(t);A.sort(function(b,c){return b.x-c.x});F=!1;z=t==A[0];u=t==A[A.length-1];if(!z&&!u)for(z=1;z<A.length-1;z++)if(t==A[z]){u=A[z-1];z=A[z+1];E=H=J=(z.x-u.x-u.width-t.width)/2;break}for(z=0;z<A.length-1;z++){u=A[z];M=A[z+1];P=t==u||t==M;M=M.x-u.x-u.width;F|=t==
+u;if(0==H&&0==G)H=M,G=1;else if(Math.abs(H-M)<=(P||1==z&&F?v:0))G+=1;else if(1<G&&F){A=A.slice(0,z+1);break}else if(3<=A.length-z&&!F)G=0,E=H=0!=J?J:0,A.splice(0,0==z?1:z),z=-1;else break;0!=E||P||(H=E=M)}3==A.length&&A[1]==t&&(E=0)}v=function(b,c,d,e){var f=[],g;e?(e=L,g=0):(e=0,g=L);f.push(new mxPoint(b.x-e,b.y-g));f.push(new mxPoint(b.x+e,b.y+g));f.push(b);f.push(c);f.push(new mxPoint(c.x-e,c.y-g));f.push(new mxPoint(c.x+e,c.y+g));if(null!=d)return d.points=f,d;b=new mxPolyline(f,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);b.dialect=mxConstants.DIALECT_SVG;b.pointerEvents=!1;b.init(q.graph.getView().getOverlayPane());return b};H=function(b,c){if(b&&null!=q.guidesArrHor)for(var d=0;d<q.guidesArrHor.length;d++)q.guidesArrHor[d].node.style.visibility="hidden";if(c&&null!=q.guidesArrVer)for(d=0;d<q.guidesArrVer.length;d++)q.guidesArrVer[d].node.style.visibility="hidden"};if(1<G&&G==A.length-1){G=[];J=q.guidesArrHor;k=[];g=0;z=A[0]==t?1:0;F=A[z].y+A[z].height;if(0<E)for(z=0;z<A.length-1;z++)u=
+A[z],M=A[z+1],t==u?(g=M.x-u.width-E,k.push(new mxPoint(g+u.width+L,F)),k.push(new mxPoint(M.x-L,F))):t==M?(k.push(new mxPoint(u.x+u.width+L,F)),g=u.x+u.width+E,k.push(new mxPoint(g-L,F))):(k.push(new mxPoint(u.x+u.width+L,F)),k.push(new mxPoint(M.x-L,F)));else u=A[0],z=A[2],g=u.x+u.width+(z.x-u.x-u.width-t.width)/2,k.push(new mxPoint(u.x+u.width+L,F)),k.push(new mxPoint(g-L,F)),k.push(new mxPoint(g+t.width+L,F)),k.push(new mxPoint(z.x-L,F));for(z=0;z<k.length;z+=2)A=k[z],E=k[z+1],A=v(A,E,null!=J?
+J[z/2]:null),A.node.style.visibility="visible",A.redraw(),G.push(A);for(z=k.length/2;null!=J&&z<J.length;z++)J[z].destroy();q.guidesArrHor=G;g-=c.x;k=!0}else H(!0);if(1<B&&B==x.length-1){G=[];J=q.guidesArrVer;p=[];f=0;z=x[0]==t?1:0;B=x[z].x+x[z].width;if(0<y)for(z=0;z<x.length-1;z++)u=x[z],M=x[z+1],t==u?(f=M.y-u.height-y,p.push(new mxPoint(B,f+u.height+L)),p.push(new mxPoint(B,M.y-L))):t==M?(p.push(new mxPoint(B,u.y+u.height+L)),f=u.y+u.height+y,p.push(new mxPoint(B,f-L))):(p.push(new mxPoint(B,u.y+
+u.height+L)),p.push(new mxPoint(B,M.y-L)));else u=x[0],z=x[2],f=u.y+u.height+(z.y-u.y-u.height-t.height)/2,p.push(new mxPoint(B,u.y+u.height+L)),p.push(new mxPoint(B,f-L)),p.push(new mxPoint(B,f+t.height+L)),p.push(new mxPoint(B,z.y-L));for(z=0;z<p.length;z+=2)A=p[z],E=p[z+1],A=v(A,E,null!=J?J[z/2]:null,!0),A.node.style.visibility="visible",A.redraw(),G.push(A);for(z=p.length/2;null!=J&&z<J.length;z++)J[z].destroy();q.guidesArrVer=G;f-=c.y;p=!0}else H(!1,!0)}if(k||p)return t=new mxPoint(g,f),x=b.call(this,
+c,t,e,m),k&&!p?t.y=x.y:p&&!k&&(t.x=x.x),x.y!=t.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),x.x!=t.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),t;H(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(b){e.call(this,b);var c=this.guidesArrVer,d=this.guidesArrHor;if(null!=c)for(var m=0;m<c.length;m++)c[m].node.style.visibility=b?"visible":"hidden";if(null!=
+d)for(m=0;m<d.length;m++)d[m].node.style.visibility=b?"visible":"hidden"};var d=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){d.call(this);var b=this.guidesArrVer,e=this.guidesArrHor;if(null!=b){for(var g=0;g<b.length;g++)b[g].destroy();this.guidesArrVer=null}if(null!=e){for(g=0;g<e.length;g++)e[g].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,d,c){function k(){var c=b.diagramContainer;q.style.top=c.offsetTop-l+"px";q.style.left=c.offsetLeft-l+"px";q.style.width=(d?0:c.offsetWidth)+l+"px";q.style.height=(d?c.offsetHeight:0)+l+"px"}function g(b,c,d){if(null!=m)return b;var e;return function(){var f=this,g=arguments,k=d&&!e;clearTimeout(e);e=setTimeout(function(){e=null;d||b.apply(f,g)},c);k&&b.apply(f,g)}}var m=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+f=window.cancelAnimationFrame||window.mozCancelAnimationFrame,l=this.RULER_THICKNESS,n=this;this.unit=e;var p=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},q=document.createElement("div");q.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){p=Editor.isDarkMode()?{bkgClr:"#202020",
+outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};q.style.background=p.bkgClr;q.style[d?"borderRight":"borderBottom"]="0.5px solid "+p.strokeClr;q.style.borderLeft="0.5px solid "+p.strokeClr});this.updateStyle();document.body.appendChild(q);mxEvent.disableContextMenu(q);this.editorUiRefresh=b.refresh;b.refresh=function(c){n.editorUiRefresh.apply(b,
+arguments);k()};k();var t=document.createElement("canvas");t.width=q.offsetWidth;t.height=q.offsetHeight;q.style.overflow="hidden";t.style.position="relative";q.appendChild(t);var u=t.getContext("2d");this.ui=b;var v=b.editor.graph;this.graph=v;this.container=q;this.canvas=t;var x=function(b,c,e,f,g){b=Math.round(b);c=Math.round(c);e=Math.round(e);f=Math.round(f);u.beginPath();u.moveTo(b+.5,c+.5);u.lineTo(e+.5,f+.5);u.stroke();g&&(d?(u.save(),u.translate(b,c),u.rotate(-Math.PI/2),u.fillText(g,0,0),
+u.restore()):u.fillText(g,b,c))},A=function(){u.clearRect(0,0,t.width,t.height);u.beginPath();u.lineWidth=.7;u.strokeStyle=p.strokeClr;u.setLineDash([]);u.font="9px Arial";u.textAlign="center";var b=v.view.scale,c=v.view.getBackgroundPageBounds(),e=v.view.translate,f=v.pageVisible,e=f?l+(d?c.y-v.container.scrollTop:c.x-v.container.scrollLeft):l+(d?e.y*b-v.container.scrollTop:e.x*b-v.container.scrollLeft),g=0;f&&(g=v.getPageLayout(),g=d?g.y*v.pageFormat.height:g.x*v.pageFormat.width);var k,m,q;switch(n.unit){case mxConstants.POINTS:k=
+q=10;m=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:q=10;k=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:q=.5>=b||4<=b?8:16,k=mxConstants.PIXELS_PER_INCH/q,m=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=k;2<=b?y=k/(2*Math.floor(b/2)):.5>=b&&(y=k*Math.floor(1/b/2)*(n.unit==mxConstants.MILLIMETERS?2:1));k=null;c=f?Math.min(e+(d?c.height:c.width),d?t.height:t.width):d?t.height:t.width;if(f)if(u.fillStyle=p.outBkgClr,d){var z=e-l;0<z&&u.fillRect(0,l,l,z);c<t.height&&
+u.fillRect(0,c,l,t.height)}else z=e-l,0<z&&u.fillRect(l,0,z,l),c<t.width&&u.fillRect(c,0,t.width,l);u.fillStyle=p.fontClr;for(f=f?e:e%(y*b);f<=c;f+=y*b)if(z=Math.round((f-e)/b/y),!(f<l||z==k)){k=z;var A=null;0==z%q&&(A=n.formatText(g+z*y)+"");d?x(l-m[Math.abs(z)%q],f,l,f,A):x(f,l-m[Math.abs(z)%q],f,l,A)}u.lineWidth=1;x(d?0:l,d?l:0,l,l);u.fillStyle=p.cornerClr;u.fillRect(0,0,l,l)},z=-1,y=function(){null!=m?(null!=f&&f(z),z=m(A)):A()};this.drawRuler=y;this.sizeListener=e=g(function(){var b=v.container;
+d?(b=b.offsetHeight+l,t.height!=b&&(t.height=b,q.style.height=b+"px",y())):(b=b.offsetWidth+l,t.width!=b&&(t.width=b,q.style.width=b+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=c=g(function(){var b=d?v.container.scrollTop:v.container.scrollLeft;n.lastScroll!=b&&(n.lastScroll=b,y())},10);this.unitListener=function(b,c){n.setUnit(c.getProperty("unit"))};v.addListener(mxEvent.SIZE,e);v.container.addEventListener("scroll",c);v.view.addListener("unitChanged",this.unitListener);
+b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(b){p=b;q.style.background=p.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,e,f){var g;if(d&&4<b.height||!d&&4<b.width){if(null!=n.guidePart)try{u.putImageData(n.guidePart.imgData1,n.guidePart.x1,n.guidePart.y1),u.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),u.putImageData(n.guidePart.imgData3,
+n.guidePart.x3,n.guidePart.y3)}catch(T){}g=n.origGuideMove.apply(this,arguments);try{var k,m,q,t,v,y,z,A,B;u.lineWidth=.5;u.strokeStyle=p.guideClr;u.setLineDash([2]);d?(m=b.y+g.y+l-this.graph.container.scrollTop,k=0,v=m+b.height/2,t=l/2,A=m+b.height,z=0,q=u.getImageData(k,m-1,l,3),x(k,m,l,m),m--,y=u.getImageData(t,v-1,l,3),x(t,v,l,v),v--,B=u.getImageData(z,A-1,l,3),x(z,A,l,A),A--):(m=0,k=b.x+g.x+l-this.graph.container.scrollLeft,v=l/2,t=k+b.width/2,A=0,z=k+b.width,q=u.getImageData(k-1,m,3,l),x(k,
+m,k,l),k--,y=u.getImageData(t-1,v,3,l),x(t,v,t,l),t--,B=u.getImageData(z-1,A,3,l),x(z,A,z,l),z--);if(null==n.guidePart||n.guidePart.x1!=k||n.guidePart.y1!=m)n.guidePart={imgData1:q,x1:k,y1:m,imgData2:y,x2:t,y2:v,imgData3:B,x3:z,y3:A}}catch(T){}}else g=n.origGuideMove.apply(this,arguments);return g};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var b=n.origGuideDestroy.apply(this,arguments);if(null!=n.guidePart)try{u.putImageData(n.guidePart.imgData1,n.guidePart.x1,
+n.guidePart.y1),u.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),u.putImageData(n.guidePart.imgData3,n.guidePart.x3,n.guidePart.y3),n.guidePart=null}catch(C){}return b}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,e){var d=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return d};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);var c=mxUtils.bind(this,function(c){var d=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
function(c){d=null!=b.currentMenu;mxEvent.consume(c)}),null,mxUtils.bind(this,function(e){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(e)||mxEvent.isPopupTrigger(e))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(e)||!d){var f=new mxPopupMenu(mxUtils.bind(this,function(c,d){b.menus.addMenuItems(c,["points","millimeters"],d)}));f.div.className+=" geMenubarMenu";f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=
mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);b.resetCurrentMenu();f.destroy()});var g=mxEvent.getClientX(e),k=mxEvent.getClientY(e);f.popup(g,k,null,e);b.setCurrentMenu(f,c)}mxEvent.consume(e)}}))});c(this.hRuler.container);c(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};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(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var d=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,g=[],k,n=[],f,l=!1,m=!0,p=!0,q=!0,t=!0,u=[],v=!1,x=!0;this.setClosedPath=function(b){l=b};this.setAutoClose=function(b){m=b};this.setAutoInsert=function(b){p=b};this.setAutoScroll=function(b){q=b};this.setOpenFill=function(b){t=b};this.setStopClickEnabled=
-function(b){x=b};this.setSmoothing=function(b){d=b};var A=function(c){v=c;b.getRubberband().setEnabled(!c);b.graphHandler.setSelectEnabled(!c);b.graphHandler.setMoveEnabled(!c);b.container.style.cursor=c?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){A(!0)};this.isDrawing=function(){return v};var z=mxUtils.bind(this,function(b){if(c){var d=f.length,e=x&&0<n.length&&null!=f&&2>f.length;e||n.push.apply(n,f);f=[];n.push(null);g.push(c);c=null;(e||
-p)&&this.stopDrawing();p&&2<=d&&this.startDrawing();mxEvent.consume(b)}});this.createStyle=function(b){return mxConstants.STYLE_SHAPE+"="+b+";fillColor=none;"};this.stopDrawing=function(){if(0<g.length){for(var d=n[0].x,e=n[0].x,f=n[0].y,k=n[0].y,p=1;p<n.length;p++)null!=n[p]&&(d=Math.max(d,n[p].x),e=Math.min(e,n[p].x),f=Math.max(f,n[p].y),k=Math.min(k,n[p].y));d-=e;f-=k;if(0<d&&0<f){var q=100/d,u=100/f;n.map(function(b){if(null==b)return b;b.x=(b.x-e)*q;b.y=(b.y-k)*u;return b});for(var v='<shape strokewidth="inherit"><foreground>',
-x=0,p=0;p<n.length;p++){var y=n[p];if(null==y){var y=!1,x=n[x],z=n[p-1];!l&&m&&(y=x.x-z.x,z=x.y-z.y,y=Math.sqrt(y*y+z*z)<=b.tolerance);if(l||y)v+='<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>';v+="</path>"+(t||l||y?"<fillstroke/>":"<stroke/>");x=p+1}else v=p==x?v+('<path><move x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>'):v+('<line x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>')}v+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){p=this.createStyle("stencil("+
-Graph.compress(v)+")");v=b.view.scale;x=b.view.translate;d=new mxCell("",new mxGeometry(e/v-x.x,k/v-x.y,d/v,f/v),p);d.vertex=1;b.model.beginUpdate();try{d=b.addCell(d),b.fireEvent(new mxEventObject("cellsInserted","cells",[d])),b.fireEvent(new mxEventObject("freehandInserted","cell",d))}finally{b.model.endUpdate()}b.setSelectionCells([d])}}for(p=0;p<g.length;p++)g[p].parentNode.removeChild(g[p]);c=null;g=[];n=[]}A(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){var d=c.getProperty("eventName"),
-e=c.getProperty("event");d==mxEvent.MOUSE_MOVE&&v&&(null!=e.sourceState&&e.sourceState.setCursor("crosshair"),e.consume())}));var y=new mxCell;y.edge=!0;b.addMouseListener({mouseDown:mxUtils.bind(this,function(d,g){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var l=g.getEvent();if(v&&!mxEvent.isPopupTrigger(l)&&!mxEvent.isMultiTouchEvent(l)){var m=b.getCurrentCellStyle(y),p=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),p=Math.max(1,p*b.view.scale);c=document.createElementNS("http://www.w3.org/2000/svg",
-"path");c.setAttribute("fill","none");c.setAttribute("stroke",mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(m,mxConstants.STYLE_STROKECOLOR,"#000")));c.setAttribute("stroke-width",p);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(m=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",m=m.split(" ").map(function(b){return parseFloat(b)*p}).join(" "),c.setAttribute("stroke-dasharray",m));u=[];l=B(l);C(l);k="M"+l.x+" "+l.y;n.push(l);f=[];c.setAttribute("d",
-k);e.appendChild(c);g.consume()}}}),mouseMove:mxUtils.bind(this,function(d,e){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var g=e.getEvent(),g=B(g);C(g);var l=D(0);if(l){k+=" L"+l.x+" "+l.y;n.push(l);var m="";f=[];for(var p=2;p<u.length;p+=2)l=D(p),m+=" L"+l.x+" "+l.y,f.push(l);c.setAttribute("d",k+m)}q&&(l=b.view.translate,b.scrollRectToVisible((new mxRectangle(g.x-l.x,g.y-l.y)).grow(20)));e.consume()}}),mouseUp:mxUtils.bind(this,function(d,e){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};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(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var d=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,k=[],g,m=[],f,l=!1,n=!0,p=!0,q=!0,t=!0,u=[],v=!1,x=!0;this.setClosedPath=function(b){l=b};this.setAutoClose=function(b){n=b};this.setAutoInsert=function(b){p=b};this.setAutoScroll=function(b){q=b};this.setOpenFill=function(b){t=b};this.setStopClickEnabled=
+function(b){x=b};this.setSmoothing=function(b){d=b};var A=function(c){v=c;b.getRubberband().setEnabled(!c);b.graphHandler.setSelectEnabled(!c);b.graphHandler.setMoveEnabled(!c);b.container.style.cursor=c?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){A(!0)};this.isDrawing=function(){return v};var z=mxUtils.bind(this,function(b){if(c){var d=f.length,e=x&&0<m.length&&null!=f&&2>f.length;e||m.push.apply(m,f);f=[];m.push(null);k.push(c);c=null;(e||
+p)&&this.stopDrawing();p&&2<=d&&this.startDrawing();mxEvent.consume(b)}});this.createStyle=function(b){return mxConstants.STYLE_SHAPE+"="+b+";fillColor=none;"};this.stopDrawing=function(){if(0<k.length){for(var d=m[0].x,e=m[0].x,f=m[0].y,g=m[0].y,p=1;p<m.length;p++)null!=m[p]&&(d=Math.max(d,m[p].x),e=Math.min(e,m[p].x),f=Math.max(f,m[p].y),g=Math.min(g,m[p].y));d-=e;f-=g;if(0<d&&0<f){var q=100/d,u=100/f;m.map(function(b){if(null==b)return b;b.x=(b.x-e)*q;b.y=(b.y-g)*u;return b});for(var v='<shape strokewidth="inherit"><foreground>',
+x=0,p=0;p<m.length;p++){var y=m[p];if(null==y){var y=!1,x=m[x],z=m[p-1];!l&&n&&(y=x.x-z.x,z=x.y-z.y,y=Math.sqrt(y*y+z*z)<=b.tolerance);if(l||y)v+='<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>';v+="</path>"+(t||l||y?"<fillstroke/>":"<stroke/>");x=p+1}else v=p==x?v+('<path><move x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>'):v+('<line x="'+y.x.toFixed(2)+'" y="'+y.y.toFixed(2)+'"/>')}v+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){p=this.createStyle("stencil("+
+Graph.compress(v)+")");v=b.view.scale;x=b.view.translate;d=new mxCell("",new mxGeometry(e/v-x.x,g/v-x.y,d/v,f/v),p);d.vertex=1;b.model.beginUpdate();try{d=b.addCell(d),b.fireEvent(new mxEventObject("cellsInserted","cells",[d])),b.fireEvent(new mxEventObject("freehandInserted","cell",d))}finally{b.model.endUpdate()}b.setSelectionCells([d])}}for(p=0;p<k.length;p++)k[p].parentNode.removeChild(k[p]);c=null;k=[];m=[]}A(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){var d=c.getProperty("eventName"),
+e=c.getProperty("event");d==mxEvent.MOUSE_MOVE&&v&&(null!=e.sourceState&&e.sourceState.setCursor("crosshair"),e.consume())}));var y=new mxCell;y.edge=!0;b.addMouseListener({mouseDown:mxUtils.bind(this,function(d,k){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var l=k.getEvent();if(v&&!mxEvent.isPopupTrigger(l)&&!mxEvent.isMultiTouchEvent(l)){var n=b.getCurrentCellStyle(y),p=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),p=Math.max(1,p*b.view.scale);c=document.createElementNS("http://www.w3.org/2000/svg",
+"path");c.setAttribute("fill","none");c.setAttribute("stroke",mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000")));c.setAttribute("stroke-width",p);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(n=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",n=n.split(" ").map(function(b){return parseFloat(b)*p}).join(" "),c.setAttribute("stroke-dasharray",n));u=[];l=B(l);C(l);g="M"+l.x+" "+l.y;m.push(l);f=[];c.setAttribute("d",
+g);e.appendChild(c);k.consume()}}}),mouseMove:mxUtils.bind(this,function(d,e){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){var k=e.getEvent(),k=B(k);C(k);var l=D(0);if(l){g+=" L"+l.x+" "+l.y;m.push(l);var n="";f=[];for(var p=2;p<u.length;p+=2)l=D(p),n+=" L"+l.x+" "+l.y,f.push(l);c.setAttribute("d",g+n)}q&&(l=b.view.translate,b.scrollRectToVisible((new mxRectangle(k.x-l.x,k.y-l.y)).grow(20)));e.consume()}}),mouseUp:mxUtils.bind(this,function(d,e){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&
(z(e.getEvent()),e.consume())})});var B=function(c){return mxUtils.convertPoint(b.container,mxEvent.getClientX(c),mxEvent.getClientY(c))},C=function(b){for(u.push(b);u.length>d;)u.shift()},D=function(b){var c=u.length;if(1===c%2||c>=d){var e=0,f=0,g,k=0;for(g=b;g<c;g++)k++,b=u[g],e+=b.x,f+=b.y;return{x:e/k,y:f/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;
mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index 184832a6..f26eec1f 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -394,6 +394,13 @@
return urlParams['test'] == '1' && state.vertices.length == 1 &&
state.edges.length == 0 && graph.isTableCell(state.vertices[0]);
}},
+ {name: 'rowspan', dispName: 'Rowspan', type: 'int', min: 1, defVal: 1, isVisible: function(state, format)
+ {
+ var graph = format.editorUi.editor.graph;
+
+ return urlParams['test'] == '1' && state.vertices.length == 1 &&
+ state.edges.length == 0 && graph.isTableCell(state.vertices[0]);
+ }},
{type: 'separator'},
{name: 'resizeLastRow', dispName: 'Resize Last Row', type: 'bool', getDefaultValue: function(state, format)
{
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 8fcad673..81fd8dd7 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -3935,7 +3935,7 @@
{
var addItem = mxUtils.bind(this, function(fontName, fontUrl, deletable, fontLabel, tooltip)
{
- var graph = this.editorUi.editor.graph;
+ var graph = editorUi.editor.graph;
var tr = this.styleChange(menu, fontLabel || fontName,
(urlParams['ext-fonts'] != '1') ?
@@ -3954,6 +3954,13 @@
//Add the font to the file in case it was a previous font from the settings
graph.addExtFont(fontName, fontUrl);
}
+
+ editorUi.fireEvent(new mxEventObject('styleChanged',
+ 'keys', (urlParams['ext-fonts'] != '1') ?
+ [mxConstants.STYLE_FONTFAMILY, 'fontSource', 'FType'] : [mxConstants.STYLE_FONTFAMILY],
+ 'values', (urlParams['ext-fonts'] != '1') ?
+ [fontName, (fontUrl != null) ? encodeURIComponent(fontUrl) : null, null] : [fontName],
+ 'cells', [graph.cellEditor.getEditingCell()]));
}, function()
{
graph.updateLabelElements(graph.getSelectionCells(), function(elt)
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index 31187b6e..3b57b875 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -1826,6 +1826,7 @@ EditorUi.initMinimalTheme = function()
if (ui.statusContainer.children.length == 0 ||
(ui.statusContainer.children.length == 1 &&
+ typeof ui.statusContainer.firstChild.getAttribute === 'function' &&
ui.statusContainer.firstChild.getAttribute('class') == null))
{
var title = (ui.statusContainer.firstChild != null) ?
diff --git a/src/main/webapp/js/diagramly/NotionClient.js b/src/main/webapp/js/diagramly/NotionClient.js
index fafc3b44..e8de86a8 100644
--- a/src/main/webapp/js/diagramly/NotionClient.js
+++ b/src/main/webapp/js/diagramly/NotionClient.js
@@ -22,13 +22,32 @@ mxUtils.extend(NotionClient, DrawioClient);
*/
NotionClient.prototype.extension = '.drawio';
+NotionClient.prototype.xmlField = 'draw.io XML';
+
/**
*
*/
-NotionClient.prototype.baseUrl = window.NOTION_API_URL || ((window.location.hostname == 'test.draw.io') ?
- 'https://notion.jgraph.workers.dev/api' : '/notion-api');
+NotionClient.prototype.baseUrl = window.NOTION_API_URL || 'https://app.diagrams.net/notion-api';
+
+
+NotionClient.prototype.getTitle = function (props)
+{
+ var obj, key;
+
+ for (var field in props)
+ {
+ if (props[field].type == 'title')
+ {
+ key = field;
+ obj = props[field];
+ break;
+ }
+ }
+
+ return {title: this.getTitleVal(obj), key: key};
+};
-NotionClient.prototype.getTitle = function (obj)
+NotionClient.prototype.getTitleVal = function (obj)
{
if (typeof obj.title === 'string')
{
@@ -203,15 +222,15 @@ NotionClient.prototype.getFile = function(id, success, error, denyConvert, asLib
{
try
{
- var xmlParts = fileInfo.properties.xml.rich_text, xml = '';
- var fileName = this.getTitle(fileInfo.properties.Name);
+ var xmlParts = fileInfo.properties[this.xmlField].rich_text, xml = '';
+ var fileNameObj = this.getTitle(fileInfo.properties);
for (var i = 0; i < xmlParts.length; i++)
{
xml += xmlParts[i].text.content;
}
- var meta = {id: id, name: fileName};
+ var meta = {id: id, name: fileNameObj.title, nameField: fileNameObj.key};
if (asLibrary)
{
@@ -239,53 +258,86 @@ NotionClient.prototype.getFile = function(id, success, error, denyConvert, asLib
/**
*
*/
-NotionClient.prototype.insertLibrary = function(filename, data, success, error, folderId)
+NotionClient.prototype.insertLibrary = function(filename, data, success, error, folderObj)
{
- this.insertFile(filename, data, success, error, true, folderId);
+ this.insertFile(filename, data, success, error, true, folderObj);
};
/**
*
*/
-NotionClient.prototype.insertFile = function(filename, data, success, error, asLibrary, folderId)
+NotionClient.prototype.insertFile = function(filename, data, success, error, asLibrary, folderObj)
{
asLibrary = (asLibrary != null) ? asLibrary : false;
+ var folderId, nameField;
- this.checkExists(folderId, filename, true, mxUtils.bind(this, function(checked, currentId)
+ var startSave = mxUtils.bind(this, function()
{
- if (checked)
+ this.checkExists(folderId, filename, nameField, true, mxUtils.bind(this, function(checked, currentId)
{
- this.writeFile(currentId? '/v1/pages/' + encodeURIComponent(currentId) : '/v1/pages',
- currentId? null : folderId, filename, data, currentId? 'PATCH' : 'POST',
- mxUtils.bind(this, function(fileInfo)
+ if (checked)
{
- var meta = {id: fileInfo.id, name: this.getTitle(fileInfo.properties.Name)};
-
- if (asLibrary)
- {
- success(new NotionLibrary(this.ui, data, meta));
- }
- else
+ this.writeFile(currentId? '/v1/pages/' + encodeURIComponent(currentId) : '/v1/pages',
+ currentId? null : folderId, filename, nameField, data, currentId? 'PATCH' : 'POST',
+ mxUtils.bind(this, function(fileInfo)
{
- success(new NotionFile(this.ui, data, meta));
- }
- }), error);
+ var fileNameObj = this.getTitle(fileInfo.properties);
+ var meta = {id: fileInfo.id, name: fileNameObj.title, nameField: fileNameObj.key};
+
+ if (asLibrary)
+ {
+ success(new NotionLibrary(this.ui, data, meta));
+ }
+ else
+ {
+ success(new NotionFile(this.ui, data, meta));
+ }
+ }), error);
+ }
+ else
+ {
+ error();
+ }
+ }));
+ });
+
+ if (typeof folderObj === 'object')
+ {
+ nameField = this.getTitle(folderObj.schema.properties).key;
+ folderId = folderObj.id;
+
+ if (!folderObj.drawioReady)
+ {
+ folderObj.schema.properties[this.xmlField] = {
+ name: this.xmlField,
+ type: 'rich_text',
+ rich_text: {}
+ };
+
+ this.executeRequest('/v1/databases/' + encodeURIComponent(folderObj.id), JSON.stringify({
+ title: folderObj.schema.title,
+ properties: folderObj.schema.properties
+ }), 'PATCH', startSave, error);
}
else
{
- error();
+ startSave();
}
- }))
+ }
+ else
+ {
+ error(); //This shouldn't happen!
+ }
};
/**
*
*/
-NotionClient.prototype.checkExists = function(parentId, filename, askReplace, fn)
+NotionClient.prototype.checkExists = function(parentId, filename, nameField, askReplace, fn)
{
this.executeRequest('/v1/databases/' + encodeURIComponent(parentId) + '/query', JSON.stringify({
filter: {
- property: 'Name',
+ property: nameField,
text: {
equals: filename
}
@@ -335,8 +387,8 @@ NotionClient.prototype.saveFile = function(file, success, error)
{
var data = file.getData();
- this.writeFile('/v1/pages/' + file.getId(), null, file.getTitle(), data,
- 'PATCH', mxUtils.bind(this, function(resp)
+ this.writeFile('/v1/pages/' + file.getId(), null, file.getTitle(), file.getNameField(),
+ data, 'PATCH', mxUtils.bind(this, function(resp)
{
success(resp, data);
}), error);
@@ -350,7 +402,7 @@ NotionClient.prototype.saveFile = function(file, success, error)
/**
*
*/
-NotionClient.prototype.writeFile = function(url, folderId, filename, data, method, success, error)
+NotionClient.prototype.writeFile = function(url, folderId, filename, nameField, data, method, success, error)
{
try
{
@@ -378,20 +430,21 @@ NotionClient.prototype.writeFile = function(url, folderId, filename, data, metho
}
var reqBody = {
- properties: {
- Name: {
- title: [{
- text: {
- content: filename
- }
- }]
- },
- xml: {
- rich_text: richTxt
- }
- }
+ properties: {}
};
+ reqBody.properties[nameField] = {
+ title: [{
+ text: {
+ content: filename
+ }
+ }]
+ };
+
+ reqBody.properties[this.xmlField] = {
+ rich_text: richTxt
+ };
+
if (folderId)
{
reqBody['parent'] = { database_id: folderId };
@@ -649,7 +702,7 @@ NotionClient.prototype.showNotionDialog = function(showFiles, fn)
typeImg.width = 20;
temp.appendChild(typeImg);
- temp.appendChild(createLink(this.getTitle(file.properties.Name), mxUtils.bind(this, function()
+ temp.appendChild(createLink(this.getTitle(file.properties).title, mxUtils.bind(this, function()
{
this.ui.hideDialog();
fn(file.id);
@@ -726,19 +779,22 @@ NotionClient.prototype.showNotionDialog = function(showFiles, fn)
{
for (var i = 0; i < dbs.length; i++)
{
- if (!dbs[i].properties.Name || dbs[i].properties.Name.type != 'title'
- || !dbs[i].properties.xml || dbs[i].properties.xml.type != 'rich_text') continue;
+ var drawioReady = dbs[i].properties[this.xmlField] &&
+ dbs[i].properties[this.xmlField].type == 'rich_text';
+
+ //Filter DBs when opening a file
+ if (showFiles && !drawioReady) continue;
- (mxUtils.bind(this, function(db, idx)
+ (mxUtils.bind(this, function(db, idx, drawioReady)
{
var temp = listItem.cloneNode();
temp.style.backgroundColor = (idx % 2 == 0) ?
((Editor.isDarkMode()) ? '#000000' : '#eeeeee') : '';
- temp.appendChild(createLink(this.getTitle(db), mxUtils.bind(this, function()
+ temp.appendChild(createLink(this.getTitleVal(db), mxUtils.bind(this, function()
{
itemId = db.id;
- itemName = this.getTitle(db);
+ itemName = this.getTitleVal(db);
if (showFiles)
{
@@ -747,12 +803,12 @@ NotionClient.prototype.showNotionDialog = function(showFiles, fn)
else
{
this.ui.hideDialog();
- fn(itemId);
+ fn({id: itemId, drawioReady: drawioReady, schema: db});
}
})));
div.appendChild(temp);
- }))(dbs[i], i);
+ }))(dbs[i], i, drawioReady);
count++;
}
diff --git a/src/main/webapp/js/diagramly/NotionFile.js b/src/main/webapp/js/diagramly/NotionFile.js
index 8f573cad..922de977 100644
--- a/src/main/webapp/js/diagramly/NotionFile.js
+++ b/src/main/webapp/js/diagramly/NotionFile.js
@@ -56,6 +56,14 @@ NotionFile.prototype.getTitle = function()
/**
*
*/
+NotionFile.prototype.getNameField = function()
+{
+ return this.meta.nameField;
+};
+
+/**
+ *
+ */
NotionFile.prototype.isRenamable = function()
{
return false;
diff --git a/src/main/webapp/js/grapheditor/EditorUi.js b/src/main/webapp/js/grapheditor/EditorUi.js
index 8c84cf6d..086021eb 100644
--- a/src/main/webapp/js/grapheditor/EditorUi.js
+++ b/src/main/webapp/js/grapheditor/EditorUi.js
@@ -83,7 +83,7 @@ EditorUi = function(editor, container, lightbox)
{
// Stores the current style and assigns it to new cells
var styles = ['rounded', 'shadow', 'glass', 'dashed', 'dashPattern', 'labelBackgroundColor',
- 'comic', 'sketch', 'fillWeight', 'hachureGap', 'hachureAngle', 'jiggle',
+ 'labelBorderColor', 'comic', 'sketch', 'fillWeight', 'hachureGap', 'hachureAngle', 'jiggle',
'disableMultiStroke', 'disableMultiStrokeFill', 'fillStyle', 'curveFitting',
'simplification', 'sketchStyle', 'pointerEvents'];
var connectStyles = ['shape', 'edgeStyle', 'curved', 'rounded', 'elbow', 'jumpStyle', 'jumpSize',
diff --git a/src/main/webapp/js/grapheditor/Format.js b/src/main/webapp/js/grapheditor/Format.js
index 8c1da38d..a6f4116c 100644
--- a/src/main/webapp/js/grapheditor/Format.js
+++ b/src/main/webapp/js/grapheditor/Format.js
@@ -1172,6 +1172,8 @@ BaseFormatPanel.prototype.createColorOption = function(label, getColorFn, setCol
div.style.margin = '3px';
div.style.border = '1px solid black';
div.style.backgroundColor = (tempColor == 'default') ? defaultColorValue : tempColor;
+
+ btn.innerHTML = '';
btn.appendChild(div);
if (color != null && color != mxConstants.NONE && color.length > 1 && typeof color === 'string')
@@ -3129,18 +3131,30 @@ TextFormatPanel.prototype.addFont = function(container)
function(evt)
{
graph.cellEditor.alignText(mxConstants.ALIGN_LEFT, evt);
+ ui.fireEvent(new mxEventObject('styleChanged',
+ 'keys', [mxConstants.STYLE_ALIGN],
+ 'values', [mxConstants.ALIGN_LEFT],
+ 'cells', ss.cells));
} : callFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT])), stylePanel3);
var center = this.editorUi.toolbar.addButton('geSprite-center', mxResources.get('center'),
(graph.cellEditor.isContentEditing()) ?
function(evt)
{
graph.cellEditor.alignText(mxConstants.ALIGN_CENTER, evt);
+ ui.fireEvent(new mxEventObject('styleChanged',
+ 'keys', [mxConstants.STYLE_ALIGN],
+ 'values', [mxConstants.ALIGN_CENTER],
+ 'cells', ss.cells));
} : callFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER])), stylePanel3);
var right = this.editorUi.toolbar.addButton('geSprite-right', mxResources.get('right'),
(graph.cellEditor.isContentEditing()) ?
function(evt)
{
graph.cellEditor.alignText(mxConstants.ALIGN_RIGHT, evt);
+ ui.fireEvent(new mxEventObject('styleChanged',
+ 'keys', [mxConstants.STYLE_ALIGN],
+ 'values', [mxConstants.ALIGN_RIGHT],
+ 'cells', ss.cells));
} : callFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT])), stylePanel3);
this.styleButtons([left, center, right]);
@@ -3164,11 +3178,14 @@ TextFormatPanel.prototype.addFont = function(container)
}
var top = this.editorUi.toolbar.addButton('geSprite-top', mxResources.get('top'),
- callFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP])), stylePanel3);
+ callFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],
+ [mxConstants.ALIGN_TOP])), stylePanel3);
var middle = this.editorUi.toolbar.addButton('geSprite-middle', mxResources.get('middle'),
- callFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE])), stylePanel3);
+ callFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],
+ [mxConstants.ALIGN_MIDDLE])), stylePanel3);
var bottom = this.editorUi.toolbar.addButton('geSprite-bottom', mxResources.get('bottom'),
- callFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM])), stylePanel3);
+ callFn(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],
+ [mxConstants.ALIGN_BOTTOM])), stylePanel3);
this.styleButtons([top, middle, bottom]);
@@ -3424,6 +3441,10 @@ TextFormatPanel.prototype.addFont = function(container)
}
}
}
+
+ ui.fireEvent(new mxEventObject('styleChanged',
+ 'keys', [mxConstants.STYLE_FONTSIZE],
+ 'values', [fontSize], 'cells', ss.cells));
};
// Wraps text node or mixed selection with leading text in a font element
@@ -3538,6 +3559,9 @@ TextFormatPanel.prototype.addFont = function(container)
}, function(color)
{
document.execCommand('backcolor', false, (color != mxConstants.NONE) ? color : 'transparent');
+ ui.fireEvent(new mxEventObject('styleChanged',
+ 'keys', [mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],
+ 'values', [color], 'cells', ss.cells));
}, '#ffffff',
{
install: function(apply) { bgColorApply = apply; },
@@ -3579,6 +3603,9 @@ TextFormatPanel.prototype.addFont = function(container)
document.execCommand('forecolor', false, (color != mxConstants.NONE) ?
color : 'transparent');
+ ui.fireEvent(new mxEventObject('styleChanged',
+ 'keys', [mxConstants.STYLE_FONTCOLOR],
+ 'values', [color], 'cells', ss.cells));
// Finds the new or changed font element
var newFonts = graph.cellEditor.textarea.getElementsByTagName('font');
@@ -3618,6 +3645,9 @@ TextFormatPanel.prototype.addFont = function(container)
{
document.execCommand('forecolor', false, (color != mxConstants.NONE) ?
color : 'transparent');
+ ui.fireEvent(new mxEventObject('styleChanged',
+ 'keys', [mxConstants.STYLE_FONTCOLOR],
+ 'values', [color], 'cells', ss.cells));
}
}, (defs[mxConstants.STYLE_FONTCOLOR] != null) ? defs[mxConstants.STYLE_FONTCOLOR] : '#000000',
{
@@ -3789,7 +3819,7 @@ TextFormatPanel.prototype.addFont = function(container)
if (node != null && graph.cellEditor.textarea != null && node != graph.cellEditor.textarea &&
graph.cellEditor.textarea.contains(node))
{
- node.style.lineHeight = value + '%';
+ node.style.lineHeight = value / 100;
}
input.value = value + ' %';
@@ -4400,16 +4430,24 @@ TextFormatPanel.prototype.addFont = function(container)
// Converts rgb(r,g,b) values
var color = css.color.replace(
- /\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
- function($0, $1, $2, $3) {
- return "#" + ("0"+Number($1).toString(16)).substr(-2) + ("0"+Number($2).toString(16)).substr(-2) + ("0"+Number($3).toString(16)).substr(-2);
+ /\brgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+)\s*)?\)/g,
+ function($0, $1, $2, $3, $4)
+ {
+ return '#' + ('0' + Number($1).toString(16)).substr(-2) +
+ ('0' + Number($2).toString(16)).substr(-2) +
+ ('0' + Number($3).toString(16)).substr(-2) + (($4 != null) ?
+ ('0' + Number($4).toString(16)).substr(-2) : '');
});
var color2 = css.backgroundColor.replace(
- /\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
- function($0, $1, $2, $3) {
- return "#" + ("0"+Number($1).toString(16)).substr(-2) + ("0"+Number($2).toString(16)).substr(-2) + ("0"+Number($3).toString(16)).substr(-2);
- });
-
+ /\brgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+)\s*)?\)/g,
+ function($0, $1, $2, $3, $4)
+ {
+ return '#' + ('0' + Number($1).toString(16)).substr(-2) +
+ ('0' + Number($2).toString(16)).substr(-2) +
+ ('0' + Number($3).toString(16)).substr(-2) + (($4 != null) ?
+ ('0' + Number($4).toString(16)).substr(-2) : '');
+ });
+
// Updates the color picker for the current font
if (fontColorApply != null)
{
diff --git a/src/main/webapp/js/grapheditor/Graph.js b/src/main/webapp/js/grapheditor/Graph.js
index 58e38828..2bdbe1de 100644
--- a/src/main/webapp/js/grapheditor/Graph.js
+++ b/src/main/webapp/js/grapheditor/Graph.js
@@ -1941,7 +1941,7 @@ Graph.prototype.connectionArrowsEnabled = true;
/**
* Specifies the regular expression for matching placeholders.
*/
-Graph.prototype.placeholderPattern = new RegExp('%(date\{.*\}|[^%^\{^\}]+)%', 'g');
+Graph.prototype.placeholderPattern = new RegExp('%(date\{.*\}|[^%^\{^\}^ ^"^ \'^=^;]+)%', 'g');
/**
* Specifies the regular expression for matching placeholders.
@@ -6114,7 +6114,7 @@ TableLayout.prototype.getRowLayout = function(row, width)
*
* Places the cells at the given positions in the given row.
*/
-TableLayout.prototype.layoutRow = function(row, positions, height, tw)
+TableLayout.prototype.layoutRow = function(row, positions, height, tw, lastCells)
{
var model = this.graph.getModel();
var cells = model.getChildCells(row, true);
@@ -6171,26 +6171,47 @@ TableLayout.prototype.layoutRow = function(row, positions, height, tw)
}
// Handles colspan
- if (last != null && last.geo != null)
+ var visible = true;
+
+ if (last != null && last.geo != null &&
+ last.colspan != null && last.colspan > 1)
+ {
+ last.geo.width += (cell.alternateBounds != null) ?
+ cell.alternateBounds.width : cell.width;
+ visible = false;
+ last.colspan--;
+ }
+
+ var upper = lastCells[i];
+
+ if (upper != null && upper.geo != null &&
+ upper.rowspan != null && upper.rowspan > 1)
+ {
+ upper.geo.height += (cell.alternateBounds != null) ?
+ cell.alternateBounds.height : cell.height;
+ visible = false;
+ upper.rowspan--;
+ }
+
+ model.setVisible(cells[i], visible);
+
+ var style = this.graph.getCurrentCellStyle(cells[i], true);
+ var temp = {style: style, cell: cells[i], geo: cell};
+
+ if (style != null)
{
- if (last.colspan > 1)
+ if (last == null || last.colspan < 1)
{
- last.colspan--;
- last.geo.width += cell.width;
- model.setVisible(cells[i], false);
+ temp.colspan = parseInt(style['colspan'] || 0);
+ last = temp;
}
- else
+
+ if (upper == null || upper.rowspan < 1)
{
- model.setVisible(cells[i], true);
+ temp.rowspan = parseInt(style['rowspan'] || 0);
+ lastCells[i] = temp;
}
}
-
- if (last == null || last.colspan <= 1)
- {
- var style = this.graph.getCurrentCellStyle(cells[i], true);
- last = {colspan: (style != null) ? parseInt(style['colspan'] || 1) : 1,
- style: style, cell: cells[i], geo: cell};
- }
}
return sw;
@@ -6240,6 +6261,7 @@ TableLayout.prototype.execute = function(parent)
}
var pos = (resizeLast) ? null : this.getRowLayout(rows[0], tw);
+ var lastCells = [];
var y = offset.y;
// Updates row geometries
@@ -6268,7 +6290,7 @@ TableLayout.prototype.execute = function(parent)
}
// Updates cell geometries
- sw = Math.max(sw, this.layoutRow(rows[i], pos, row.height, tw));
+ sw = Math.max(sw, this.layoutRow(rows[i], pos, row.height, tw, lastCells));
}
if (fixedRows && th < sh)
diff --git a/src/main/webapp/js/grapheditor/Menus.js b/src/main/webapp/js/grapheditor/Menus.js
index d1a037c5..dd9e2dae 100644
--- a/src/main/webapp/js/grapheditor/Menus.js
+++ b/src/main/webapp/js/grapheditor/Menus.js
@@ -43,7 +43,8 @@ Menus.prototype.defaultFonts = ['Helvetica', 'Verdana', 'Times New Roman', 'Gara
*/
Menus.prototype.init = function()
{
- var graph = this.editorUi.editor.graph;
+ var ui = this.editorUi;
+ var graph = ui.editor.graph;
var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
this.customFonts = [];
@@ -51,11 +52,16 @@ Menus.prototype.init = function()
this.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent)
{
- var addItem = mxUtils.bind(this, function(fontname)
+ var addItem = mxUtils.bind(this, function(fontFamily)
{
- var tr = this.styleChange(menu, fontname, [mxConstants.STYLE_FONTFAMILY], [fontname], null, parent, function()
+ var tr = this.styleChange(menu, fontFamily, [mxConstants.STYLE_FONTFAMILY],
+ [fontFamily], null, parent, function()
{
- document.execCommand('fontname', false, fontname);
+ document.execCommand('fontname', false, fontFamily);
+ ui.fireEvent(new mxEventObject('styleChanged',
+ 'keys', [mxConstants.STYLE_FONTFAMILY],
+ 'values', [fontFamily],
+ 'cells', [graph.cellEditor.getEditingCell()]));
}, function()
{
graph.updateLabelElements(graph.getSelectionCells(), function(elt)
@@ -69,7 +75,8 @@ Menus.prototype.init = function()
}
});
});
- tr.firstChild.nextSibling.style.fontFamily = fontname;
+
+ tr.firstChild.nextSibling.style.fontFamily = fontFamily;
});
for (var i = 0; i < this.defaultFonts.length; i++)
@@ -136,32 +143,52 @@ Menus.prototype.init = function()
this.put('fontSize', new Menu(mxUtils.bind(this, function(menu, parent)
{
var sizes = [6, 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 72];
-
- var addItem = mxUtils.bind(this, function(fontsize)
+
+ if (mxUtils.indexOf(sizes, this.defaultFontSize) < 0)
{
- this.styleChange(menu, fontsize, [mxConstants.STYLE_FONTSIZE], [fontsize], null, parent, function()
+ sizes.push(this.defaultFontSize);
+ sizes.sort(function(a, b)
{
- if (graph.cellEditor.textarea != null)
+ return a - b;
+ });
+ }
+
+ var setFontSize = mxUtils.bind(this, function(fontSize)
+ {
+ if (graph.cellEditor.textarea != null)
+ {
+ // Creates an element with arbitrary size 3
+ document.execCommand('fontSize', false, '3');
+
+ // Changes the css font size of the first font element inside the in-place editor with size 3
+ // hopefully the above element that we've just created. LATER: Check for new element using
+ // previous result of getElementsByTagName (see other actions)
+ var elts = graph.cellEditor.textarea.getElementsByTagName('font');
+
+ for (var i = 0; i < elts.length; i++)
{
- // Creates an element with arbitrary size 3
- document.execCommand('fontSize', false, '3');
-
- // Changes the css font size of the first font element inside the in-place editor with size 3
- // hopefully the above element that we've just created. LATER: Check for new element using
- // previous result of getElementsByTagName (see other actions)
- var elts = graph.cellEditor.textarea.getElementsByTagName('font');
-
- for (var i = 0; i < elts.length; i++)
+ if (elts[i].getAttribute('size') == '3')
{
- if (elts[i].getAttribute('size') == '3')
- {
- elts[i].removeAttribute('size');
- elts[i].style.fontSize = fontsize + 'px';
-
- break;
- }
+ elts[i].removeAttribute('size');
+ elts[i].style.fontSize = fontSize + 'px';
+
+ break;
}
}
+
+ ui.fireEvent(new mxEventObject('styleChanged',
+ 'keys', [mxConstants.STYLE_FONTSIZE],
+ 'values', [fontSize],
+ 'cells', [graph.cellEditor.getEditingCell()]));
+ }
+ });
+
+ var addItem = mxUtils.bind(this, function(fontSize)
+ {
+ this.styleChange(menu, fontSize, [mxConstants.STYLE_FONTSIZE],
+ [fontSize], null, parent, function()
+ {
+ setFontSize(fontSize);
});
});
@@ -174,12 +201,21 @@ Menus.prototype.init = function()
if (this.customFontSizes.length > 0)
{
+ var counter = 0;
+
for (var i = 0; i < this.customFontSizes.length; i++)
{
- addItem(this.customFontSizes[i]);
+ if (mxUtils.indexOf(sizes, this.customFontSizes[i]) < 0)
+ {
+ addItem(this.customFontSizes[i]);
+ counter++;
+ }
}
- menu.addSeparator(parent);
+ if (counter > 0)
+ {
+ menu.addSeparator(parent);
+ }
menu.addItem(mxResources.get('reset'), null, mxUtils.bind(this, function()
{
@@ -188,11 +224,31 @@ Menus.prototype.init = function()
menu.addSeparator(parent);
}
+
+ var selState = null;
- this.promptChange(menu, mxResources.get('custom') + '...', '(pt)', '12', mxConstants.STYLE_FONTSIZE, parent, true, mxUtils.bind(this, function(newValue)
+ this.promptChange(menu, mxResources.get('custom') + '...',
+ '(' + mxResources.get('points') + ')', this.defaultFontSize,
+ mxConstants.STYLE_FONTSIZE, parent, true,
+ mxUtils.bind(this, function(newValue)
{
- this.customFontSizes.push(newValue);
- }));
+ if (selState != null && graph.cellEditor.textarea != null)
+ {
+ graph.cellEditor.textarea.focus();
+ graph.cellEditor.restoreSelection(selState);
+ }
+
+ if (newValue != null && newValue.length > 0)
+ {
+ this.customFontSizes.push(newValue);
+ setFontSize(newValue);
+ }
+ }), null, function()
+ {
+ selState = graph.cellEditor.saveSelection();
+
+ return false;
+ });
})));
this.put('direction', new Menu(mxUtils.bind(this, function(menu, parent)
{
@@ -1174,7 +1230,7 @@ Menus.prototype.createStyleChangeFunction = function(keys, values)
/**
* Adds a style change item with a prompt to the given menu.
*/
-Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key, parent, enabled, fn, sprite)
+Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key, parent, enabled, fn, sprite, beforeFn)
{
return menu.addItem(label, null, mxUtils.bind(this, function()
{
@@ -1186,20 +1242,25 @@ Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key, pa
{
value = state.style[key] || value;
}
+
+ var doStopEditing = (beforeFn != null) ? beforeFn() : true;
var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
{
if (newValue != null && newValue.length > 0)
{
- graph.getModel().beginUpdate();
- try
+ if (doStopEditing)
{
- graph.stopEditing(false);
- graph.setCellStyles(key, newValue);
- }
- finally
- {
- graph.getModel().endUpdate();
+ graph.getModel().beginUpdate();
+ try
+ {
+ graph.stopEditing(false);
+ graph.setCellStyles(key, newValue);
+ }
+ finally
+ {
+ graph.getModel().endUpdate();
+ }
}
if (fn != null)
@@ -1207,7 +1268,14 @@ Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key, pa
fn(newValue);
}
}
- }), mxResources.get('enterValue') + ((hint.length > 0) ? (' ' + hint) : ''));
+ }), mxResources.get('enterValue') + ((hint.length > 0) ? (' ' + hint) : ''),
+ null, null, null, null, function()
+ {
+ if (fn != null && beforeFn != null)
+ {
+ fn(null);
+ }
+ });
this.editorUi.showDialog(dlg.container, 300, 80, true, true);
dlg.init();
}), parent, sprite, enabled);
@@ -1218,7 +1286,8 @@ Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key, pa
*/
Menus.prototype.pickColor = function(key, cmd, defaultValue)
{
- var graph = this.editorUi.editor.graph;
+ var ui = this.editorUi;
+ var graph = ui.editor.graph;
var h = 226 + ((Math.ceil(ColorDialog.prototype.presetColors.length / 12) +
Math.ceil(ColorDialog.prototype.defaultColors.length / 12)) * 17);
@@ -1231,6 +1300,20 @@ Menus.prototype.pickColor = function(key, cmd, defaultValue)
{
graph.cellEditor.restoreSelection(selState);
document.execCommand(cmd, false, (color != mxConstants.NONE) ? color : 'transparent');
+
+ var cmdMapping = {
+ 'forecolor': mxConstants.STYLE_FONTCOLOR,
+ 'backcolor': mxConstants.STYLE_LABEL_BACKGROUNDCOLOR
+ };
+
+ var style = cmdMapping[cmd];
+
+ if (style != null)
+ {
+ ui.fireEvent(new mxEventObject('styleChanged',
+ 'keys', [style], 'values', [color],
+ 'cells', [graph.cellEditor.getEditingCell()]));
+ }
}), function()
{
graph.cellEditor.restoreSelection(selState);
diff --git a/src/main/webapp/js/grapheditor/Toolbar.js b/src/main/webapp/js/grapheditor/Toolbar.js
index a4376e04..dd2278fc 100644
--- a/src/main/webapp/js/grapheditor/Toolbar.js
+++ b/src/main/webapp/js/grapheditor/Toolbar.js
@@ -305,7 +305,8 @@ Toolbar.prototype.setFontSize = function(value)
*/
Toolbar.prototype.createTextToolbar = function()
{
- var graph = this.editorUi.editor.graph;
+ var ui = this.editorUi;
+ var graph = ui.editor.graph;
var styleElt = this.addMenu('', mxResources.get('style'), true, 'formatBlock');
styleElt.style.position = 'relative';
@@ -356,11 +357,11 @@ Toolbar.prototype.createTextToolbar = function()
}
var elts = this.addItems(['-', 'undo', 'redo','-', 'bold', 'italic', 'underline']);
- elts[1].setAttribute('title', mxResources.get('undo') + ' (' + this.editorUi.actions.get('undo').shortcut + ')');
- elts[2].setAttribute('title', mxResources.get('redo') + ' (' + this.editorUi.actions.get('redo').shortcut + ')');
- elts[4].setAttribute('title', mxResources.get('bold') + ' (' + this.editorUi.actions.get('bold').shortcut + ')');
- elts[5].setAttribute('title', mxResources.get('italic') + ' (' + this.editorUi.actions.get('italic').shortcut + ')');
- elts[6].setAttribute('title', mxResources.get('underline') + ' (' + this.editorUi.actions.get('underline').shortcut + ')');
+ elts[1].setAttribute('title', mxResources.get('undo') + ' (' + ui.actions.get('undo').shortcut + ')');
+ elts[2].setAttribute('title', mxResources.get('redo') + ' (' + ui.actions.get('redo').shortcut + ')');
+ elts[4].setAttribute('title', mxResources.get('bold') + ' (' + ui.actions.get('bold').shortcut + ')');
+ elts[5].setAttribute('title', mxResources.get('italic') + ' (' + ui.actions.get('italic').shortcut + ')');
+ elts[6].setAttribute('title', mxResources.get('underline') + ' (' + ui.actions.get('underline').shortcut + ')');
// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems
// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).
@@ -369,18 +370,30 @@ Toolbar.prototype.createTextToolbar = function()
elt = menu.addItem('', null, mxUtils.bind(this, function(evt)
{
graph.cellEditor.alignText(mxConstants.ALIGN_LEFT, evt);
+ ui.fireEvent(new mxEventObject('styleChanged',
+ 'keys', [mxConstants.STYLE_ALIGN],
+ 'values', [mxConstants.ALIGN_LEFT],
+ 'cells', [graph.cellEditor.getEditingCell()]));
}), null, 'geIcon geSprite geSprite-left');
elt.setAttribute('title', mxResources.get('left'));
elt = menu.addItem('', null, mxUtils.bind(this, function(evt)
{
graph.cellEditor.alignText(mxConstants.ALIGN_CENTER, evt);
+ ui.fireEvent(new mxEventObject('styleChanged',
+ 'keys', [mxConstants.STYLE_ALIGN],
+ 'values', [mxConstants.ALIGN_CENTER],
+ 'cells', [graph.cellEditor.getEditingCell()]));
}), null, 'geIcon geSprite geSprite-center');
elt.setAttribute('title', mxResources.get('center'));
elt = menu.addItem('', null, mxUtils.bind(this, function(evt)
{
graph.cellEditor.alignText(mxConstants.ALIGN_RIGHT, evt);
+ ui.fireEvent(new mxEventObject('styleChanged',
+ 'keys', [mxConstants.STYLE_ALIGN],
+ 'values', [mxConstants.ALIGN_RIGHT],
+ 'cells', [graph.cellEditor.getEditingCell()]));
}), null, 'geIcon geSprite geSprite-right');
elt.setAttribute('title', mxResources.get('right'));
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 30f873b7..0f08306e 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -200,7 +200,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1");(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||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.4.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),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/"),
+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||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.4.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),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.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),
@@ -2057,53 +2057,53 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,c=new mxUndoManager;this.undoListener=function(b,e){c.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(b,c){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,e);b.getView().addListener(mxEvent.UNDO,e);e=function(c,e){var g=b.getSelectionCellsForChanges(e.getProperty("edit").changes,function(b){return!(b instanceof mxChildChange)});if(0<g.length){b.getModel();for(var k=[],d=0;d<
g.length;d++)null!=b.view.getState(g[d])&&k.push(g[d]);b.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,e);c.addListener(mxEvent.REDO,e);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,c,e,k,g,n,t,d,f,l,m){var p=f?57:0,q=e,v=k,u=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,D=Math.max(1,Math.round((y.width-e-u)/2)),C=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-u):e;k=Math.min(k,x-u);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",
+function Dialog(b,c,e,k,g,p,t,d,f,l,q){var m=f?57:0,n=e,u=k,v=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,D=Math.max(1,Math.round((y.width-e-v)/2)),C=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-v):e;k=Math.min(k,x-v);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",
this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));y=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=y.x+"px";this.bg.style.top=y.y+"px";D+=y.x;C+=y.y;g&&document.body.appendChild(this.bg);var G=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(D,C,e,k);D=g.x;C=g.y;G.style.width=e+"px";G.style.height=k+"px";G.style.left=D+"px";G.style.top=C+"px";G.style.zIndex=
-this.zIndex;G.appendChild(c);document.body.appendChild(G);!d&&c.clientHeight>G.clientHeight-u&&(c.style.overflowY="auto");c.style.overflowX="hidden";if(n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",n.style.top=C+14+"px",n.style.left=D+e+38-p+"px",n.style.zIndex=this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=
-n,!m)){var J=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){J=!0}),null,mxUtils.bind(this,function(d){J&&(b.hideDialog(!0),J=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(q=e=f.w,v=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";D=Math.max(1,Math.round((f.width-e-u)/2));C=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(q,document.body.scrollWidth-u):q;k=Math.min(v,x-u);f=this.getPosition(D,
-C,e,k);D=f.x;C=f.y;G.style.left=D+"px";G.style.top=C+"px";G.style.width=e+"px";G.style.height=k+"px";!d&&c.clientHeight>G.clientHeight-u&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=C+14+"px",this.dialogImg.style.left=D+e+38-p+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=G;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+this.zIndex;G.appendChild(c);document.body.appendChild(G);!d&&c.clientHeight>G.clientHeight-v&&(c.style.overflowY="auto");c.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=D+e+38-m+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=
+p,!q)){var J=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){J=!0}),null,mxUtils.bind(this,function(d){J&&(b.hideDialog(!0),J=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(n=e=f.w,u=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";D=Math.max(1,Math.round((f.width-e-v)/2));C=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-v):n;k=Math.min(u,x-v);f=this.getPosition(D,
+C,e,k);D=f.x;C=f.y;G.style.left=D+"px";G.style.top=C+"px";G.style.width=e+"px";G.style.height=k+"px";!d&&c.clientHeight>G.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=C+14+"px",this.dialogImg.style.left=D+e+38-m+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=G;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
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+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,c){return new mxPoint(b,c)};Dialog.prototype.close=function(b,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,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(b,c,e,k,g,n,t,d,f,l,m){f=null!=f?f:!0;var p=document.createElement("div");p.style.textAlign="center";if(null!=c){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="10px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";q.style.whiteSpace="nowrap";q.style.textOverflow="ellipsis";q.style.overflow="hidden";mxUtils.write(q,c);q.setAttribute("title",c);p.appendChild(q)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;p.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=n&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();n()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",e.appendChild(l));var v=mxUtils.button(k,function(){f&&b.hideDialog();null!=g&&g()});
-v.className="geBtn";e.appendChild(v);null!=t&&(k=mxUtils.button(t,function(){f&&b.hideDialog();null!=d&&d()}),k.className="geBtn gePrimaryBtn",e.appendChild(k));this.init=function(){v.focus()};p.appendChild(e);this.container=p},PrintDialog=function(b,c){this.create(b,c)};
-PrintDialog.prototype.create=function(b){function c(b){var f=d.checked||l.checked,c=parseInt(p.value)/100;isNaN(c)&&(c=1,p.value="100%");var c=.75*c,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/e.pageScale;if(f){var q=d.checked?1:parseInt(m.value);isNaN(q)||(k=mxUtils.getScaleForPageCount(q,e,g))}e.getGraphBounds();var n=q=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*c);g.height=Math.ceil(g.height*c);k*=c;!f&&e.pageVisible?(c=e.getPageLayout(),q-=c.x*g.width,n-=c.y*g.height):
-f=!0;f=PrintDialog.createPrintPreview(e,k,g,0,q,n,f);f.open();b&&PrintDialog.printPreview(f)}var e=b.editor.graph,k,g,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";g.appendChild(d);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
+var ErrorDialog=function(b,c,e,k,g,p,t,d,f,l,q){f=null!=f?f:!0;var m=document.createElement("div");m.style.textAlign="center";if(null!=c){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,c);n.setAttribute("title",c);m.appendChild(n)}c=
+document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;m.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=p&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=q&&q()}),l.className="geBtn",e.appendChild(l));var u=mxUtils.button(k,function(){f&&b.hideDialog();null!=g&&g()});
+u.className="geBtn";e.appendChild(u);null!=t&&(k=mxUtils.button(t,function(){f&&b.hideDialog();null!=d&&d()}),k.className="geBtn gePrimaryBtn",e.appendChild(k));this.init=function(){u.focus()};m.appendChild(e);this.container=m},PrintDialog=function(b,c){this.create(b,c)};
+PrintDialog.prototype.create=function(b){function c(b){var f=d.checked||l.checked,c=parseInt(m.value)/100;isNaN(c)&&(c=1,m.value="100%");var c=.75*c,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/e.pageScale;if(f){var n=d.checked?1:parseInt(q.value);isNaN(n)||(k=mxUtils.getScaleForPageCount(n,e,g))}e.getGraphBounds();var p=n=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*c);g.height=Math.ceil(g.height*c);k*=c;!f&&e.pageVisible?(c=e.getPageLayout(),n-=c.x*g.width,p-=c.y*g.height):
+f=!0;f=PrintDialog.createPrintPreview(e,k,g,0,n,p,f);f.open();b&&PrintDialog.printPreview(f)}var e=b.editor.graph,k,g,p=document.createElement("table");p.style.width="100%";p.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";g.appendChild(d);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
g.appendChild(f);mxEvent.addListener(f,"click",function(b){d.checked=!d.checked;l.checked=!d.checked;mxEvent.consume(b)});mxEvent.addListener(d,"change",function(){l.checked=!d.checked});k.appendChild(g);t.appendChild(k);k=k.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(l);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");g.appendChild(f);mxEvent.addListener(f,
-"click",function(b){l.checked=!l.checked;d.checked=!l.checked;mxEvent.consume(b)});k.appendChild(g);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(m);mxUtils.write(g," "+mxResources.get("pages")+" (max)");k.appendChild(g);t.appendChild(k);mxEvent.addListener(l,"change",
-function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");d.checked=!l.checked});k=k.cloneNode(!1);g=document.createElement("td");mxUtils.write(g,mxResources.get("pageScale")+":");k.appendChild(g);g=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";g.appendChild(p);k.appendChild(g);t.appendChild(k);k=document.createElement("tr");g=document.createElement("td");g.colSpan=2;
-g.style.paddingTop="20px";g.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);if(PrintDialog.previewEnabled){var q=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)});q.className="geBtn";g.appendChild(q)}q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});q.className="geBtn gePrimaryBtn";g.appendChild(q);b.editor.cancelFirst||
-g.appendChild(f);k.appendChild(g);t.appendChild(k);n.appendChild(t);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var c=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(e){}};
-PrintDialog.createPrintPreview=function(b,c,e,k,g,n,t){c=new mxPrintPreview(b,c,e,k,g,n);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=t;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";c.backgroundColor=b;var d=c.writeHead;c.writeHead=function(b){d.apply(this,arguments);b.writeln('<style type="text/css">');b.writeln("@media screen {");b.writeln(" body > div { padding:30px;box-sizing:content-box; }");b.writeln("}");b.writeln("</style>")};return c};
+"click",function(b){l.checked=!l.checked;d.checked=!l.checked;mxEvent.consume(b)});k.appendChild(g);var q=document.createElement("input");q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.setAttribute("size","4");q.setAttribute("disabled","disabled");q.style.width="50px";g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(q);mxUtils.write(g," "+mxResources.get("pages")+" (max)");k.appendChild(g);t.appendChild(k);mxEvent.addListener(l,"change",
+function(){l.checked?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled");d.checked=!l.checked});k=k.cloneNode(!1);g=document.createElement("td");mxUtils.write(g,mxResources.get("pageScale")+":");k.appendChild(g);g=document.createElement("td");var m=document.createElement("input");m.setAttribute("value","100 %");m.setAttribute("size","5");m.style.width="50px";g.appendChild(m);k.appendChild(g);t.appendChild(k);k=document.createElement("tr");g=document.createElement("td");g.colSpan=2;
+g.style.paddingTop="20px";g.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)});n.className="geBtn";g.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});n.className="geBtn gePrimaryBtn";g.appendChild(n);b.editor.cancelFirst||
+g.appendChild(f);k.appendChild(g);t.appendChild(k);p.appendChild(t);this.container=p};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var c=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(e){}};
+PrintDialog.createPrintPreview=function(b,c,e,k,g,p,t){c=new mxPrintPreview(b,c,e,k,g,p);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=t;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";c.backgroundColor=b;var d=c.writeHead;c.writeHead=function(b){d.apply(this,arguments);b.writeln('<style type="text/css">');b.writeln("@media screen {");b.writeln(" body > div { padding:30px;box-sizing:content-box; }");b.writeln("}");b.writeln("</style>")};return c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function e(){var d=u;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(v.setAttribute("src",d.src),v.style.display=""):(v.removeAttribute("src"),v.style.display="none")}var k=b.editor.graph,g,n,t=document.createElement("table");t.style.width=
-"100%";t.style.height="100%";var d=document.createElement("tbody");g=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");g.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",k.pageFormat);g.appendChild(n);d.appendChild(g);g=document.createElement("tr");n=document.createElement("td");
-mxUtils.write(n,mxResources.get("background")+":");g.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var m=k.background;c();mxEvent.addListener(l,
-"click",function(d){b.pickColor(m||"none",function(b){m=b;c()});mxEvent.consume(d)});n.appendChild(l);mxUtils.write(n,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=k.getGridSize();n.appendChild(p);mxEvent.addListener(p,"change",function(){var b=parseInt(p.value);p.value=Math.max(1,isNaN(b)?k.getGridSize():b)});g.appendChild(n);d.appendChild(g);g=document.createElement("tr");
-n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");g.appendChild(n);n=document.createElement("td");var q=document.createElement("button");q.className="geBtn";q.style.margin="0px";mxUtils.write(q,mxResources.get("change")+"...");var v=document.createElement("img");v.setAttribute("valign","middle");v.style.verticalAlign="middle";v.style.border="1px solid lightGray";v.style.borderRadius="4px";v.style.marginRight="14px";v.style.maxWidth="100px";v.style.cursor="pointer";v.style.height=
-"60px";v.style.padding="4px";var u=k.backgroundImage,y=function(d){b.showBackgroundImageDialog(function(b,d){d||(u=b,e())},u);mxEvent.consume(d)};mxEvent.addListener(q,"click",y);mxEvent.addListener(v,"click",y);e();n.appendChild(v);n.appendChild(q);g.appendChild(n);d.appendChild(g);g=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";
-b.editor.cancelFirst&&n.appendChild(q);y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(p.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,m,u,f.get());d.ignoreColor=k.background==m;d.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=u?u.src:null);k.pageFormat.width==d.previousFormat.width&&k.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||k.model.execute(d)});y.className="geBtn gePrimaryBtn";
-n.appendChild(y);b.editor.cancelFirst||n.appendChild(q);g.appendChild(n);d.appendChild(g);t.appendChild(d);this.container=t};
-PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function g(b,c,l){if(l||p!=document.activeElement&&q!=document.activeElement){b=!1;for(c=0;c<u.length;c++)l=u[c],C?"custom"==l.key&&(d.value=l.key,C=!1):null!=l.format&&("a4"==l.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==l.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==l.format.width&&
-e.height==l.format.height?(d.value=l.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(f.style.display="",m.style.display="none"):(p.value=e.width/100,q.value=e.height/100,n.setAttribute("checked","checked"),
-d.value="custom",f.style.display="none",m.style.display="")}}c="format-"+c;var n=document.createElement("input");n.setAttribute("name",c);n.setAttribute("type","radio");n.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.width="206px";var f=
-document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";n.style.marginRight="6px";f.appendChild(n);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));f.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));f.appendChild(l);var m=document.createElement("div");m.style.marginLeft=
-"4px";m.style.width="210px";m.style.height="24px";var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in x ");var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var v={},u=PageSetupDialog.getFormats(),y=0;y<u.length;y++){var x=u[y];v[x.key]=x;var D=document.createElement("option");D.setAttribute("value",
-x.key);mxUtils.write(D,x.title);d.appendChild(D)}var C=!1;g();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var G=e,J=function(b,c){var l=v[d.value];null!=l.format?(p.value=l.format.width/100,q.value=l.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");l=parseFloat(p.value);if(isNaN(l)||0>=l)p.value=e.width/100;l=parseFloat(q.value);if(isNaN(l)||0>=l)q.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),
-Math.floor(100*parseFloat(q.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,l.height,l.width));c&&C||l.width==G.width&&l.height==G.height||(G=l,null!=k&&k(G))};mxEvent.addListener(c,"click",function(b){n.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(p,"blur",J);mxEvent.addListener(p,"click",J);mxEvent.addListener(q,"blur",J);mxEvent.addListener(q,"click",J);mxEvent.addListener(t,"change",J);mxEvent.addListener(n,
-"change",J);mxEvent.addListener(d,"change",function(b){C="custom"==d.value;J(b,!0)});J();return{set:function(b){e=b;g(null,null,!0)},get:function(){return G},widthInput:p,heightInput:q}};
+var PageSetupDialog=function(b){function c(){null==q||q==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=q,l.style.backgroundImage="")}function e(){var d=v;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(u.setAttribute("src",d.src),u.style.display=""):(u.removeAttribute("src"),u.style.display="none")}var k=b.editor.graph,g,p,t=document.createElement("table");t.style.width=
+"100%";t.style.height="100%";var d=document.createElement("tbody");g=document.createElement("tr");p=document.createElement("td");p.style.verticalAlign="top";p.style.fontSize="10pt";mxUtils.write(p,mxResources.get("paperSize")+":");g.appendChild(p);p=document.createElement("td");p.style.verticalAlign="top";p.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(p,"pagesetupdialog",k.pageFormat);g.appendChild(p);d.appendChild(g);g=document.createElement("tr");p=document.createElement("td");
+mxUtils.write(p,mxResources.get("background")+":");g.appendChild(p);p=document.createElement("td");p.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var q=k.background;c();mxEvent.addListener(l,
+"click",function(d){b.pickColor(q||"none",function(b){q=b;c()});mxEvent.consume(d)});p.appendChild(l);mxUtils.write(p,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=k.getGridSize();p.appendChild(m);mxEvent.addListener(m,"change",function(){var b=parseInt(m.value);m.value=Math.max(1,isNaN(b)?k.getGridSize():b)});g.appendChild(p);d.appendChild(g);g=document.createElement("tr");
+p=document.createElement("td");mxUtils.write(p,mxResources.get("image")+":");g.appendChild(p);p=document.createElement("td");var n=document.createElement("button");n.className="geBtn";n.style.margin="0px";mxUtils.write(n,mxResources.get("change")+"...");var u=document.createElement("img");u.setAttribute("valign","middle");u.style.verticalAlign="middle";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.maxWidth="100px";u.style.cursor="pointer";u.style.height=
+"60px";u.style.padding="4px";var v=k.backgroundImage,y=function(d){b.showBackgroundImageDialog(function(b,d){d||(v=b,e())},v);mxEvent.consume(d)};mxEvent.addListener(n,"click",y);mxEvent.addListener(u,"click",y);e();p.appendChild(u);p.appendChild(n);g.appendChild(p);d.appendChild(g);g=document.createElement("tr");p=document.createElement("td");p.colSpan=2;p.style.paddingTop="16px";p.setAttribute("align","right");n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";
+b.editor.cancelFirst&&p.appendChild(n);y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(m.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,q,v,f.get());d.ignoreColor=k.background==q;d.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=v?v.src:null);k.pageFormat.width==d.previousFormat.width&&k.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||k.model.execute(d)});y.className="geBtn gePrimaryBtn";
+p.appendChild(y);b.editor.cancelFirst||p.appendChild(n);g.appendChild(p);d.appendChild(g);t.appendChild(d);this.container=t};
+PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function g(b,c,l){if(l||m!=document.activeElement&&n!=document.activeElement){b=!1;for(c=0;c<v.length;c++)l=v[c],C?"custom"==l.key&&(d.value=l.key,C=!1):null!=l.format&&("a4"==l.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==l.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==l.format.width&&
+e.height==l.format.height?(d.value=l.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(f.style.display="",q.style.display="none"):(m.value=e.width/100,n.value=e.height/100,p.setAttribute("checked","checked"),
+d.value="custom",f.style.display="none",q.style.display="")}}c="format-"+c;var p=document.createElement("input");p.setAttribute("name",c);p.setAttribute("type","radio");p.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.width="206px";var f=
+document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";p.style.marginRight="6px";f.appendChild(p);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));f.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));f.appendChild(l);var q=document.createElement("div");q.style.marginLeft=
+"4px";q.style.width="210px";q.style.height="24px";var m=document.createElement("input");m.setAttribute("size","7");m.style.textAlign="right";q.appendChild(m);mxUtils.write(q," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";q.appendChild(n);mxUtils.write(q," in");f.style.display="none";q.style.display="none";for(var u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var D=document.createElement("option");D.setAttribute("value",
+x.key);mxUtils.write(D,x.title);d.appendChild(D)}var C=!1;g();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(q);var G=e,J=function(b,c){var l=u[d.value];null!=l.format?(m.value=l.format.width/100,n.value=l.format.height/100,q.style.display="none",f.style.display=""):(f.style.display="none",q.style.display="");l=parseFloat(m.value);if(isNaN(l)||0>=l)m.value=e.width/100;l=parseFloat(n.value);if(isNaN(l)||0>=l)n.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(m.value)),
+Math.floor(100*parseFloat(n.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,l.height,l.width));c&&C||l.width==G.width&&l.height==G.height||(G=l,null!=k&&k(G))};mxEvent.addListener(c,"click",function(b){p.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(m,"blur",J);mxEvent.addListener(m,"click",J);mxEvent.addListener(n,"blur",J);mxEvent.addListener(n,"click",J);mxEvent.addListener(t,"change",J);mxEvent.addListener(p,
+"change",J);mxEvent.addListener(d,"change",function(b){C="custom"==d.value;J(b,!0)});J();return{set:function(b){e=b;g(null,null,!0)},get:function(){return G},widthInput:m,heightInput:n}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (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,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,c,e,k,g,n,t,d,f,l,m,p){f=null!=f?f:!0;var q,v,u=document.createElement("table"),y=document.createElement("tbody");u.style.position="absolute";u.style.top="30px";u.style.left="20px";q=document.createElement("tr");v=document.createElement("td");v.style.textOverflow="ellipsis";v.style.textAlign="right";v.style.maxWidth="100px";v.style.fontSize="10pt";v.style.width="84px";mxUtils.write(v,(g||mxResources.get("filename"))+":");q.appendChild(v);var x=document.createElement("input");
-x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=p?p+"px":"180px";var D=mxUtils.button(e,function(){if(null==n||n(x.value))f&&b.hideDialog(),k(x.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=u.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
+var FilenameDialog=function(b,c,e,k,g,p,t,d,f,l,q,m){f=null!=f?f:!0;var n,u,v=document.createElement("table"),y=document.createElement("tbody");v.style.position="absolute";v.style.top="30px";v.style.left="20px";n=document.createElement("tr");u=document.createElement("td");u.style.textOverflow="ellipsis";u.style.textAlign="right";u.style.maxWidth="100px";u.style.fontSize="10pt";u.style.width="84px";mxUtils.write(u,(g||mxResources.get("filename"))+":");n.appendChild(u);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(e,function(){if(null==p||p(x.value))f&&b.hideDialog(),k(x.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=v.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),D.click());b.stopPropagation();
-b.preventDefault()}))}}};v=document.createElement("td");v.style.whiteSpace="nowrap";v.appendChild(x);q.appendChild(v);if(null!=g||null==t)y.appendChild(q),null!=m&&(v.appendChild(FilenameDialog.createTypeHint(b,x,m)),null!=b.editor.diagramFileTypes&&(q=document.createElement("tr"),v=document.createElement("td"),v.style.textOverflow="ellipsis",v.style.textAlign="right",v.style.maxWidth="100px",v.style.fontSize="10pt",v.style.width="84px",mxUtils.write(v,mxResources.get("type")+":"),q.appendChild(v),
-v=document.createElement("td"),v.style.whiteSpace="nowrap",q.appendChild(v),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",v.appendChild(c),x.style.width=null!=p?p-40+"px":"190px",q.appendChild(v),y.appendChild(q)));null!=t&&(q=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(t),q.appendChild(v),y.appendChild(q));q=document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop=
-null!=m?"12px":"20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&v.appendChild(m);null!=d&&(p=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),p.className="geBtn",v.appendChild(p));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&D.click()});v.appendChild(D);b.editor.cancelFirst||v.appendChild(m);q.appendChild(v);y.appendChild(q);
-u.appendChild(y);this.container=u};FilenameDialog.filenameHelpLink=null;
+b.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(x);n.appendChild(u);if(null!=g||null==t)y.appendChild(n),null!=q&&(u.appendChild(FilenameDialog.createTypeHint(b,x,q)),null!=b.editor.diagramFileTypes&&(n=document.createElement("tr"),u=document.createElement("td"),u.style.textOverflow="ellipsis",u.style.textAlign="right",u.style.maxWidth="100px",u.style.fontSize="10pt",u.style.width="84px",mxUtils.write(u,mxResources.get("type")+":"),n.appendChild(u),
+u=document.createElement("td"),u.style.whiteSpace="nowrap",n.appendChild(u),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",u.appendChild(c),x.style.width=null!=m?m-40+"px":"190px",n.appendChild(u),y.appendChild(n)));null!=t&&(n=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(t),n.appendChild(u),y.appendChild(n));n=document.createElement("tr");u=document.createElement("td");u.colSpan=2;u.style.paddingTop=
+null!=q?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});q.className="geBtn";b.editor.cancelFirst&&u.appendChild(q);null!=d&&(m=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),m.className="geBtn",u.appendChild(m));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&D.click()});u.appendChild(D);b.editor.cancelFirst||u.appendChild(q);n.appendChild(u);y.appendChild(n);
+v.appendChild(y);this.container=v};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,c,e){var k=document.createElement("img");k.style.backgroundPosition="center bottom";k.style.backgroundRepeat="no-repeat";k.style.margin="2px 0 0 4px";k.style.verticalAlign="top";k.style.cursor="pointer";k.style.height="16px";k.style.width="16px";mxUtils.setOpacity(k,70);var g=function(){k.setAttribute("src",Editor.helpImage);k.setAttribute("title",mxResources.get("help"));for(var b=0;b<e.length;b++)if(0<e[b].ext.length&&c.value.toLowerCase().substring(c.value.length-
e[b].ext.length-1)=="."+e[b].ext){k.setAttribute("title",mxResources.get(e[b].title));break}};mxEvent.addListener(c,"keyup",g);mxEvent.addListener(c,"change",g);mxEvent.addListener(k,"click",function(c){var e=k.getAttribute("title");k.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&b.showError(null,e,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(c)});
g();return k};
@@ -2116,35 +2116,35 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var b=this.graph,d=nul
")";var g=f=0;null!=b.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),f=1+g.x,g=1+g.y);e=-Math.round(e-mxUtils.mod(this.translate.x*this.scale-f,e))+"px "+-Math.round(e-mxUtils.mod(this.translate.y*this.scale-g,e))+"px"}f=b.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=b.view.backgroundPageShape?(b.view.backgroundPageShape.node.style.backgroundPosition=e,b.view.backgroundPageShape.node.style.backgroundImage=c,b.view.backgroundPageShape.node.style.backgroundColor=d,b.view.backgroundPageShape.node.style.borderColor=
b.defaultPageBorderColor,b.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(b.container.className="geDiagramContainer",f.style.backgroundPosition=e,f.style.backgroundColor=d,f.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(b){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,c=[],e=1;e<this.gridSteps;e++){var g=e*d;c.push("M 0 "+g+" L "+f+" "+g+" M "+g+" 0 L "+g+
" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+b+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+b+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,d){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+c,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+d,e))+"px";f.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(b,d,f){var c=this.view.scale,e=this.view.translate,g=this.pageFormat,k=c*this.pageScale,n=this.view.getBackgroundPageBounds();
-d=n.width;f=n.height;var u=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(f/u.height)-1:0,x=b?Math.ceil(d/u.width)-1:0,D=n.x+d,C=n.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),
-Math.round(n.y+(f+1)*u.height)),new mxPoint(Math.round(D),Math.round(n.y+(f+1)*u.height))]:[new mxPoint(Math.round(n.x+(f+1)*u.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(f+1)*u.width),Math.round(C))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
+if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+c,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+d,e))+"px";f.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(b,d,f){var c=this.view.scale,e=this.view.translate,g=this.pageFormat,k=c*this.pageScale,p=this.view.getBackgroundPageBounds();
+d=p.width;f=p.height;var v=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(v.width,v.height)>this.minPageBreakDist)?Math.ceil(f/v.height)-1:0,x=b?Math.ceil(d/v.width)-1:0,D=p.x+d,C=p.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(p.x),
+Math.round(p.y+(f+1)*v.height)),new mxPoint(Math.round(D),Math.round(p.y+(f+1)*v.height))]:[new mxPoint(Math.round(p.x+(f+1)*v.width),Math.round(p.y)),new mxPoint(Math.round(p.x+(f+1)*v.width),Math.round(C))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
b(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(b,d,f){for(var e=0;e<d.length;e++){if(this.graph.isTableCell(d[e])||this.graph.isTableRow(d[e]))return!1;if(this.graph.getModel().isVertex(d[e])){var g=this.graph.getCellGeometry(d[e]);if(null!=g&&g.relative)return!1}}return c.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var b=
e.apply(this,arguments);b.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(b,arguments)});return b};mxGraphView.prototype.createBackgroundPageShape=function(b){return new mxRectangleShape(b,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var b=this.getGraphBounds(),d=0<b.width?b.x/this.scale-this.translate.x:0,f=0<b.height?b.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,
e=this.graph.pageScale,g=c.width*e,c=c.height*e,e=Math.floor(Math.min(0,d)/g),k=Math.floor(Math.min(0,f)/c);return new mxRectangle(this.scale*(this.translate.x+e*g),this.scale*(this.translate.y+k*c),this.scale*(Math.ceil(Math.max(1,d+b.width/this.scale)/g)-e)*g,this.scale*(Math.ceil(Math.max(1,f+b.height/this.scale)/c)-k)*c)};var k=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){k.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=b+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,d,f,c,e,k){var l=g.apply(this,arguments);null==k||k||mxEvent.addListener(l,"mousedown",function(b){mxEvent.consume(b)});return l};var n=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(b,d,f){var c,e=this.graph.model.getParent(b);if(d)c=this.graph.model.isEdge(b)?null:this.graph.getCellGeometry(b),c=!this.graph.model.isEdge(e)&&!this.graph.isSiblingSelected(b)&&(null!=c&&c.relative||!this.graph.isContainer(e)||this.graph.isPart(b));else if(c=n.apply(this,arguments),this.graph.isTableCell(b)||this.graph.isTableRow(b))c=e,this.graph.isTable(c)||(c=this.graph.model.getParent(c)),c=!this.graph.selectionCellsHandler.isHandled(c)||this.graph.isCellSelected(c)&&this.graph.isToggleEvent(f.getEvent())||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=b+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,d,f,c,e,k){var l=g.apply(this,arguments);null==k||k||mxEvent.addListener(l,"mousedown",function(b){mxEvent.consume(b)});return l};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(b,d,f){var c,e=this.graph.model.getParent(b);if(d)c=this.graph.model.isEdge(b)?null:this.graph.getCellGeometry(b),c=!this.graph.model.isEdge(e)&&!this.graph.isSiblingSelected(b)&&(null!=c&&c.relative||!this.graph.isContainer(e)||this.graph.isPart(b));else if(c=p.apply(this,arguments),this.graph.isTableCell(b)||this.graph.isTableRow(b))c=e,this.graph.isTable(c)||(c=this.graph.model.getParent(c)),c=!this.graph.selectionCellsHandler.isHandled(c)||this.graph.isCellSelected(c)&&this.graph.isToggleEvent(f.getEvent())||
this.graph.isCellSelected(b)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(b)&&this.graph.isCellSelected(e);return c};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(b){b=b.getCell();for(var d=this.graph.getModel(),f=d.getParent(b),c=this.graph.view.getState(f),e=this.graph.isCellSelected(b);null!=c&&(d.isVertex(f)||d.isEdge(f));){var g=this.graph.isCellSelected(f),e=e||g;if(g||!e&&(this.graph.isTableCell(b)||this.graph.isTableRow(b)))b=f;f=d.getParent(f)}return b}})();EditorUi=function(b,c,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=c||document.body;var k=this.editor.graph;k.lightbox=e;this.initialDefaultVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);if(e){var g=k.getGraphBounds;k.getGraphBounds=function(b){var d=g.apply(this,arguments);b=this.backgroundImage;if(null!=b){var f=this.view.translate,c=this.view.scale;d.add(new mxRectangle((f.x+b.x)*c,
(f.y+b.y)*c,b.width*c,b.height*c))}return d}}k.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,k.isEnabled=
-function(){return!1},k.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!k.standalone){var n="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),t="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");
-this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var f=b.clone();f.style="";var c=k.getCellStyle(f);b=[];var f=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),f.push(e));for(var l=k.getModel().getStyle(d.cell),g=null!=l?l.split(";"):[],l=0;l<g.length;l++){var m=g[l],p=m.indexOf("=");if(0<=p){e=m.substring(0,p);var q=m.substring(p+1);null!=c[e]&&"none"==q&&(b.push(q),f.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
-"keys",f,"values",b,"cells",[d.cell]))}}catch(ca){this.handleError(ca)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(n,d[c])&&n.push(d[c]);var f="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
-l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)n.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(n,t[c])&&n.push(t[c]);var m=function(b,d,f,c,e,g,m){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;f=null!=f?f:k.getModel();
-if(m){m=[];for(var E=0;E<b.length;E++)m=m.concat(f.getDescendants(b[E]));b=m}f.beginUpdate();try{for(E=0;E<b.length;E++){var p=b[E],q;if(d)q=["fontSize","fontFamily","fontColor"];else{var B=f.getStyle(p),u=null!=B?B.split(";"):[];q=n.slice();for(var v=0;v<u.length;v++){var F=u[v],x=F.indexOf("=");if(0<=x){var y=F.substring(0,x),N=mxUtils.indexOf(q,y);0<=N&&q.splice(N,1);for(m=0;m<l.length;m++){var C=l[m];if(0<=mxUtils.indexOf(C,y))for(var A=0;A<C.length;A++){var G=mxUtils.indexOf(q,C[A]);0<=G&&q.splice(G,
-1)}}}}}var J=f.isEdge(p);m=J?e:c;for(var D=f.getStyle(p),v=0;v<q.length;v++){var y=q[v],O=m[y];null!=O&&("shape"!=y||J)&&(!J||g||0>mxUtils.indexOf(t,y))&&(D=mxUtils.setStyle(D,y,O))}Editor.simpleLabels&&(D=mxUtils.setStyle(mxUtils.setStyle(D,"html",null),"whiteSpace",null));f.setStyle(p,D)}}finally{f.endUpdate()}return b};k.addListener("cellsInserted",function(b,d){m(d.getProperty("cells"),null,null,null,null,!0,!0)});k.addListener("textInserted",function(b,d){m(d.getProperty("cells"),!0)});this.insertHandler=
-m;this.createDivs();this.createUi();this.refresh();var p=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=p,this.menubarContainer.onmousedown=p,this.toolbarContainer.onselectstart=p,this.toolbarContainer.onmousedown=p,this.diagramContainer.onselectstart=p,this.diagramContainer.onmousedown=p,this.sidebarContainer.onselectstart=p,this.sidebarContainer.onmousedown=p,
-this.formatContainer.onselectstart=p,this.formatContainer.onmousedown=p,this.footerContainer.onselectstart=p,this.footerContainer.onmousedown=p,null!=this.tabContainer&&(this.tabContainer.onselectstart=p));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return p(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
-"contextmenu",c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var q=k.graphHandler.start;k.graphHandler.start=function(){null!=K.hoverIcons&&K.hoverIcons.reset();q.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
-function(b){var d=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(b)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(b)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var v=!1,u=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(b,d){return v||u.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(b){32!=b.which||k.isEditing()?
-mxEvent.isConsumed(b)||27!=b.keyCode||this.hideDialog(null,!0):(v=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(b)!=k.container||mxEvent.consume(b))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(b){k.container.style.cursor="";v=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(b){return y.apply(this,
-arguments)||v||mxEvent.isMouseEvent(b.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var D=k.isZoomWheelEvent;
-k.isZoomWheelEvent=function(){return v||D.apply(this,arguments)};var C=!1,G=null,J=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&C!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);
+function(){return!1},k.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!k.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),t="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");
+this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var f=b.clone();f.style="";var c=k.getCellStyle(f);b=[];var f=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),f.push(e));for(var l=k.getModel().getStyle(d.cell),g=null!=l?l.split(";"):[],l=0;l<g.length;l++){var q=g[l],m=q.indexOf("=");if(0<=m){e=q.substring(0,m);var n=q.substring(m+1);null!=c[e]&&"none"==n&&(b.push(n),f.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
+"keys",f,"values",b,"cells",[d.cell]))}}catch(ca){this.handleError(ca)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(p,d[c])&&p.push(d[c]);var f="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
+l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)p.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(p,t[c])&&p.push(t[c]);var q=function(b,d,f,c,e,g,q){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;f=null!=f?f:k.getModel();
+if(q){q=[];for(var E=0;E<b.length;E++)q=q.concat(f.getDescendants(b[E]));b=q}f.beginUpdate();try{for(E=0;E<b.length;E++){var m=b[E],n;if(d)n=["fontSize","fontFamily","fontColor"];else{var B=f.getStyle(m),v=null!=B?B.split(";"):[];n=p.slice();for(var u=0;u<v.length;u++){var F=v[u],x=F.indexOf("=");if(0<=x){var y=F.substring(0,x),N=mxUtils.indexOf(n,y);0<=N&&n.splice(N,1);for(q=0;q<l.length;q++){var C=l[q];if(0<=mxUtils.indexOf(C,y))for(var A=0;A<C.length;A++){var G=mxUtils.indexOf(n,C[A]);0<=G&&n.splice(G,
+1)}}}}}var J=f.isEdge(m);q=J?e:c;for(var D=f.getStyle(m),u=0;u<n.length;u++){var y=n[u],O=q[y];null!=O&&("shape"!=y||J)&&(!J||g||0>mxUtils.indexOf(t,y))&&(D=mxUtils.setStyle(D,y,O))}Editor.simpleLabels&&(D=mxUtils.setStyle(mxUtils.setStyle(D,"html",null),"whiteSpace",null));f.setStyle(m,D)}}finally{f.endUpdate()}return b};k.addListener("cellsInserted",function(b,d){q(d.getProperty("cells"),null,null,null,null,!0,!0)});k.addListener("textInserted",function(b,d){q(d.getProperty("cells"),!0)});this.insertHandler=
+q;this.createDivs();this.createUi();this.refresh();var m=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=m,this.menubarContainer.onmousedown=m,this.toolbarContainer.onselectstart=m,this.toolbarContainer.onmousedown=m,this.diagramContainer.onselectstart=m,this.diagramContainer.onmousedown=m,this.sidebarContainer.onselectstart=m,this.sidebarContainer.onmousedown=m,
+this.formatContainer.onselectstart=m,this.formatContainer.onmousedown=m,this.footerContainer.onselectstart=m,this.footerContainer.onmousedown=m,null!=this.tabContainer&&(this.tabContainer.onselectstart=m));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return m(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
+"contextmenu",c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var n=k.graphHandler.start;k.graphHandler.start=function(){null!=K.hoverIcons&&K.hoverIcons.reset();n.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
+function(b){var d=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(b)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(b)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var u=!1,v=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(b,d){return u||v.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(b){32!=b.which||k.isEditing()?
+mxEvent.isConsumed(b)||27!=b.keyCode||this.hideDialog(null,!0):(u=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(b)!=k.container||mxEvent.consume(b))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(b){k.container.style.cursor="";u=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(b){return y.apply(this,
+arguments)||u||mxEvent.isMouseEvent(b.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var D=k.isZoomWheelEvent;
+k.isZoomWheelEvent=function(){return u||D.apply(this,arguments)};var C=!1,G=null,J=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&C!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);
this.toolbar.fontMenu=G;this.toolbar.sizeMenu=J}C=k.cellEditor.isContentEditing();G=b;J=f;L=d}}),K=this,A=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){A.apply(this,arguments);H();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=K.toolbar&&(K.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),K.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},
0))};mxEvent.addListener(k.cellEditor.textarea,"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var M=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{M.apply(this,arguments),H()}catch(O){K.handleError(O)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(T){}var Q=
k.fireMouseEvent;k.fireMouseEvent=function(b,d,f){b==mxEvent.MOUSE_DOWN&&this.container.focus();Q.apply(this,arguments)};k.popupMenuHandler.autoExpand=!0;null!=this.menus&&(k.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,d,f){this.menus.createPopupMenu(b,d,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){k.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};k.connectionHandler.addListener(mxEvent.CONNECT,
-function(b,d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=K.hoverIcons&&K.hoverIcons.update(k.view.getState(f[f.length-1]))},0));m(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var m=0;m<e.length&&(l=k.getModel().isVertex(e[m])||l,!(g=k.getModel().isEdge(e[m])||g)||!l);m++);else g=l=!0;for(var e=c.getProperty("keys"),p=c.getProperty("values"),
-m=0;m<e.length;m++){var q=0<=mxUtils.indexOf(d,e[m]);if("strokeColor"!=e[m]||null!=p[m]&&"none"!=p[m])if(0<=mxUtils.indexOf(t,e[m]))g||0<=mxUtils.indexOf(f,e[m])?null==p[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=p[m]:l&&0<=mxUtils.indexOf(n,e[m])&&(null==p[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=p[m]);else if(0<=mxUtils.indexOf(n,e[m])){if(l||q)null==p[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=p[m];if(g||q||0<=mxUtils.indexOf(f,e[m]))null==
-p[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=p[m]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
+function(b,d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=K.hoverIcons&&K.hoverIcons.update(k.view.getState(f[f.length-1]))},0));q(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var q=0;q<e.length&&(l=k.getModel().isVertex(e[q])||l,!(g=k.getModel().isEdge(e[q])||g)||!l);q++);else g=l=!0;for(var e=c.getProperty("keys"),m=c.getProperty("values"),
+q=0;q<e.length;q++){var n=0<=mxUtils.indexOf(d,e[q]);if("strokeColor"!=e[q]||null!=m[q]&&"none"!=m[q])if(0<=mxUtils.indexOf(t,e[q]))g||0<=mxUtils.indexOf(f,e[q])?null==m[q]?delete k.currentEdgeStyle[e[q]]:k.currentEdgeStyle[e[q]]=m[q]:l&&0<=mxUtils.indexOf(p,e[q])&&(null==m[q]?delete k.currentVertexStyle[e[q]]:k.currentVertexStyle[e[q]]=m[q]);else if(0<=mxUtils.indexOf(p,e[q])){if(l||n)null==m[q]?delete k.currentVertexStyle[e[q]]:k.currentVertexStyle[e[q]]=m[q];if(g||n||0<=mxUtils.indexOf(f,e[q]))null==
+m[q]?delete k.currentEdgeStyle[e[q]]:k.currentEdgeStyle[e[q]]=m[q]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
"none"==k.currentEdgeStyle.edgeStyle||null==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==k.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==k.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==k.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
mxUtils.getValue(k.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(k.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var b=k.currentVertexStyle.fontFamily||"Helvetica",d=String(k.currentVertexStyle.fontSize||"12"),f=k.getView().getState(k.getSelectionCell());
@@ -2158,16 +2158,16 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);e.updateActionStates()};b.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,c=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,d){"mouseDown"==d.getProperty("eventName")&&c.hideShapePicker()}));var e=mxUtils.bind(this,function(){c.hideShapePicker(!0)});b.addListener("wheel",e);b.addListener(mxEvent.ESCAPE,e);b.view.addListener(mxEvent.SCALE,e);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,e);b.getSelectionModel().addListener(mxEvent.CHANGE,e);b.getModel().addListener(mxEvent.CHANGE,
e);var k=b.popupMenuHandler.isMenuShowing;b.popupMenuHandler.isMenuShowing=function(){return k.apply(this,arguments)||null!=c.shapePicker};var g=b.dblClick;b.dblClick=function(d,e){if(this.isEnabled())if(null!=e||null==c.sidebar||mxEvent.isShiftDown(d)||b.isCellLocked(b.getDefaultParent()))g.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d));mxEvent.consume(d);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(f.x,f.y)}),
-30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var n=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();n.apply(this,arguments)};var t=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,g){var f=g.getEvent();this.graph.isCloneEvent(f)||mxEvent.isShiftDown(f)?t.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,l,m){var k=b.getCompositeParent(d.cell);f=b.getCellGeometry(k);
-for(g.consume();null!=k&&b.model.isVertex(k)&&null!=f&&f.relative;)cell=k,k=b.model.getParent(cell),f=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(g.getGraphX(),g.getGraphY(),k,mxUtils.bind(this,function(d){m(d);null!=c.hoverIcons&&c.hoverIcons.update(b.view.getState(d))}),e)}),30)}),mxUtils.bind(this,function(b){this.graph.selectCellsForConnectVertex(b,f,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,e){null!=d&&window.clearTimeout(d);
-d=window.setTimeout(mxUtils.bind(this,function(){var d=e.getProperty("arrow"),f=e.getProperty("direction"),l=e.getProperty("event"),d=d.getBoundingClientRect(),g=mxUtils.getOffset(b.container),k=b.container.scrollLeft+d.x-g.x,g=b.container.scrollTop+d.y-g.y,n=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),x=c.showShapePicker(k,g,n,mxUtils.bind(this,function(d){null!=d&&b.connectVertex(n,f,b.defaultEdgeLength,l,!0,!0,function(f,e,l){l(d);null!=c.hoverIcons&&
+30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();p.apply(this,arguments)};var t=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,g){var f=g.getEvent();this.graph.isCloneEvent(f)||mxEvent.isShiftDown(f)?t.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,l,q){var k=b.getCompositeParent(d.cell);f=b.getCellGeometry(k);
+for(g.consume();null!=k&&b.model.isVertex(k)&&null!=f&&f.relative;)cell=k,k=b.model.getParent(cell),f=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(g.getGraphX(),g.getGraphY(),k,mxUtils.bind(this,function(d){q(d);null!=c.hoverIcons&&c.hoverIcons.update(b.view.getState(d))}),e)}),30)}),mxUtils.bind(this,function(b){this.graph.selectCellsForConnectVertex(b,f,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,e){null!=d&&window.clearTimeout(d);
+d=window.setTimeout(mxUtils.bind(this,function(){var d=e.getProperty("arrow"),f=e.getProperty("direction"),l=e.getProperty("event"),d=d.getBoundingClientRect(),g=mxUtils.getOffset(b.container),k=b.container.scrollLeft+d.x-g.x,g=b.container.scrollTop+d.y-g.y,p=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),x=c.showShapePicker(k,g,p,mxUtils.bind(this,function(d){null!=d&&b.connectVertex(p,f,b.defaultEdgeLength,l,!0,!0,function(f,e,l){l(d);null!=c.hoverIcons&&
c.hoverIcons.update(b.view.getState(d))},function(d){b.selectCellsForConnectVertex(d)},l,this.hoverIcons)}),f,!0);this.centerShapePicker(x,d,k,g,f);mxUtils.setOpacity(x,30);mxEvent.addListener(x,"mouseenter",function(){mxUtils.setOpacity(x,100)});mxEvent.addListener(x,"mouseleave",function(){c.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(b,c){null!=d&&window.clearTimeout(d)}))}};
-EditorUi.prototype.centerShapePicker=function(b,c,e,k,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)b.style.width="40px";var n=b.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(e-=n.width/2-10,k-=n.height+6):g==mxConstants.DIRECTION_SOUTH?(e-=n.width/2-10,k+=c.height+6):g==mxConstants.DIRECTION_WEST?(e-=n.width+6,k-=n.height/2-10):g==mxConstants.DIRECTION_EAST&&(e+=c.width+6,k-=n.height/2-10);b.style.left=e+"px";b.style.top=k+"px"};
-EditorUi.prototype.showShapePicker=function(b,c,e,k,g,n){b=this.createShapePicker(b,c,e,k,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,n),n);null!=b&&(null==this.hoverIcons||n||this.hoverIcons.reset(),n=this.editor.graph,n.popupMenuHandler.hideMenu(),n.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=k,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,c,e,k,g,n,t,d){var f=null;if(null!=t&&0<t.length){var l=this,m=this.editor.graph,f=document.createElement("div");g=m.view.getState(e);var p=null==e||null!=g&&m.isTransparentState(g)?null:m.copyStyle(e);e=6>t.length?35*t.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(f.style.backgroundColor=m.background);m.container.appendChild(f);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(e);null!=p&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(p,[d]):l.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var f=m.cloneCell(d);if(null!=k)k(f);else{f.geometry.x=m.snap(Math.round(b/m.view.scale)-m.view.translate.x-d.geometry.width/2);f.geometry.y=m.snap(Math.round(c/m.view.scale)-m.view.translate.y-d.geometry.height/2);m.model.beginUpdate();try{m.addCell(f)}finally{m.model.endUpdate()}m.setSelectionCell(f);
-m.scrollCellToVisible(f);m.startEditingAtCell(f);null!=l.hoverIcons&&l.hoverIcons.update(m.view.getState(f))}null!=n&&n()})});for(g=0;g<(d?Math.min(t.length,4):t.length);g++)e(t[g]);t=f.offsetTop+f.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<t&&(f.style.top=Math.max(m.container.scrollTop+22,c-t)+"px");t=f.offsetLeft+f.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<t&&(f.style.left=Math.max(m.container.scrollLeft+22,b-t)+"px")}return f};
+EditorUi.prototype.centerShapePicker=function(b,c,e,k,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(e-=p.width/2-10,k-=p.height+6):g==mxConstants.DIRECTION_SOUTH?(e-=p.width/2-10,k+=c.height+6):g==mxConstants.DIRECTION_WEST?(e-=p.width+6,k-=p.height/2-10):g==mxConstants.DIRECTION_EAST&&(e+=c.width+6,k-=p.height/2-10);b.style.left=e+"px";b.style.top=k+"px"};
+EditorUi.prototype.showShapePicker=function(b,c,e,k,g,p){b=this.createShapePicker(b,c,e,k,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=k,this.shapePicker=b);return b};
+EditorUi.prototype.createShapePicker=function(b,c,e,k,g,p,t,d){var f=null;if(null!=t&&0<t.length){var l=this,q=this.editor.graph,f=document.createElement("div");g=q.view.getState(e);var m=null==e||null!=g&&q.isTransparentState(g)?null:q.copyStyle(e);e=6>t.length?35*t.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=q.background&&q.background!=mxConstants.NONE&&(f.style.backgroundColor=q.background);q.container.appendChild(f);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(e);null!=m&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(m,[d]):l.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var f=q.cloneCell(d);if(null!=k)k(f);else{f.geometry.x=q.snap(Math.round(b/q.view.scale)-q.view.translate.x-d.geometry.width/2);f.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-d.geometry.height/2);q.model.beginUpdate();try{q.addCell(f)}finally{q.model.endUpdate()}q.setSelectionCell(f);
+q.scrollCellToVisible(f);q.startEditingAtCell(f);null!=l.hoverIcons&&l.hoverIcons.update(q.view.getState(f))}null!=p&&p()})});for(g=0;g<(d?Math.min(t.length,4):t.length);g++)e(t[g]);t=f.offsetTop+f.clientHeight-(q.container.scrollTop+q.container.offsetHeight);0<t&&(f.style.top=Math.max(q.container.scrollTop+22,c-t)+"px");t=f.offsetLeft+f.clientWidth-(q.container.scrollLeft+q.container.offsetWidth);0<t&&(f.style.left=Math.max(q.container.scrollLeft+22,b-t)+"px")}return f};
EditorUi.prototype.getCellsForShapePicker=function(b,c){var e=mxUtils.bind(this,function(b,c,e,t){return this.editor.graph.createVertex(null,null,t||"",0,0,c||120,e||60,b,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),
e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",
120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};
@@ -2182,35 +2182,35 @@ e==mxConstants.ARROW_DIAMOND_THIN?"1"==k?"geSprite geSprite-"+b+"thindiamond":"g
e?"geSprite geSprite-"+b+"eronetoone":"ERmany"==e?"geSprite geSprite-"+b+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+b+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+b+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+b+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,c=this.actions.get("paste"),e=this.actions.get("pasteHere");c.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));e.setEnabled(c.isEnabled())};
EditorUi.prototype.initClipboard=function(){var b=this,c=mxClipboard.cut;mxClipboard.cut=function(e){e.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(c){var e=null;if(c.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var e=e||c.getSelectionCells(),e=c.getExportableCells(c.model.getTopmostCells(e)),d={},f=c.createCellLookup(e),l=c.cloneCells(e,null,d),g=new mxGraphModel,k=g.getChildAt(g.getRoot(),
-0),q=0;q<l.length;q++){g.add(k,l[q]);var n=c.view.getState(e[q]);if(null!=n){var u=c.getCellGeometry(l[q]);null!=u&&u.relative&&!g.isEdge(e[q])&&null==f[mxObjectIdentity.get(g.getParent(e[q]))]&&(u.offset=null,u.relative=!1,u.x=n.x/n.view.scale-n.view.translate.x,u.y=n.y/n.view.scale-n.view.translate.y)}}c.updateCustomLinks(c.createCellMapping(d,f),l);mxClipboard.insertCount=1;mxClipboard.setCells(l)}b.updatePasteActionStates();return e};var e=mxClipboard.paste;mxClipboard.paste=function(c){var g=
+0),n=0;n<l.length;n++){g.add(k,l[n]);var p=c.view.getState(e[n]);if(null!=p){var v=c.getCellGeometry(l[n]);null!=v&&v.relative&&!g.isEdge(e[n])&&null==f[mxObjectIdentity.get(g.getParent(e[n]))]&&(v.offset=null,v.relative=!1,v.x=p.x/p.view.scale-p.view.translate.x,v.y=p.y/p.view.scale-p.view.translate.y)}}c.updateCustomLinks(c.createCellMapping(d,f),l);mxClipboard.insertCount=1;mxClipboard.setCells(l)}b.updatePasteActionStates();return e};var e=mxClipboard.paste;mxClipboard.paste=function(c){var g=
null;c.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):g=e.apply(this,arguments);b.updatePasteActionStates();return g};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);b.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(c,e){g.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var b=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+b.x*d.width),this.scale*(this.translate.y+b.y*d.height),this.scale*b.width*d.width,
-this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),m=b.view.translate,k=b.view.scale,E=mxRectangle.fromRectangle(l);
-E.x=E.x/k-m.x;E.y=E.y/k-m.y;E.width/=k;E.height/=k;var m=b.container.scrollTop,p=b.container.scrollLeft,q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)q+=3;var n=b.container.offsetWidth-q,q=b.container.offsetHeight-q;d=d?Math.max(.3,Math.min(f||1,n/E.width)):k;f=(n-d*E.width)/2/d;var u=0==this.lightboxVerticalDivider?0:(q-d*E.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),u=Math.max(u,0));if(g||l.width<n||l.height<q)b.view.scaleAndTranslate(d,Math.floor(f-
-E.x),Math.floor(u-E.y)),b.container.scrollTop=m*d/k,b.container.scrollLeft=p*d/k;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/k),Math.floor(l.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
+this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),q=b.view.translate,k=b.view.scale,E=mxRectangle.fromRectangle(l);
+E.x=E.x/k-q.x;E.y=E.y/k-q.y;E.width/=k;E.height/=k;var q=b.container.scrollTop,m=b.container.scrollLeft,n=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=b.container.offsetWidth-n,n=b.container.offsetHeight-n;d=d?Math.max(.3,Math.min(f||1,p/E.width)):k;f=(p-d*E.width)/2/d;var v=0==this.lightboxVerticalDivider?0:(n-d*E.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),v=Math.max(v,0));if(g||l.width<p||l.height<n)b.view.scaleAndTranslate(d,Math.floor(f-
+E.x),Math.floor(v-E.y)),b.container.scrollTop=q*d/k,b.container.scrollLeft=m*d/k;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/k),Math.floor(l.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=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.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"transition","opacity 600ms ease-in-out");var n=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var t=0,n=mxUtils.bind(this,function(b,d,f){t++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight=
-"8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",b);null!=f&&c.setAttribute("title",f);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",d);b.style.width="36px";b.style.filter="invert(100%)";c.appendChild(b);this.chromelessToolbar.appendChild(c);return c});null!=g.backBtn&&n(mxUtils.bind(this,function(b){window.location.href=g.backBtn.url;mxEvent.consume(b)}),Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=n(mxUtils.bind(this,
-function(b){this.actions.get("previousPage").funct();mxEvent.consume(b)}),Editor.previousImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.fontFamily=Editor.defaultHtmlFont;f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontWeight="bold";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(f);var l=n(mxUtils.bind(this,function(b){this.actions.get("nextPage").funct();
-mxEvent.consume(b)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",d.style.display=
-"",f.style.display="inline-block"):(l.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",m)}n(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();mxEvent.consume(b)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
-n(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.zoomFitImage,mxResources.get("fit"));var q=null,v=null,u=mxUtils.bind(this,function(b){null!=q&&(window.clearTimeout(q),q=null);null!=v&&(window.clearTimeout(v),v=null);q=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);q=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";v=null}),600)}),b||200)}),y=mxUtils.bind(this,function(b){null!=q&&(window.clearTimeout(q),q=null);null!=v&&(window.clearTimeout(v),v=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=n(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,
+"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var t=0,p=mxUtils.bind(this,function(b,d,f){t++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight=
+"8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",b);null!=f&&c.setAttribute("title",f);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",d);b.style.width="36px";b.style.filter="invert(100%)";c.appendChild(b);this.chromelessToolbar.appendChild(c);return c});null!=g.backBtn&&p(mxUtils.bind(this,function(b){window.location.href=g.backBtn.url;mxEvent.consume(b)}),Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=p(mxUtils.bind(this,
+function(b){this.actions.get("previousPage").funct();mxEvent.consume(b)}),Editor.previousImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.fontFamily=Editor.defaultHtmlFont;f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontWeight="bold";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(f);var l=p(mxUtils.bind(this,function(b){this.actions.get("nextPage").funct();
+mxEvent.consume(b)}),Editor.nextImage,mxResources.get("nextPage")),q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",d.style.display=
+"",f.style.display="inline-block"):(l.style.display="none",d.style.display="none",f.style.display="none");q()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",q)}p(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();mxEvent.consume(b)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
+p(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.zoomFitImage,mxResources.get("fit"));var n=null,u=null,v=mxUtils.bind(this,function(b){null!=n&&(window.clearTimeout(n),n=null);null!=u&&(window.clearTimeout(u),u=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
+"none";u=null}),600)}),b||200)}),y=mxUtils.bind(this,function(b){null!=n&&(window.clearTimeout(n),n=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=p(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,
"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));f=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(d)}),
-Editor.layersImage,mxResources.get("layers")),D=b.getModel();D.addListener(mxEvent.CHANGE,function(){x.style.display=1<D.getChildCount(D.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,
-"editWindow");mxEvent.consume(d)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(p=0;p<this.lightboxToolbarActions.length;p++){var C=this.lightboxToolbarActions[p];C.elem=n(C.fn,C.icon,C.tooltip)}null!=g.refreshBtn&&n(mxUtils.bind(this,function(b){g.refreshBtn.url?window.location.href=g.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,
-function(d){g.fullscreenBtn.url?b.openLink(g.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,function(b){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(b))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display=
-"none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||y(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",
-mxUtils.bind(this,function(d){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(d)?u():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?u():y(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||y(30)}));var G=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,f){this.startX=
-f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<G&&Math.abs(this.scrollTop-b.container.scrollTop)<G&&Math.abs(this.startX-f.getGraphX())<G&&Math.abs(this.startY-f.getGraphY())<G&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?u():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var J=
+Editor.layersImage,mxResources.get("layers")),D=b.getModel();D.addListener(mxEvent.CHANGE,function(){x.style.display=1<D.getChildCount(D.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,
+"editWindow");mxEvent.consume(d)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(m=0;m<this.lightboxToolbarActions.length;m++){var C=this.lightboxToolbarActions[m];C.elem=p(C.fn,C.icon,C.tooltip)}null!=g.refreshBtn&&p(mxUtils.bind(this,function(b){g.refreshBtn.url?window.location.href=g.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,
+function(d){g.fullscreenBtn.url?b.openLink(g.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(b){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(b))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display=
+"none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||y(30),v())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",
+mxUtils.bind(this,function(d){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(d)?v():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?v():y(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||y(30)}));var G=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,f){this.startX=
+f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<G&&Math.abs(this.scrollTop-b.container.scrollTop)<G&&Math.abs(this.startX-f.getGraphX())<G&&Math.abs(this.startY-f.getGraphY())<G&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?v():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var J=
b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*d.width;this.translate.y=b.y-(this.y0||0)*d.height}J.apply(this,arguments)};if(!b.isViewer()){var L=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),f=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*
f.x+d.width*c.width),l=Math.ceil(2*f.y+d.height*c.height),g=b.minimumGraphSize;if(null==g||g.width!=e||g.height!=l)b.minimumGraphSize=new mxRectangle(0,0,e,l);e=f.x-d.x*c.width;f=f.y-d.y*c.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==f?L.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=b.view.translate.x,c=b.view.translate.y,b.view.setTranslate(e,f),b.container.scrollLeft+=Math.round((e-d)*b.view.scale),b.container.scrollTop+=Math.round((f-
c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var H=b.view.getBackgroundPane(),K=b.view.getDrawPane();b.cumulativeZoomFactor=1;var A=null,M=null,Q=null,T=null,N=null,O=function(d){null!=A&&window.clearTimeout(A);window.setTimeout(function(){if(!b.isMouseDown||T)A=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,
"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),K.style.transformOrigin="",H.style.transformOrigin="",mxClient.IS_SF?(K.style.transform="scale(1)",H.style.transform="scale(1)",window.setTimeout(function(){K.style.transform="";H.style.transform=""},0)):(K.style.transform="",H.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var d=new mxPoint(b.container.scrollLeft,b.container.scrollTop),
-f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,m=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,m=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=Q&&(g+=d.x-Q.x,m+=d.y-Q.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-1),m*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==m||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=m*(b.cumulativeZoomFactor-1)));null!=N&&K.setAttribute("filter",
+f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,q=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,q=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=Q&&(g+=d.x-Q.x,q+=d.y-Q.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-1),q*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==q||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=q*(b.cumulativeZoomFactor-1)));null!=N&&K.setAttribute("filter",
N);b.cumulativeZoomFactor=1;N=T=M=Q=A=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},ha=Date.now();b.lazyZoom=function(d,f,c){(f=f||!b.scrollbars)&&(M=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-ha)){ha=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==
N&&""!=K.getAttribute("filter")&&(N=K.getAttribute("filter"),K.removeAttribute("filter"));Q=new mxPoint(b.container.scrollLeft,b.container.scrollTop);d=f?b.container.scrollLeft+b.container.clientWidth/2:M.x+b.container.scrollLeft-b.container.offsetLeft;var l=f?b.container.scrollTop+b.container.clientHeight/2:M.y+b.container.scrollTop-b.container.offsetTop;K.style.transformOrigin=d+"px "+l+"px";K.style.transform="scale("+this.cumulativeZoomFactor+")";H.style.transformOrigin=d+"px "+l+"px";H.style.transform=
@@ -2239,17 +2239,17 @@ this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSe
EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
EditorUi.prototype.setPageFormat=function(b,c){c=null!=c?c:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;c||(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(b){this.editor.graph.pageScale=b;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(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),c=this.actions.get("redo"),e=this.editor.undoManager,k=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,k);e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);e.addListener(mxEvent.CLEAR,k);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);k()};var n=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(b,d){n.apply(this,arguments);k()};k()};
-EditorUi.prototype.updateActionStates=function(){var b=this.editor.graph,c=!1,e=!1,k=!1,g=!1,n=[],t=b.getSelectionCells();if(null!=t)for(var d=0;d<t.length;d++){var f=t[d];b.isCellEditable(f)&&(n.push(f),g=!0,b.getModel().isEdge(f)&&(k=!0),b.getModel().isVertex(f)&&(c=!0,0<b.getModel().getChildCount(f)||b.isContainer(f)))&&(e=!0)}t="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(d=
-0;d<t.length;d++)this.actions.get(t[d]).setEnabled(g);this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(g);this.actions.get("copySize").setEnabled(1==b.getSelectionCount());this.actions.get("bringForward").setEnabled(1==n.length);this.actions.get("sendBackward").setEnabled(1==n.length);this.actions.get("turn").setEnabled(0<b.getResizableCells(b.getSelectionCells()).length);
-this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(c);this.actions.get("wordWrap").setEnabled(c);this.actions.get("autosize").setEnabled(c);k=c&&1==b.getSelectionCount();this.actions.get("group").setEnabled(1<b.getSelectionCount()||k&&!b.isContainer(b.getSelectionCell()));this.actions.get("ungroup").setEnabled(e);this.actions.get("removeFromGroup").setEnabled(k&&b.getModel().isVertex(b.getModel().getParent(n[0])));b.view.getState(b.getSelectionCell());this.menus.get("navigation").setEnabled(g||
+EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),c=this.actions.get("redo"),e=this.editor.undoManager,k=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,k);e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);e.addListener(mxEvent.CLEAR,k);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);k()};var p=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(b,d){p.apply(this,arguments);k()};k()};
+EditorUi.prototype.updateActionStates=function(){var b=this.editor.graph,c=!1,e=!1,k=!1,g=!1,p=[],t=b.getSelectionCells();if(null!=t)for(var d=0;d<t.length;d++){var f=t[d];b.isCellEditable(f)&&(p.push(f),g=!0,b.getModel().isEdge(f)&&(k=!0),b.getModel().isVertex(f)&&(c=!0,0<b.getModel().getChildCount(f)||b.isContainer(f)))&&(e=!0)}t="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(d=
+0;d<t.length;d++)this.actions.get(t[d]).setEnabled(g);this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(g);this.actions.get("copySize").setEnabled(1==b.getSelectionCount());this.actions.get("bringForward").setEnabled(1==p.length);this.actions.get("sendBackward").setEnabled(1==p.length);this.actions.get("turn").setEnabled(0<b.getResizableCells(b.getSelectionCells()).length);
+this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(c);this.actions.get("wordWrap").setEnabled(c);this.actions.get("autosize").setEnabled(c);k=c&&1==b.getSelectionCount();this.actions.get("group").setEnabled(1<b.getSelectionCount()||k&&!b.isContainer(b.getSelectionCell()));this.actions.get("ungroup").setEnabled(e);this.actions.get("removeFromGroup").setEnabled(k&&b.getModel().isVertex(b.getModel().getParent(p[0])));b.view.getState(b.getSelectionCell());this.menus.get("navigation").setEnabled(g||
null!=b.view.currentRoot);this.actions.get("collapsible").setEnabled(c&&(b.isContainer(b.getSelectionCell())||0<b.model.getChildCount(b.getSelectionCell())));this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.getSelectionCount()&&b.isValidRoot(b.getSelectionCell()));e=1==b.getSelectionCount()&&b.isCellFoldable(b.getSelectionCell());this.actions.get("expand").setEnabled(e);this.actions.get("collapse").setEnabled(e);
-this.actions.get("editLink").setEnabled(1==n.length);this.actions.get("openLink").setEnabled(1==b.getSelectionCount()&&null!=b.getLinkForCell(b.getSelectionCell()));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);n=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent());this.menus.get("layout").setEnabled(n);this.menus.get("insert").setEnabled(n);this.menus.get("direction").setEnabled(n&&c);this.menus.get("align").setEnabled(n&&
-c&&1<b.getSelectionCount());this.menus.get("distribute").setEnabled(n&&c&&1<b.getSelectionCount());this.actions.get("selectVertices").setEnabled(n);this.actions.get("selectEdges").setEnabled(n);this.actions.get("selectAll").setEnabled(n);this.actions.get("selectNone").setEnabled(n);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
+this.actions.get("editLink").setEnabled(1==p.length);this.actions.get("openLink").setEnabled(1==b.getSelectionCount()&&null!=b.getLinkForCell(b.getSelectionCell()));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);p=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent());this.menus.get("layout").setEnabled(p);this.menus.get("insert").setEnabled(p);this.menus.get("direction").setEnabled(p&&c);this.menus.get("align").setEnabled(p&&
+c&&1<b.getSelectionCount());this.menus.get("distribute").setEnabled(p&&c&&1<b.getSelectionCount());this.actions.get("selectVertices").setEnabled(p);this.actions.get("selectEdges").setEnabled(p);this.actions.get("selectAll").setEnabled(p);this.actions.get("selectNone").setEnabled(p);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var c=this.container.clientWidth,e=this.container.clientHeight;this.container==document.body&&(c=document.body.clientWidth||document.documentElement.clientWidth,e=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 g=Math.max(0,Math.min(this.hsplitPosition,c-this.splitSize-
-20)),n=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",n+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",n+=this.toolbarHeight);0<n&&(n+=1);c=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,c=Math.max(0,Math.min(e-n-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=c+"px";
-this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=n+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=n+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var t=this.getDiagramContainerOffset(),d=null!=this.hsplit.parentNode?g+this.splitSize:0;this.diagramContainer.style.left=d+t.x+"px";this.diagramContainer.style.top=n+t.y+"px";this.footerContainer.style.height=
+20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&(p+=1);c=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,c=Math.max(0,Math.min(e-p-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=c+"px";
+this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var t=this.getDiagramContainerOffset(),d=null!=this.hsplit.parentNode?g+this.splitSize:0;this.diagramContainer.style.left=d+t.x+"px";this.diagramContainer.style.top=p+t.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=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px");this.diagramContainer.style.right=e+"px";g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=
this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+c+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";this.diagramContainer.style.bottom=this.footerHeight+k+g+"px";b&&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"));
@@ -2260,18 +2260,18 @@ 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(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};
EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(b){var c=document.createElement("div");c.className=b;return c};
-EditorUi.prototype.addSplitHandler=function(b,c,e,k){function g(b){if(null!=t){var g=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));k(Math.max(0,d+(c?g.x-t.x:t.y-g.y)-e));mxEvent.consume(b);d!=m()&&(f=!0,l=null)}}function n(b){g(b);t=d=null}var t=null,d=null,f=!0,l=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var m=mxUtils.bind(this,function(){var d=parseInt(c?b.style.left:b.style.bottom);c||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(b,function(b){t=new mxPoint(mxEvent.getClientX(b),
-mxEvent.getClientY(b));d=m();f=!1;mxEvent.consume(b)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){if(!f&&this.hsplitClickEnabled){var d=null!=l?l-e:0;l=m();k(d);mxEvent.consume(b)}}));mxEvent.addGestureListeners(document,null,g,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,n)})};
-EditorUi.prototype.handleError=function(b,c,e,k,g){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=c){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=b&&null!=b.message&&(g=mxUtils.htmlEntities(b.message));this.showError(c,g,n,e,null,null,null,null,null,null,null,null,k?e:null)}else null!=e&&e()};
-EditorUi.prototype.showError=function(b,c,e,k,g,n,t,d,f,l,m,p,q){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,g,n,t,p,d,f);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,m||100+20*c,!0,!1,q);b.init()};EditorUi.prototype.showDialog=function(b,c,e,k,g,n,t,d,f,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,c,e,k,g,n,t,d,f,l);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(b,c,e,k){function g(b){if(null!=t){var g=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));k(Math.max(0,d+(c?g.x-t.x:t.y-g.y)-e));mxEvent.consume(b);d!=q()&&(f=!0,l=null)}}function p(b){g(b);t=d=null}var t=null,d=null,f=!0,l=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var q=mxUtils.bind(this,function(){var d=parseInt(c?b.style.left:b.style.bottom);c||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(b,function(b){t=new mxPoint(mxEvent.getClientX(b),
+mxEvent.getClientY(b));d=q();f=!1;mxEvent.consume(b)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){if(!f&&this.hsplitClickEnabled){var d=null!=l?l-e:0;l=q();k(d);mxEvent.consume(b)}}));mxEvent.addGestureListeners(document,null,g,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,p)})};
+EditorUi.prototype.handleError=function(b,c,e,k,g){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=c){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=b&&null!=b.message&&(g=mxUtils.htmlEntities(b.message));this.showError(c,g,p,e,null,null,null,null,null,null,null,null,k?e:null)}else null!=e&&e()};
+EditorUi.prototype.showError=function(b,c,e,k,g,p,t,d,f,l,q,m,n){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,g,p,t,m,d,f);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,q||100+20*c,!0,!1,n);b.init()};EditorUi.prototype.showDialog=function(b,c,e,k,g,p,t,d,f,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,c,e,k,g,p,t,d,f,l);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,c,e){null!=this.dialogs&&0<this.dialogs.length&&(null==e||e==this.dialog.container.firstChild)&&(e=this.dialogs.pop(),0==e.close(b,c)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var c=b.getSelectionCells(),e=new mxDictionary,k=[],g=0;g<c.length;g++){var n=b.isTableCell(c[g])?b.model.getParent(c[g]):c[g];null==n||e.get(n)||(e.put(n,!0),k.push(n))}b.setSelectionCells(b.duplicateCells(k,!1))}catch(t){this.handleError(t)}};
-EditorUi.prototype.pickColor=function(b,c){var e=this.editor.graph,k=e.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),n=new ColorDialog(this,b||"none",function(b){e.cellEditor.restoreSelection(k);c(b)},function(){e.cellEditor.restoreSelection(k)});this.showDialog(n.container,230,g,!0,!1);n.init()};
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var c=b.getSelectionCells(),e=new mxDictionary,k=[],g=0;g<c.length;g++){var p=b.isTableCell(c[g])?b.model.getParent(c[g]):c[g];null==p||e.get(p)||(e.put(p,!0),k.push(p))}b.setSelectionCells(b.duplicateCells(k,!1))}catch(t){this.handleError(t)}};
+EditorUi.prototype.pickColor=function(b,c){var e=this.editor.graph,k=e.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),p=new ColorDialog(this,b||"none",function(b){e.cellEditor.restoreSelection(k);c(b)},function(){e.cellEditor.restoreSelection(k)});this.showDialog(p.container,230,g,!0,!1);p.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=null;try{var e=b.indexOf("&lt;mxGraphModel ");if(0<=e){var k=b.lastIndexOf("&lt;/mxGraphModel&gt;");k>e&&(c=b.substring(e,k+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return c};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){null!=c?b(c):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){if(null!=c){var e=decodeURIComponent(c);this.isCompatibleString(e)&&(c=e)}b(c)}),"text")}),"html")};
EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,c){navigator.clipboard.read().then(mxUtils.bind(this,function(e){if(null!=e&&0<e.length&&"html"==c&&0<=mxUtils.indexOf(e[0].types,"text/html"))e[0].getType("text/html").then(mxUtils.bind(this,function(c){c.text().then(mxUtils.bind(this,function(c){try{var e=this.parseHtmlData(c),g="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var d=g.lastIndexOf("%3E");
-0<=d&&d<g.length-3&&(g=g.substring(0,d+3))}catch(m){}try{var f=e.getElementsByTagName("span"),l=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(g);this.isCompatibleString(l)&&(g=l)}catch(m){}}catch(m){}b(this.isCompatibleString(g)?g:null)}))["catch"](function(c){b(null)})}))["catch"](function(c){b(null)});else if(null!=e&&0<e.length&&"text"==c&&0<=mxUtils.indexOf(e[0].types,"text/plain"))e[0].getType("text/plain").then(function(c){c.text().then(function(c){b(c)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+0<=d&&d<g.length-3&&(g=g.substring(0,d+3))}catch(q){}try{var f=e.getElementsByTagName("span"),l=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(g);this.isCompatibleString(l)&&(g=l)}catch(q){}}catch(q){}b(this.isCompatibleString(g)?g:null)}))["catch"](function(c){b(null)})}))["catch"](function(c){b(null)});else if(null!=e&&0<e.length&&"text"==c&&0<=mxUtils.indexOf(e[0].types,"text/plain"))e[0].getType("text/plain").then(function(c){c.text().then(function(c){b(c)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(c){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var c=null;if(null!=b&&0<b.length){var e="<meta "==b.substring(0,6),c=document.createElement("div");c.innerHTML=(e?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=c.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
c.firstChild.nodeName&&"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(b=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,b==c.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(c,b),asHtml=!1));e=e&&null!=c.firstChild?c.firstChild.nextSibling:c.firstChild;null!=e&&null==e.nextSibling&&e.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==e.nodeName?(b=e.getAttribute("src"),
@@ -2282,19 +2282,19 @@ EditorUi.prototype.extractGraphModelFromEvent=function(b){var c=null,e=null;null
EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,c);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(c.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(c))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(c);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
EditorUi.prototype.executeLayout=function(b,c,e){var k=this.editor.graph;if(k.isEnabled()){k.getModel().beginUpdate();try{b()}catch(g){throw g;}finally{this.allowAnimation&&c&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(b=new mxMorphing(k),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=e&&e()})),b.startAnimation()):(k.getModel().endUpdate(),null!=e&&e())}}};
-EditorUi.prototype.showImageDialog=function(b,c,e,k){k=this.editor.graph.cellEditor;var g=k.saveSelection(),n=mxUtils.prompt(b,c);k.restoreSelection(g);if(null!=n&&0<n.length){var t=new Image;t.onload=function(){e(n,t.width,t.height)};t.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};t.src=n}else e(null)};EditorUi.prototype.showLinkDialog=function(b,c,e){b=new LinkDialog(this,b,c,e);this.showDialog(b.container,420,90,!0,!0);b.init()};
+EditorUi.prototype.showImageDialog=function(b,c,e,k){k=this.editor.graph.cellEditor;var g=k.saveSelection(),p=mxUtils.prompt(b,c);k.restoreSelection(g);if(null!=p&&0<p.length){var t=new Image;t.onload=function(){e(p,t.width,t.height)};t.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};t.src=p}else e(null)};EditorUi.prototype.showLinkDialog=function(b,c,e){b=new LinkDialog(this,b,c,e);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b){b=new ChangePageSetup(this,null,b);b.ignoreColor=!0;this.editor.graph.model.execute(b)});var e=mxUtils.prompt(mxResources.get("backgroundImage"),null!=c?c.src:"");null!=e&&0<e.length?(c=new Image,c.onload=function(){b(new mxImage(e,c.width,c.height),!1)},c.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},c.src=e):b(null)};
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,c,e){mxUtils.confirm(b)?null!=c&&c():null!=e&&e()};EditorUi.prototype.createOutline=function(b){var c=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){c.update(!1)});return c};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
EditorUi.prototype.createKeyHandler=function(b){function c(b,f,c){t.push(function(){if(!k.isSelectionEmpty()&&k.isEnabled())if(f=null!=f?f:1,c){k.getModel().beginUpdate();try{for(var d=k.getSelectionCells(),e=0;e<d.length;e++)if(k.getModel().isVertex(d[e])&&k.isCellResizable(d[e])){var l=k.getCellGeometry(d[e]);null!=l&&(l=l.clone(),37==b?l.width=Math.max(0,l.width-f):38==b?l.height=Math.max(0,l.height-f):39==b?l.width+=f:40==b&&(l.height+=f),k.getModel().setGeometry(d[e],l))}}finally{k.getModel().endUpdate()}}else{var g=
k.getSelectionCell(),l=k.model.getParent(g),d=null;1==k.getSelectionCount()&&k.model.isVertex(g)&&null!=k.layoutManager&&!k.isCellLocked(g)&&(d=k.layoutManager.getLayout(l));if(null!=d&&d.constructor==mxStackLayout)d=l.getIndex(g),37==b||38==b?k.model.add(l,g,Math.max(0,d-1)):39!=b&&40!=b||k.model.add(l,g,Math.min(k.model.getChildCount(l),d+1));else{d=k.getMovableCells(k.getSelectionCells());g=[];for(e=0;e<d.length;e++)l=k.getCurrentCellStyle(d[e]),"1"==mxUtils.getValue(l,"part","0")?(l=k.model.getParent(d[e]),
-k.model.isVertex(l)&&0>mxUtils.indexOf(d,l)&&g.push(l)):g.push(d[e]);0<g.length&&(d=l=0,37==b?l=-f:38==b?d=-f:39==b?l=f:40==b&&(d=f),k.moveCells(g,l,d))}}});null!=d&&window.clearTimeout(d);d=window.setTimeout(function(){if(0<t.length){k.getModel().beginUpdate();try{for(var b=0;b<t.length;b++)t[b]();t=[]}finally{k.getModel().endUpdate()}}},200)}var e=this,k=this.editor.graph,g=new mxKeyHandler(k),n=g.isEventIgnored;g.isEventIgnored=function(b){return!(mxEvent.isShiftDown(b)&&9==b.keyCode)&&(!this.isControlDown(b)||
-mxEvent.isShiftDown(b)||90!=b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode&&85!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&n.apply(this,arguments)};g.isEnabledForEvent=function(b){return!mxEvent.isConsumed(b)&&this.isGraphEvent(b)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};g.isControlDown=function(b){return mxEvent.isControlDown(b)||mxClient.IS_MAC&&b.metaKey};var t=[],d=
+k.model.isVertex(l)&&0>mxUtils.indexOf(d,l)&&g.push(l)):g.push(d[e]);0<g.length&&(d=l=0,37==b?l=-f:38==b?d=-f:39==b?l=f:40==b&&(d=f),k.moveCells(g,l,d))}}});null!=d&&window.clearTimeout(d);d=window.setTimeout(function(){if(0<t.length){k.getModel().beginUpdate();try{for(var b=0;b<t.length;b++)t[b]();t=[]}finally{k.getModel().endUpdate()}}},200)}var e=this,k=this.editor.graph,g=new mxKeyHandler(k),p=g.isEventIgnored;g.isEventIgnored=function(b){return!(mxEvent.isShiftDown(b)&&9==b.keyCode)&&(!this.isControlDown(b)||
+mxEvent.isShiftDown(b)||90!=b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode&&85!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};g.isEnabledForEvent=function(b){return!mxEvent.isConsumed(b)&&this.isGraphEvent(b)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};g.isControlDown=function(b){return mxEvent.isControlDown(b)||mxClient.IS_MAC&&b.metaKey};var t=[],d=
null,f={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=g.getFunction;mxKeyHandler.prototype.getFunction=function(b){if(k.isEnabled()){if(mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){var d=e.actions.get(e.altShiftActions[b.keyCode]);if(null!=d)return d.funct}if(null!=f[b.keyCode]&&!k.isSelectionEmpty())if(!this.isControlDown(b)&&mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){if(k.model.isVertex(k.getSelectionCell()))return function(){var d=
k.connectVertex(k.getSelectionCell(),f[b.keyCode],k.defaultEdgeLength,b,!0);null!=d&&0<d.length&&(1==d.length&&k.model.isEdge(d[0])?k.setSelectionCell(k.model.getTerminal(d[0],!1)):k.setSelectionCell(d[d.length-1]),k.scrollCellToVisible(k.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(k.view.getState(k.getSelectionCell())))}}else return this.isControlDown(b)?function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null,!0)}:function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null)}}return l.apply(this,
-arguments)};g.bindAction=mxUtils.bind(this,function(b,d,f,c){var e=this.actions.get(f);null!=e&&(f=function(){e.isEnabled()&&e.funct()},d?c?g.bindControlShiftKey(b,f):g.bindControlKey(b,f):c?g.bindShiftKey(b,f):g.bindKey(b,f))});var m=this,p=g.escape;g.escape=function(b){p.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){k.exitGroup()});g.bindControlShiftKey(35,function(){k.enterGroup()});g.bindShiftKey(36,function(){k.home()});g.bindKey(35,function(){k.refresh()});
-g.bindAction(107,!0,"zoomIn");g.bindAction(109,!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){k.isEnabled()&&k.foldCells(!0)}),g.bindControlKey(35,function(){k.isEnabled()&&k.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),
+arguments)};g.bindAction=mxUtils.bind(this,function(b,d,f,c){var e=this.actions.get(f);null!=e&&(f=function(){e.isEnabled()&&e.funct()},d?c?g.bindControlShiftKey(b,f):g.bindControlKey(b,f):c?g.bindShiftKey(b,f):g.bindKey(b,f))});var q=this,m=g.escape;g.escape=function(b){m.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){k.exitGroup()});g.bindControlShiftKey(35,function(){k.enterGroup()});g.bindShiftKey(36,function(){k.home()});g.bindKey(35,function(){k.refresh()});
+g.bindAction(107,!0,"zoomIn");g.bindAction(109,!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){k.isEnabled()&&k.foldCells(!0)}),g.bindControlKey(35,function(){k.isEnabled()&&k.foldCells(!1)}),g.bindControlKey(13,function(){q.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),
g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),
g.bindAction(66,!0,"bold"),g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,
!0,"formatPanel",!0),g.bindAction(85,!0,"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){k.isEnabled()&&k.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
@@ -2303,38 +2303,38 @@ EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),
"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}for(var c=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],b=0;b<c.length;b++)null!=c[b]&&null!=c[b].parentNode&&c[b].parentNode.removeChild(c[b])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var b=[["nbsp","160"],["shy","173"]],c=mxUtils.parseXml;mxUtils.parseXml=function(e){for(var k=0;k<b.length;k++)e=e.replace(new RegExp("&"+b[k][0]+";","g"),"&#"+b[k][1]+";");return c(e)}})();
Date.prototype.toISOString||function(){function b(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,c=function(c){return"function"===typeof c||"[object Function]"===b.call(c)},e=Math.pow(2,53)-1;return function(b){var g=Object(b);if(null==b)throw new TypeError("Array.from requires an array-like object - not null or undefined");var k=1<arguments.length?arguments[1]:void 0,t;if("undefined"!==typeof k){if(!c(k))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(t=
-arguments[2])}var d;d=Number(g.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),e);for(var f=c(this)?Object(new this(d)):Array(d),l=0,m;l<d;)m=g[l],f[l]=k?"undefined"===typeof t?k(m,l):k.call(t,m,l):m,l+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+arguments[2])}var d;d=Number(g.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),e);for(var f=c(this)?Object(new this(d)):Array(d),l=0,q;l<d;)q=g[l],f[l]=k?"undefined"===typeof t?k(q,l):k.call(t,q,l):q,l+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?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.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,c,e){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,c,e,k,g,n){mxGraph.call(this,b,c,e,k);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!1;b=this.baseUrl;c=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=b.indexOf("/",c+2),0<c&&(this.domainUrl=b.substring(0,c)),c=b.lastIndexOf("/"),0<c&&(this.domainPathUrl=b.substring(0,c+1)));this.isHtmlLabel=function(b){b=this.getCurrentCellStyle(b);
-return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState(),k=this.view.scale;if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),m=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=
-g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var p=this.selectionCellsHandler.getHandler(g.cell);null!=p&&null!=p.bends&&0<p.bends.length&&(l=p.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(p=this.selectionCellsHandler.getHandler(g.cell),null==p||null==p.getHandleForEvent(e))){var q=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);q.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var n=this.model.getParent(g.cell),p=this.model.getParent(n);if(!this.isCellSelected(p)){var u=this.getCellGeometry(g.cell),u=null!=u.alternateBounds?u.alternateBounds:u;if(mxUtils.intersects(q,new mxRectangle(g.x,g.y-2,u.width*k,3))&&this.model.getChildAt(p,0)!=n||mxUtils.intersects(q,new mxRectangle(g.x,g.y+u.height-2,u.width,3))||mxUtils.intersects(q,new mxRectangle(g.x-2,g.y,2,u.height*k))&&
-this.model.getChildAt(n,0)!=g.cell||mxUtils.intersects(q,new mxRectangle(g.x+u.width*k-2,g.y,2,u.height*k)))n=this.selectionCellsHandler.isHandled(p),this.selectCellForEvent(p,e.getEvent()),p=this.selectionCellsHandler.getHandler(p),null!=p&&(u=p.getHandleForEvent(e),null!=u&&(p.start(e.getGraphX(),e.getGraphY(),u),p.blockDelayedSelection=!n,e.consume()))}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(p=this.getActualStartSize(g.cell),
-(0<p.x||0<p.width)&&mxUtils.intersects(q,new mxRectangle(g.x+(p.x-p.width-1)*k+(0==p.x?g.width:0),g.y,1,g.height))||(0<p.y||0<p.height)&&mxUtils.intersects(q,new mxRectangle(g.x,g.y+(p.y-p.height-1)*k+(0==p.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),p=this.selectionCellsHandler.getHandler(g.cell),null!=p&&(u=mxEvent.CUSTOM_HANDLE-p.customHandles.length+1,p.start(e.getGraphX(),e.getGraphY(),u),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,
+Graph=function(b,c,e,k,g,p){mxGraph.call(this,b,c,e,k);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;c=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=b.indexOf("/",c+2),0<c&&(this.domainUrl=b.substring(0,c)),c=b.lastIndexOf("/"),0<c&&(this.domainPathUrl=b.substring(0,c+1)));this.isHtmlLabel=function(b){b=this.getCurrentCellStyle(b);
+return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,q=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState(),k=this.view.scale;if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),q=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=
+g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var m=this.selectionCellsHandler.getHandler(g.cell);null!=m&&null!=m.bends&&0<m.bends.length&&(l=m.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(m=this.selectionCellsHandler.getHandler(g.cell),null==m||null==m.getHandleForEvent(e))){var n=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);n.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var p=this.model.getParent(g.cell),m=this.model.getParent(p);if(!this.isCellSelected(m)){var v=this.getCellGeometry(g.cell),v=null!=v.alternateBounds?v.alternateBounds:v;if(mxUtils.intersects(n,new mxRectangle(g.x,g.y-2,v.width*k,3))&&this.model.getChildAt(m,0)!=p||mxUtils.intersects(n,new mxRectangle(g.x,g.y+v.height-2,v.width,3))||mxUtils.intersects(n,new mxRectangle(g.x-2,g.y,2,v.height*k))&&
+this.model.getChildAt(p,0)!=g.cell||mxUtils.intersects(n,new mxRectangle(g.x+v.width*k-2,g.y,2,v.height*k)))p=this.selectionCellsHandler.isHandled(m),this.selectCellForEvent(m,e.getEvent()),m=this.selectionCellsHandler.getHandler(m),null!=m&&(v=m.getHandleForEvent(e),null!=v&&(m.start(e.getGraphX(),e.getGraphY(),v),m.blockDelayedSelection=!p,e.consume()))}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(m=this.getActualStartSize(g.cell),
+(0<m.x||0<m.width)&&mxUtils.intersects(n,new mxRectangle(g.x+(m.x-m.width-1)*k+(0==m.x?g.width:0),g.y,1,g.height))||(0<m.y||0<m.height)&&mxUtils.intersects(n,new mxRectangle(g.x,g.y+(m.y-m.height-1)*k+(0==m.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),m=this.selectionCellsHandler.getHandler(g.cell),null!=m&&(v=mxEvent.CUSTOM_HANDLE-m.customHandles.length+1,m.start(e.getGraphX(),e.getGraphY(),v),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,
d){},mouseMove:mxUtils.bind(this,function(b,c){var e=this.selectionCellsHandler.handlers.map,g;for(g in e)if(null!=e[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(c.getEvent()))if(g=this.tolerance,null!=t&&null!=f&&null!=d){if(e=f,Math.abs(t.x-c.getGraphX())>g||Math.abs(t.y-c.getGraphY())>g){var k=this.selectionCellsHandler.getHandler(e.cell);null==k&&this.model.isEdge(e.cell)&&(k=this.createHandler(e));if(null!=k&&null!=k.bends&&0<k.bends.length){g=k.getHandleForEvent(d);
-var p=this.view.getEdgeStyle(e),q=p==mxEdgeStyle.EntityRelation;m||l!=mxEvent.LABEL_HANDLE||(g=l);if(q&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!q||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)q||g==mxEvent.LABEL_HANDLE||(q=e.absolutePoints,null!=q&&(null==p&&null==g||p==mxEdgeStyle.OrthConnector)&&(g=l,null==g&&(g=new mxRectangle(t.x,
-t.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,q[0].x,q[0].y)?g=0:mxUtils.contains(g,q[q.length-1].x,q[q.length-1].y)?g=k.bends.length-1:null!=p&&(2==q.length||3==q.length&&(0==Math.round(q[0].x-q[1].x)&&0==Math.round(q[1].x-q[2].x)||0==Math.round(q[0].y-q[1].y)&&0==Math.round(q[1].y-q[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,t.x,t.y),g=null==p?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),g),c.consume(),this.graphHandler.reset()}null!=
-k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());m=!1;t=d=f=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(g=new mxRectangle(c.getGraphX(),c.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),q=e.absolutePoints,null!=q)if(null!=e.text&&null!=e.text.boundingBox&&
-mxUtils.contains(e.text.boundingBox,c.getGraphX(),c.getGraphY()))k="move";else if(mxUtils.contains(g,q[0].x,q[0].y)||mxUtils.contains(g,q[q.length-1].x,q[q.length-1].y))k="pointer";else if(null!=e.visibleSourceState||null!=e.visibleTargetState)g=this.view.getEdgeStyle(e),k="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(e)&&(g=mxUtils.findNearestSegment(e,c.getGraphX(),c.getGraphY()),g<q.length-1&&0<=g&&(k=0==Math.round(q[g].x-q[g+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(c.getEvent())){g=
-new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);g.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(e.cell)&&(q=this.model.getParent(e.cell),p=this.model.getParent(q),!this.isCellSelected(p)))if(mxUtils.intersects(g,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(q,0)!=e.cell||mxUtils.intersects(g,new mxRectangle(e.x+e.width-2,e.y,2,e.height)))k="col-resize";else if(mxUtils.intersects(g,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(p,0)!=q||mxUtils.intersects(g,
-new mxRectangle(e.x,e.y+e.height-2,e.width,3)))k="row-resize";for(q=e;null==k&&null!=q&&(this.isTableCell(q.cell)||this.isTableRow(q.cell)||this.isTable(q.cell));){if(this.isSwimlane(q.cell)){var p=this.getActualStartSize(q.cell),n=this.view.scale;(0<p.x||0<p.width)&&mxUtils.intersects(g,new mxRectangle(q.x+(p.x-p.width-1)*n+(0==p.x?q.width*n:0),q.y,1,q.height))?k="col-resize":(0<p.y||0<p.height)&&mxUtils.intersects(g,new mxRectangle(q.x,q.y+(p.y-p.height-1)*n+(0==p.y?q.height:0),q.width,1))&&(k=
-"row-resize")}q=this.view.getState(this.model.getParent(q.cell))}}null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(b,c){l=t=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(b){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);b.view.graph.isHtmlLabel(b.cell)&&(d=1!=b.style.html?mxUtils.htmlEntities(d,!1):b.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);
-this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(b,d){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var p=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var b=p.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],f=this.graph.pageFormat,c=this.graph.pageScale,e=f.width*c,f=f.height*c,c=this.graph.view.translate,l=this.graph.view.scale,g=this.graph.getPageLayout(),m=0;m<g.width;m++)d.push(new mxRectangle(((g.x+m)*e+c.x)*l,(g.y*f+c.y)*l,e*l,f*l));for(m=1;m<g.height;m++)d.push(new mxRectangle((g.x*e+c.x)*l,((g.y+m)*f+c.y)*l,e*l,f*l));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var q=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=q.apply(this,arguments),f=new mxDictionary,c=[],e=0;e<d.length;e++){var l=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
-this.graph.isCellSelected(d[e])?this.graph.model.getParent(d[e]):this.graph.isTableRow(b)&&this.graph.isTableRow(d[e])&&this.graph.isCellSelected(d[e])?d[e]:this.graph.getCompositeParent(d[e]);null==l||f.get(l)||(f.put(l,!0),c.push(l))}return c};var v=this.graphHandler.start;this.graphHandler.start=function(b,d,f,c){var e=!1;this.graph.isTableCell(b)&&(this.graph.isCellSelected(b)?e=!0:b=this.graph.model.getParent(b));e||this.graph.isTableRow(b)&&this.graph.isCellSelected(b)||(b=this.graph.getCompositeParent(b));
-v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var y=(new Date).getTime(),x=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;D.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var C=
-this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&C.apply(this,arguments)};var G=this.isToggleEvent;this.isToggleEvent=function(b){return G.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var J=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(b){return J.apply(this,
+var m=this.view.getEdgeStyle(e),n=m==mxEdgeStyle.EntityRelation;q||l!=mxEvent.LABEL_HANDLE||(g=l);if(n&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!n||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)n||g==mxEvent.LABEL_HANDLE||(n=e.absolutePoints,null!=n&&(null==m&&null==g||m==mxEdgeStyle.OrthConnector)&&(g=l,null==g&&(g=new mxRectangle(t.x,
+t.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,n[0].x,n[0].y)?g=0:mxUtils.contains(g,n[n.length-1].x,n[n.length-1].y)?g=k.bends.length-1:null!=m&&(2==n.length||3==n.length&&(0==Math.round(n[0].x-n[1].x)&&0==Math.round(n[1].x-n[2].x)||0==Math.round(n[0].y-n[1].y)&&0==Math.round(n[1].y-n[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,t.x,t.y),g=null==m?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),g),c.consume(),this.graphHandler.reset()}null!=
+k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());q=!1;t=d=f=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(g=new mxRectangle(c.getGraphX(),c.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),n=e.absolutePoints,null!=n)if(null!=e.text&&null!=e.text.boundingBox&&
+mxUtils.contains(e.text.boundingBox,c.getGraphX(),c.getGraphY()))k="move";else if(mxUtils.contains(g,n[0].x,n[0].y)||mxUtils.contains(g,n[n.length-1].x,n[n.length-1].y))k="pointer";else if(null!=e.visibleSourceState||null!=e.visibleTargetState)g=this.view.getEdgeStyle(e),k="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(e)&&(g=mxUtils.findNearestSegment(e,c.getGraphX(),c.getGraphY()),g<n.length-1&&0<=g&&(k=0==Math.round(n[g].x-n[g+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(c.getEvent())){g=
+new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);g.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(e.cell)&&(n=this.model.getParent(e.cell),m=this.model.getParent(n),!this.isCellSelected(m)))if(mxUtils.intersects(g,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(n,0)!=e.cell||mxUtils.intersects(g,new mxRectangle(e.x+e.width-2,e.y,2,e.height)))k="col-resize";else if(mxUtils.intersects(g,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(m,0)!=n||mxUtils.intersects(g,
+new mxRectangle(e.x,e.y+e.height-2,e.width,3)))k="row-resize";for(n=e;null==k&&null!=n&&(this.isTableCell(n.cell)||this.isTableRow(n.cell)||this.isTable(n.cell));){if(this.isSwimlane(n.cell)){var m=this.getActualStartSize(n.cell),p=this.view.scale;(0<m.x||0<m.width)&&mxUtils.intersects(g,new mxRectangle(n.x+(m.x-m.width-1)*p+(0==m.x?n.width*p:0),n.y,1,n.height))?k="col-resize":(0<m.y||0<m.height)&&mxUtils.intersects(g,new mxRectangle(n.x,n.y+(m.y-m.height-1)*p+(0==m.y?n.height:0),n.width,1))&&(k=
+"row-resize")}n=this.view.getState(this.model.getParent(n.cell))}}null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(b,c){l=t=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(b){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);b.view.graph.isHtmlLabel(b.cell)&&(d=1!=b.style.html?mxUtils.htmlEntities(d,!1):b.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);
+this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(b,d){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var b=m.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],f=this.graph.pageFormat,c=this.graph.pageScale,e=f.width*c,f=f.height*c,c=this.graph.view.translate,l=this.graph.view.scale,g=this.graph.getPageLayout(),k=0;k<g.width;k++)d.push(new mxRectangle(((g.x+k)*e+c.x)*l,(g.y*f+c.y)*l,e*l,f*l));for(k=1;k<g.height;k++)d.push(new mxRectangle((g.x*e+c.x)*l,((g.y+k)*f+c.y)*l,e*l,f*l));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=n.apply(this,arguments),f=new mxDictionary,c=[],e=0;e<d.length;e++){var l=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
+this.graph.isCellSelected(d[e])?this.graph.model.getParent(d[e]):this.graph.isTableRow(b)&&this.graph.isTableRow(d[e])&&this.graph.isCellSelected(d[e])?d[e]:this.graph.getCompositeParent(d[e]);null==l||f.get(l)||(f.put(l,!0),c.push(l))}return c};var u=this.graphHandler.start;this.graphHandler.start=function(b,d,f,c){var e=!1;this.graph.isTableCell(b)&&(this.graph.isCellSelected(b)?e=!0:b=this.graph.model.getParent(b));e||this.graph.isTableRow(b)&&this.graph.isCellSelected(b)||(b=this.graph.getCompositeParent(b));
+u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var v=new mxRubberband(this);this.getRubberband=function(){return v};var y=(new Date).getTime(),x=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;D.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var C=
+this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&C.apply(this,arguments)};var G=this.isToggleEvent;this.isToggleEvent=function(b){return G.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var J=v.isForceRubberbandEvent;v.isForceRubberbandEvent=function(b){return J.apply(this,
arguments)&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isControlDown(b.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.getEvent())};var L=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(L=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=L)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var H=this.click;this.click=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);if(this.isEnabled()&&!d||b.isConsumed())return H.apply(this,arguments);var f=d?b.sourceState.cell:b.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?
this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};var K=this.tooltipHandler.show;this.tooltipHandler.show=function(){K.apply(this,arguments);if(null!=this.div)for(var b=this.div.getElementsByTagName("a"),d=0;d<b.length;d++)null!=b[d].getAttribute("href")&&null==b[d].getAttribute("target")&&b[d].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};
this.getCursorForMouseEvent=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);return this.getCursorForCell(d?b.sourceState.cell:b.getCell())};var A=this.getCursorForCell;this.getCursorForCell=function(b){if(!this.isEnabled()||this.isCellLocked(b)){if(null!=this.getClickableLinkForCell(b))return"pointer";if(this.isCellLocked(b))return"default"}return A.apply(this,arguments)};this.selectRegion=function(b,d){var f=mxEvent.isAltDown(d)?b:null,f=this.getCells(b.x,
b.y,b.width,b.height,null,null,f,function(b){return"1"==mxUtils.getValue(b.style,"locked","0")},!0);if(this.isToggleEvent(d))for(var c=0;c<f.length;c++)this.selectCellForEvent(f[c],d);else this.selectCellsForEvent(f,d);return f};var M=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,d,f){return this.graph.isCellSelected(b)?!1:M.apply(this,arguments)};this.isCellLocked=function(b){for(;null!=b;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(b),
"locked","0"))return!0;b=this.model.getParent(b)}return!1};var Q=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,d){if("mouseDown"==d.getProperty("eventName")){var f=d.getProperty("event").getState();Q=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,d){if(!mxEvent.isMultiTouchEvent(d)){var f=d.getProperty("event"),c=d.getProperty("cell");null==c?(f=mxUtils.convertPoint(this.container,
-mxEvent.getClientX(f),mxEvent.getClientY(f)),u.start(f.x,f.y)):null!=Q?this.addSelectionCells(Q):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);Q=null;d.consume()}}));this.connectionHandler.selectCells=function(b,d){this.graph.setSelectionCell(d||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,d){var f=b.view.graph;return d&&(f.isCellSelected(b.cell)||f.isTableRow(b.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(b.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
+mxEvent.getClientX(f),mxEvent.getClientY(f)),v.start(f.x,f.y)):null!=Q?this.addSelectionCells(Q):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);Q=null;d.consume()}}));this.connectionHandler.selectCells=function(b,d){this.graph.setSelectionCell(d||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,d){var f=b.view.graph;return d&&(f.isCellSelected(b.cell)||f.isTableRow(b.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(b.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
mxUtils.bind(this,function(){var b=this.connectionHandler.constraintHandler;null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var T=this.updateMouseEvent;this.updateMouseEvent=function(b){b=T.apply(this,arguments);null!=b.state&&this.isCellLocked(b.getCell())&&(b.state=null);return b}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
@@ -2344,17 +2344,17 @@ Graph.createSvgImage=function(b,c,e,k,g){e=unescape(encodeURIComponent(Graph.svg
Graph.zapGremlins=function(b){for(var c=0,e=[],k=0;k<b.length;k++){var g=b.charCodeAt(k);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(e.push(b.substring(c,k)),c=k+1)}0<c&&c<b.length&&e.push(b.substring(c));return 0==e.length?b:e.join("")};Graph.stringToBytes=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=b.charCodeAt(e);return c};Graph.bytesToString=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=String.fromCharCode(b[e]);return c.join("")};
Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(b,e){return String.fromCharCode(parseInt(e,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(b){return"%"+("00"+b.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,c){var e=mxUtils.getXml(b);return Graph.compress(c?e:Graph.zapGremlins(e))};
Graph.arrayBufferToString=function(b){var c="";b=new Uint8Array(b);for(var e=b.byteLength,k=0;k<e;k++)c+=String.fromCharCode(b[k]);return c};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(b){return b.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(b,c,e){var k=c.charCodeAt(0),g=1,n=-1;for(e=e||0;e<b.byteLength;e++)if(b[e]==k){n=e;break}for(e=n+1;-1<n&&e<b.byteLength&&e<n+c.length-1;e++){if(b[e]!=c.charCodeAt(g))return Graph.arrayBufferIndexOfString(b,c,n+1);g++}return g==c.length-1?n:-1};Graph.compress=function(b,c){if(null==b||0==b.length||"undefined"===typeof pako)return b;var e=c?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(e)))};
+Graph.arrayBufferIndexOfString=function(b,c,e){var k=c.charCodeAt(0),g=1,p=-1;for(e=e||0;e<b.byteLength;e++)if(b[e]==k){p=e;break}for(e=p+1;-1<p&&e<b.byteLength&&e<p+c.length-1;e++){if(b[e]!=c.charCodeAt(g))return Graph.arrayBufferIndexOfString(b,c,p+1);g++}return g==c.length-1?p:-1};Graph.compress=function(b,c){if(null==b||0==b.length||"undefined"===typeof pako)return b;var e=c?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(e)))};
Graph.decompress=function(b,c,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));c=decodeURIComponent(c?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return e?c:Graph.zapGremlins(c)};
Graph.fadeNodes=function(b,c,e,k,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,c);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=k&&k()},g)},0)};Graph.setTransitionForNodes=function(b,c){for(var e=0;e<b.length;e++)mxUtils.setPrefixedStyle(b[e].style,"transition",c)};
Graph.setOpacityForNodes=function(b,c){for(var e=0;e<b.length;e++)b[e].style.opacity=c};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};Graph.sanitizeHtml=function(b,c){return html_sanitize(b,function(b){return null!=b&&"javascript:"!==b.toString().toLowerCase().substring(0,11)?b:null},function(b){return b})};
Graph.sanitizeSvg=function(b){for(var c=b.getElementsByTagName("*"),e=0;e<c.length;e++)for(var k=0;k<c[e].attributes.length;k++){var g=c[e].attributes[k];2<g.name.length&&"on"==g.name.toLowerCase().substring(0,2)&&c[e].removeAttribute(g.name)}for(b=b.getElementsByTagName("script");0<b.length;)b[0].parentNode.removeChild(b[0])};
-Graph.clipSvgDataUri=function(b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var c=document.createElement("div");c.style.position="absolute";c.style.visibility="hidden";var e=decodeURIComponent(escape(atob(b.substring(26)))),k=e.indexOf("<svg");if(0<=k){c.innerHTML=e.substring(k);Graph.sanitizeSvg(c);var g=c.getElementsByTagName("svg");if(0<g.length){document.body.appendChild(c);try{var n=g[0].getBBox();0<n.width&&0<n.height&&(c.getElementsByTagName("svg")[0].setAttribute("viewBox",
-n.x+" "+n.y+" "+n.width+" "+n.height),c.getElementsByTagName("svg")[0].setAttribute("width",n.width),c.getElementsByTagName("svg")[0].setAttribute("height",n.height))}catch(t){}finally{document.body.removeChild(c)}b=Editor.createSvgDataUri(mxUtils.getXml(g[0]))}}}catch(t){}return b};
+Graph.clipSvgDataUri=function(b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var c=document.createElement("div");c.style.position="absolute";c.style.visibility="hidden";var e=decodeURIComponent(escape(atob(b.substring(26)))),k=e.indexOf("<svg");if(0<=k){c.innerHTML=e.substring(k);Graph.sanitizeSvg(c);var g=c.getElementsByTagName("svg");if(0<g.length){document.body.appendChild(c);try{var p=g[0].getBBox();0<p.width&&0<p.height&&(c.getElementsByTagName("svg")[0].setAttribute("viewBox",
+p.x+" "+p.y+" "+p.width+" "+p.height),c.getElementsByTagName("svg")[0].setAttribute("width",p.width),c.getElementsByTagName("svg")[0].setAttribute("height",p.height))}catch(t){}finally{document.body.removeChild(c)}b=Editor.createSvgDataUri(mxUtils.getXml(g[0]))}}}catch(t){}return b};
Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.createRemoveIcon=function(b,c){var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",b);e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";e.style.cursor="pointer";mxEvent.addListener(e,"click",c);return e};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled=!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.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.enableFlowAnimation=!1;
Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(b,c){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var e=b.view.graph.tolerance,k=!0,t=null,d=mxUtils.bind(this,function(b){k=!0;t=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b))}),f=mxUtils.bind(this,function(b){k=k&&null!=t&&Math.abs(t.x-mxEvent.getClientX(b))<e&&Math.abs(t.y-mxEvent.getClientY(b))<e}),l=mxUtils.bind(this,function(d){if(k)for(var f=mxEvent.getSource(d);null!=
f&&f!=c.node;){if("a"==f.nodeName.toLowerCase()){b.view.graph.labelLinkClicked(b,f,d);break}f=f.parentNode}});mxEvent.addGestureListeners(c.node,d,f,l);mxEvent.addListener(c.node,"click",function(b){mxEvent.consume(b)})};if(null!=this.tooltipHandler){var c=this.tooltipHandler.init;this.tooltipHandler.init=function(){c.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);"A"==c.nodeName&&(c=c.getAttribute("href"),null!=
@@ -2362,9 +2362,9 @@ c&&this.graph.isCustomLink(c)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getVerticesAndEdges=function(b,c){b=null!=b?b:!0;c=null!=c?c:!0;var d=this.model;return d.filterDescendants(function(f){return b&&d.isVertex(f)||c&&d.isEdge(f)},d.getRoot())};Graph.prototype.getCommonStyle=function(b){for(var c={},d=0;d<b.length;d++){var f=this.view.getState(b[d]);this.mergeStyle(f.style,c,0==d)}return c};Graph.prototype.mergeStyle=function(b,
c,d){if(null!=b){var f={},e;for(e in b){var g=b[e];null!=g&&(f[e]=!0,null==c[e]&&d?c[e]=g:c[e]!=g&&delete c[e])}for(e in c)f[e]||delete c[e]}};Graph.prototype.getStartEditingCell=function(b,c){var d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(b)&&(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b)&&(b=this.model.getChildAt(b,0),d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(b)&&
(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b))for(d=0;d<this.model.getChildCount(b);d++){var f=this.model.getChildAt(b,d);if(this.isCellEditable(f)){b=f;break}}return b};Graph.prototype.copyStyle=function(b){var c=null;if(null!=b){c=mxUtils.clone(this.getCurrentCellStyle(b));b=this.model.getStyle(b);b=null!=b?b.split(";"):[];for(var d=0;d<b.length;d++){var f=b[d],e=f.indexOf("=");if(0<=e){var g=f.substring(0,e),f=f.substring(e+1);null==c[g]&&f==mxConstants.NONE&&
-(c[g]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(b,c,d){d=null!=d?d:Graph.pasteStyles;this.model.beginUpdate();try{for(var f=0;f<c.length;f++)for(var e=this.getCurrentCellStyle(c[f]),g=0;g<d.length;g++){var k=e[d[g]],q=b[d[g]];k==q||null==k&&q==mxConstants.NONE||this.setCellStyles(d[g],q,[c[f]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
+(c[g]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(b,c,d){d=null!=d?d:Graph.pasteStyles;this.model.beginUpdate();try{for(var f=0;f<c.length;f++)for(var e=this.getCurrentCellStyle(c[f]),g=0;g<d.length;g++){var k=e[d[g]],n=b[d[g]];k==n||null==k&&n==mxConstants.NONE||this.setCellStyles(d[g],n,[c[f]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(b,c,d,f,e,g){this.useCssTransforms&&(b=b/this.currentScale-this.currentTranslate.x,c=c/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(b,c,d,f,e,g){f=null!=f?f:!0;e=null!=e?e:!0;null==d&&(d=this.getCurrentRoot(),
-null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var l=this.model.getChildCount(d)-1;0<=l;l--){var k=this.model.getChildAt(d,l),m=this.getScaledCellAt(b,c,k,f,e,g);if(null!=m)return m;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||f&&this.model.isVertex(k))&&(m=this.view.getState(k),null!=m&&(null==g||!g(m,b,c))&&this.intersects(m,b,c)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(b){return!this.isSwimlane(b.cell)&&0<this.model.getChildCount(b.cell)&&!this.isCellCollapsed(b.cell)&&
+null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var l=this.model.getChildCount(d)-1;0<=l;l--){var k=this.model.getChildAt(d,l),q=this.getScaledCellAt(b,c,k,f,e,g);if(null!=q)return q;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||f&&this.model.isVertex(k))&&(q=this.view.getState(k),null!=q&&(null==g||!g(q,b,c))&&this.intersects(q,b,c)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(b){return!this.isSwimlane(b.cell)&&0<this.model.getChildCount(b.cell)&&!this.isCellCollapsed(b.cell)&&
"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(b){for(var c=this.getCellGeometry(b);null!=c&&c.relative;)b=this.getModel().getParent(b),c=this.getCellGeometry(b);return b};Graph.prototype.isPart=function(b){return"1"==mxUtils.getValue(this.getCurrentCellStyle(b),"part","0")||this.isTableCell(b)||this.isTableRow(b)};Graph.prototype.getCompositeParent=function(b){for(;this.isPart(b);){var c=this.model.getParent(b);
if(!this.model.isVertex(c))break;b=c}return b};Graph.prototype.filterSelectionCells=function(b){var c=this.getSelectionCells();if(null!=b){for(var d=[],f=0;f<c.length;f++)b(c[f])||d.push(c[f]);c=d}return c};mxCellHighlight.prototype.getStrokeWidth=function(b){b=this.strokeWidth;this.graph.useCssTransforms&&(b/=this.graph.currentScale);return b};mxGraphView.prototype.getGraphBounds=function(){var b=this.graphBounds;if(this.graph.useCssTransforms)var c=this.graph.currentTranslate,d=this.graph.currentScale,
b=new mxRectangle((b.x+c.x)*d,(b.y+c.y)*d,b.width*d,b.height*d);return b};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var b=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=
@@ -2373,20 +2373,20 @@ function(b){b=e.apply(this,arguments);for(var c=[],d=0;d<b.length;d++)this.isTab
100+","+Math.round(100*this.currentTranslate.y)/100+")");c!=b.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",b.getAttribute("transform"))}else b.removeAttribute("transformOrigin"),b.removeAttribute("transform")};var k=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var b=this.graph.useCssTransforms,c=this.scale,d=this.translate;b&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);
k.apply(this,arguments);b&&(this.scale=c,this.translate=d)};var g=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(b,c,d){var f=this.useCssTransforms,e=this.view.scale,k=this.view.translate;f&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);g.apply(this,arguments);f&&(this.view.scale=e,this.view.translate=k,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(b,c,e){c=c.getAttribute("href");if(null!=c&&!this.isCustomLink(c)&&(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(c)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(c),b);mxEvent.consume(e)}};
-Graph.prototype.openLink=function(b,c,e){var k=window;try{if("_self"==c&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var g=b.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else k=window.open(b,null!=c?c:"_blank"),null==k||e||(k.opener=null)}catch(n){}return k};
+Graph.prototype.openLink=function(b,c,e){var k=window;try{if("_self"==c&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var g=b.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else k=window.open(b,null!=c?c:"_blank"),null==k||e||(k.opener=null)}catch(p){}return k};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b,c){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,c){var e=this.graph.model.getParent(b);if(c!=mxEvent.BEGIN_UPDATE||this.hasLayout(e,c)){e=this.graph.getCellStyle(b);if("stackLayout"==e.childLayout){var k=new mxStackLayout(this.graph,!0);k.resizeParentMax="1"==mxUtils.getValue(e,"resizeParentMax","1");k.horizontal="1"==mxUtils.getValue(e,
"horizontalStack","1");k.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1");k.resizeLast="1"==mxUtils.getValue(e,"resizeLast","0");k.spacing=e.stackSpacing||k.spacing;k.border=e.stackBorder||k.border;k.marginLeft=e.marginLeft||0;k.marginRight=e.marginRight||0;k.marginTop=e.marginTop||0;k.marginBottom=e.marginBottom||0;k.allowGaps=e.allowGaps||0;k.fill=!0;k.allowGaps&&(k.gridSize=parseFloat(mxUtils.getValue(e,"stackUnitSize",20)));return k}if("treeLayout"==e.childLayout)return k=new mxCompactTreeLayout(this.graph),
k.horizontal="1"==mxUtils.getValue(e,"horizontalTree","1"),k.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1"),k.groupPadding=mxUtils.getValue(e,"parentPadding",20),k.levelDistance=mxUtils.getValue(e,"treeLevelDistance",30),k.maintainParentLocation=!0,k.edgeRouting=!1,k.resetEdges=!1,k;if("flowLayout"==e.childLayout)return k=new mxHierarchicalLayout(this.graph,mxUtils.getValue(e,"flowOrientation",mxConstants.DIRECTION_EAST)),k.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1"),k.parentBorder=
mxUtils.getValue(e,"parentPadding",20),k.maintainParentLocation=!0,k.intraCellSpacing=mxUtils.getValue(e,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),k.interRankCellSpacing=mxUtils.getValue(e,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),k.interHierarchySpacing=mxUtils.getValue(e,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),k.parallelEdgeSpacing=mxUtils.getValue(e,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),
-k;if("circleLayout"==e.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==e.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==e.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=null!=b[e].value?b[e].value.attributes:null,g={};g.id=b[e].id;if(null!=k)for(var n=0;n<k.length;n++)g[k[n].nodeName]=k[n].nodeValue;else g.label=this.convertValueToString(b[e]);c.push(g)}return c};
-Graph.prototype.getNodesForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=this.view.getState(b[e]);if(null!=k){for(var g=this.cellRenderer.getShapesForState(k),n=0;n<g.length;n++)null!=g[n]&&null!=g[n].node&&c.push(g[n].node);null!=k.control&&null!=k.control.node&&c.push(k.control.node)}}return c};
+k;if("circleLayout"==e.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==e.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==e.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=null!=b[e].value?b[e].value.attributes:null,g={};g.id=b[e].id;if(null!=k)for(var p=0;p<k.length;p++)g[k[p].nodeName]=k[p].nodeValue;else g.label=this.convertValueToString(b[e]);c.push(g)}return c};
+Graph.prototype.getNodesForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=this.view.getState(b[e]);if(null!=k){for(var g=this.cellRenderer.getShapesForState(k),p=0;p<g.length;p++)null!=g[p]&&null!=g[p].node&&c.push(g[p].node);null!=k.control&&null!=k.control.node&&c.push(k.control.node)}}return c};
Graph.prototype.createWipeAnimations=function(b,c){for(var e=[],k=0;k<b.length;k++){var g=this.view.getState(b[k]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?e.push(this.createEdgeWipeAnimation(g,c)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&e.push(this.createVertexWipeAnimation(g,c)))}return e};
-Graph.prototype.createEdgeWipeAnimation=function(b,c){var e=b.absolutePoints.slice(),k=b.segments,g=b.length,n=e.length;return{execute:mxUtils.bind(this,function(t,d){if(null!=b.shape){var f=[e[0]],l=t/d;c||(l=1-l);for(var m=g*l,p=1;p<n;p++)if(m<=k[p-1]){f.push(new mxPoint(e[p-1].x+(e[p].x-e[p-1].x)*m/k[p-1],e[p-1].y+(e[p].y-e[p-1].y)*m/k[p-1]));break}else m-=k[p-1],f.push(e[p]);b.shape.points=f;b.shape.redraw();0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+Graph.prototype.createEdgeWipeAnimation=function(b,c){var e=b.absolutePoints.slice(),k=b.segments,g=b.length,p=e.length;return{execute:mxUtils.bind(this,function(t,d){if(null!=b.shape){var f=[e[0]],l=t/d;c||(l=1-l);for(var q=g*l,m=1;m<p;m++)if(q<=k[m-1]){f.push(new mxPoint(e[m-1].x+(e[m].x-e[m-1].x)*q/k[m-1],e[m-1].y+(e[m].y-e[m-1].y)*q/k[m-1]));break}else q-=k[m-1],f.push(e[m]);b.shape.points=f;b.shape.redraw();0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=l)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=e,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(b,c){var e=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(k,g){if(null!=b.shape){var n=k/g;c||(n=1-n);b.shape.bounds=new mxRectangle(e.x,e.y,e.width*n,e.height);b.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=n)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=e,b.shape.redraw(),null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};Graph.prototype.executeAnimations=function(b,c,e,k){e=null!=e?e:30;k=null!=k?k:30;var g=null,n=0,t=mxUtils.bind(this,function(){if(n==e||this.stoppingCustomActions){window.clearInterval(g);for(var d=0;d<b.length;d++)b[d].stop();null!=c&&c()}else for(d=0;d<b.length;d++)b[d].execute(n,e);n++}),g=window.setInterval(t,k);t()};
+Graph.prototype.createVertexWipeAnimation=function(b,c){var e=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(k,g){if(null!=b.shape){var p=k/g;c||(p=1-p);b.shape.bounds=new mxRectangle(e.x,e.y,e.width*p,e.height);b.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=p)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=e,b.shape.redraw(),null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};Graph.prototype.executeAnimations=function(b,c,e,k){e=null!=e?e:30;k=null!=k?k:30;var g=null,p=0,t=mxUtils.bind(this,function(){if(p==e||this.stoppingCustomActions){window.clearInterval(g);for(var d=0;d<b.length;d++)b[d].stop();null!=c&&c()}else for(d=0;d<b.length;d++)b[d].execute(p,e);p++}),g=window.setInterval(t,k);t()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),c=this.getGraphBounds();if(0==c.width||0==c.height)return new mxRectangle(0,0,1,1);var e=Math.floor(Math.ceil(c.x/this.view.scale-this.view.translate.x)/b.width),k=Math.floor(Math.ceil(c.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(e,k,Math.ceil((Math.floor((c.x+c.width)/this.view.scale)-this.view.translate.x)/b.width)-e,Math.ceil((Math.floor((c.y+c.height)/this.view.scale)-this.view.translate.y)/b.height)-
k)};Graph.prototype.sanitizeHtml=function(b,c){return Graph.sanitizeHtml(b,c)};Graph.prototype.updatePlaceholders=function(){var b=!1,c;for(c in this.model.cells){var e=this.model.cells[c];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
@@ -2396,38 +2396,38 @@ Graph.prototype.getLabel=function(b){var c=mxGraph.prototype.getLabel.apply(this
Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var c=this.getLinkForCell(b);if(null!=c)return c;b=this.model.getParent(b)}while(null!=b);return null};
Graph.prototype.getGlobalVariable=function(b){var c=null;"date"==b?c=(new Date).toLocaleDateString():"time"==b?c=(new Date).toLocaleTimeString():"timestamp"==b?c=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),c=this.formatDate(new Date,b));return c};
Graph.prototype.formatDate=function(b,c,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var k=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,t=function(b,d){b=String(b);for(d=d||2;b.length<d;)b="0"+b;return b};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(c=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");c=String(k.masks[c]||c||k.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),e=!0);var d=e?"getUTC":"get",f=b[d+"Date"](),l=b[d+"Day"](),m=b[d+"Month"](),p=b[d+"FullYear"](),q=b[d+"Hours"](),v=b[d+"Minutes"](),u=b[d+"Seconds"](),d=b[d+"Milliseconds"](),y=e?0:b.getTimezoneOffset(),x={d:f,dd:t(f),ddd:k.i18n.dayNames[l],dddd:k.i18n.dayNames[l+7],m:m+1,mm:t(m+1),mmm:k.i18n.monthNames[m],mmmm:k.i18n.monthNames[m+
-12],yy:String(p).slice(2),yyyy:p,h:q%12||12,hh:t(q%12||12),H:q,HH:t(q),M:v,MM:t(v),s:u,ss:t(u),l:t(d,3),L:t(99<d?Math.round(d/10):d),t:12>q?"a":"p",tt:12>q?"am":"pm",T:12>q?"A":"P",TT:12>q?"AM":"PM",Z:e?"UTC":(String(b).match(g)||[""]).pop().replace(n,""),o:(0<y?"-":"+")+t(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in x?x[b]:b.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 k=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,t=function(b,d){b=String(b);for(d=d||2;b.length<d;)b="0"+b;return b};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(c=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");c=String(k.masks[c]||c||k.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),e=!0);var d=e?"getUTC":"get",f=b[d+"Date"](),l=b[d+"Day"](),q=b[d+"Month"](),m=b[d+"FullYear"](),n=b[d+"Hours"](),u=b[d+"Minutes"](),v=b[d+"Seconds"](),d=b[d+"Milliseconds"](),y=e?0:b.getTimezoneOffset(),x={d:f,dd:t(f),ddd:k.i18n.dayNames[l],dddd:k.i18n.dayNames[l+7],m:q+1,mm:t(q+1),mmm:k.i18n.monthNames[q],mmmm:k.i18n.monthNames[q+
+12],yy:String(m).slice(2),yyyy:m,h:n%12||12,hh:t(n%12||12),H:n,HH:t(n),M:u,MM:t(u),s:v,ss:t(v),l:t(d,3),L:t(99<d?Math.round(d/10):d),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(b).match(g)||[""]).pop().replace(p,""),o:(0<y?"-":"+")+t(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in x?x[b]:b.slice(1,
b.length-1)})};Graph.prototype.getLayerForCells=function(b){var c=null;if(0<b.length){for(c=b[0];!this.model.isLayer(c);)c=this.model.getParent(c);for(var e=1;e<b.length;e++)if(!this.model.isAncestor(c,b[e])){c=null;break}}return c};
-Graph.prototype.createLayersDialog=function(b,c){var e=document.createElement("div");e.style.position="absolute";for(var k=this.getModel(),g=k.getChildCount(k.root),n=0;n<g;n++)mxUtils.bind(this,function(g){function d(){k.isVisible(g)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(l,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(l,25))}var f=this.convertValueToString(g)||mxResources.get("background")||"Background",l=document.createElement("div");l.style.overflow=
-"hidden";l.style.textOverflow="ellipsis";l.style.padding="2px";l.style.whiteSpace="nowrap";l.style.cursor="pointer";l.setAttribute("title",mxResources.get(k.isVisible(g)?"hideIt":"show",[f]));var m=document.createElement("img");m.setAttribute("draggable","false");m.setAttribute("align","absmiddle");m.setAttribute("border","0");m.style.position="relative";m.style.width="16px";m.style.padding="0px 6px 0 4px";c&&(m.style.filter="invert(100%)",m.style.top="-2px");l.appendChild(m);mxUtils.write(l,f);e.appendChild(l);
-mxEvent.addListener(l,"click",function(){k.setVisible(g,!k.isVisible(g));d();null!=b&&b(g)});d()})(k.getChildAt(k.root,n));return e};
-Graph.prototype.replacePlaceholders=function(b,c,e,k){k=[];if(null!=c){for(var g=0;match=this.placeholderPattern.exec(c);){var n=match[0];if(2<n.length&&"%label%"!=n&&"%tooltip%"!=n){var t=null;if(match.index>g&&"%"==c.charAt(match.index-1))t=n.substring(1);else{var d=n.substring(1,n.length-1);if("id"==d)t=b.id;else if(0>d.indexOf("{"))for(var f=b;null==t&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(t=f.getAttribute(d+"_"+Graph.diagramLanguage)),
-null==t&&(t=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==t&&(t=this.getGlobalVariable(d));null==t&&null!=e&&(t=e[d])}k.push(c.substring(g,match.index)+(null!=t?t:n));g=match.index+n.length}}k.push(c.substring(g))}return k.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var c=[],e=0;e<b.length;e++){var k=this.model.getCell(b[e].id);null!=k&&c.push(k)}this.setSelectionCells(c)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(b,c){var e=document.createElement("div");e.style.position="absolute";for(var k=this.getModel(),g=k.getChildCount(k.root),p=0;p<g;p++)mxUtils.bind(this,function(g){function d(){k.isVisible(g)?(q.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(l,75)):(q.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(l,25))}var f=this.convertValueToString(g)||mxResources.get("background")||"Background",l=document.createElement("div");l.style.overflow=
+"hidden";l.style.textOverflow="ellipsis";l.style.padding="2px";l.style.whiteSpace="nowrap";l.style.cursor="pointer";l.setAttribute("title",mxResources.get(k.isVisible(g)?"hideIt":"show",[f]));var q=document.createElement("img");q.setAttribute("draggable","false");q.setAttribute("align","absmiddle");q.setAttribute("border","0");q.style.position="relative";q.style.width="16px";q.style.padding="0px 6px 0 4px";c&&(q.style.filter="invert(100%)",q.style.top="-2px");l.appendChild(q);mxUtils.write(l,f);e.appendChild(l);
+mxEvent.addListener(l,"click",function(){k.setVisible(g,!k.isVisible(g));d();null!=b&&b(g)});d()})(k.getChildAt(k.root,p));return e};
+Graph.prototype.replacePlaceholders=function(b,c,e,k){k=[];if(null!=c){for(var g=0;match=this.placeholderPattern.exec(c);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var t=null;if(match.index>g&&"%"==c.charAt(match.index-1))t=p.substring(1);else{var d=p.substring(1,p.length-1);if("id"==d)t=b.id;else if(0>d.indexOf("{"))for(var f=b;null==t&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(t=f.getAttribute(d+"_"+Graph.diagramLanguage)),
+null==t&&(t=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==t&&(t=this.getGlobalVariable(d));null==t&&null!=e&&(t=e[d])}k.push(c.substring(g,match.index)+(null!=t?t:p));g=match.index+p.length}}k.push(c.substring(g))}return k.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var c=[],e=0;e<b.length;e++){var k=this.model.getCell(b[e].id);null!=k&&c.push(k)}this.setSelectionCells(c)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(b,c,e){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=e&&(mxEvent.isTouchEvent(c)?e.update(e.getState(this.view.getState(b[1]))):e.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=c&&c.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,c,e,k,g,n,t,d){n=n?n:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),l=f?b:this.getCompositeParent(b),m=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(m.x+=l.geometry.width/2,m.y-=e):c==
-mxConstants.DIRECTION_SOUTH?(m.x+=l.geometry.width/2,m.y+=l.geometry.height+e):(m.x=c==mxConstants.DIRECTION_WEST?m.x-e:m.x+(l.geometry.width+e),m.y+=l.geometry.height/2);var p=this.view.getState(this.model.getParent(b));e=this.view.scale;var q=this.view.translate,l=q.x*e,q=q.y*e;null!=p&&this.model.isVertex(p.cell)&&(l=p.x,q=p.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);n=n?null:(new mxRectangle(l+m.x*e,q+m.y*e)).grow(40*e);n=null!=n?
-this.getCells(0,0,0,0,null,null,n,null,!0):null;var p=this.view.getState(b),v=null,u=null;if(null!=n){n=n.reverse();for(var y=0;y<n.length;y++)if(!this.isCellLocked(n[y])&&!this.model.isEdge(n[y])&&n[y]!=b)if(!this.model.isAncestor(b,n[y])&&this.isContainer(n[y])&&(null==v||n[y]==this.model.getParent(b)))v=n[y];else if(null==u&&this.isCellConnectable(n[y])&&!this.model.isAncestor(n[y],b)&&!this.isSwimlane(n[y])){var x=this.view.getState(n[y]);null==p||null==x||mxUtils.intersects(p,x)||(u=n[y])}}var D=
-!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;D&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var C=[],G=u,u=v;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==u&&f){this.model.beginUpdate();try{if(null==G&&D){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);G=null!=e?e:this.duplicateCells([g],
-!1)[0];null!=e&&this.addCells([G],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(G);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?m.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=l.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-l.width/2:m.x+l.width/2),l.x=m.x-l.width/2,l.y=m.y-l.height/2);null!=v?(this.addCells([G],v,null,null,null,!0),u=null):D&&!f&&this.addCells([G],this.getDefaultParent(),null,null,null,!0)}var p=mxEvent.isControlDown(k)&&
-mxEvent.isShiftDown(k)&&D||null==u&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,G,this.createCurrentEdgeStyle());if(null!=p&&this.connectionHandler.insertBeforeSource){var q=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=p.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==p.parent&&(q=e.parent.getIndex(e),this.model.add(e.parent,p,q))}null==u&&null!=G&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(q=b.parent.getIndex(b),this.model.add(b.parent,
-G,q));null!=p&&C.push(p);null==u&&null!=G&&C.push(G);null==G&&null!=p&&p.geometry.setTerminalPoint(m,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=d)d(C);else return C});if(null==t||null!=G||!D||null==u&&f)return g(G);t(l+m.x*e,q+m.y*e,g)};
+Graph.prototype.connectVertex=function(b,c,e,k,g,p,t,d){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),l=f?b:this.getCompositeParent(b),q=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(q.x+=l.geometry.width/2,q.y-=e):c==
+mxConstants.DIRECTION_SOUTH?(q.x+=l.geometry.width/2,q.y+=l.geometry.height+e):(q.x=c==mxConstants.DIRECTION_WEST?q.x-e:q.x+(l.geometry.width+e),q.y+=l.geometry.height/2);var m=this.view.getState(this.model.getParent(b));e=this.view.scale;var n=this.view.translate,l=n.x*e,n=n.y*e;null!=m&&this.model.isVertex(m.cell)&&(l=m.x,n=m.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(q.x+=b.parent.geometry.x,q.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(l+q.x*e,n+q.y*e)).grow(40*e);p=null!=p?
+this.getCells(0,0,0,0,null,null,p,null,!0):null;var m=this.view.getState(b),u=null,v=null;if(null!=p){p=p.reverse();for(var y=0;y<p.length;y++)if(!this.isCellLocked(p[y])&&!this.model.isEdge(p[y])&&p[y]!=b)if(!this.model.isAncestor(b,p[y])&&this.isContainer(p[y])&&(null==u||p[y]==this.model.getParent(b)))u=p[y];else if(null==v&&this.isCellConnectable(p[y])&&!this.model.isAncestor(p[y],b)&&!this.isSwimlane(p[y])){var x=this.view.getState(p[y]);null==m||null==x||mxUtils.intersects(m,x)||(v=p[y])}}var D=
+!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;D&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?q.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?q.y+=b.geometry.height/2:q.x=c==mxConstants.DIRECTION_WEST?q.x-b.geometry.width/2:q.x+b.geometry.width/2);var C=[],G=v,v=u;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();try{if(null==G&&D){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);G=null!=e?e:this.duplicateCells([g],
+!1)[0];null!=e&&this.addCells([G],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(G);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?q.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?q.y+=l.height/2:q.x=c==mxConstants.DIRECTION_WEST?q.x-l.width/2:q.x+l.width/2),l.x=q.x-l.width/2,l.y=q.y-l.height/2);null!=u?(this.addCells([G],u,null,null,null,!0),v=null):D&&!f&&this.addCells([G],this.getDefaultParent(),null,null,null,!0)}var m=mxEvent.isControlDown(k)&&
+mxEvent.isShiftDown(k)&&D||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,G,this.createCurrentEdgeStyle());if(null!=m&&this.connectionHandler.insertBeforeSource){var n=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=m.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==m.parent&&(n=e.parent.getIndex(e),this.model.add(e.parent,m,n))}null==v&&null!=G&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(n=b.parent.getIndex(b),this.model.add(b.parent,
+G,n));null!=m&&C.push(m);null==v&&null!=G&&C.push(G);null==G&&null!=m&&m.geometry.setTerminalPoint(q,!1);null!=m&&this.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{this.model.endUpdate()}}if(null!=d)d(C);else return C});if(null==t||null!=G||!D||null==v&&f)return g(G);t(l+q.x*e,n+q.y*e,g)};
Graph.prototype.getIndexableText=function(){var b=document.createElement("div"),c=[],e,k;for(k in this.model.cells)if(e=this.model.cells[k],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&c.push(e);return c.join(" ")};
Graph.prototype.convertValueToString=function(b){var c=this.model.getValue(b);if(null!=c&&"object"==typeof c){var e=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),k=b;null==e&&null!=k;)null!=k.value&&"object"==typeof k.value&&(e=k.hasAttribute(c)?null!=k.getAttribute(c)?k.getAttribute(c):"":null),k=this.model.getParent(k);else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=c.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=c.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.getCellStyle=function(b){var c=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=b&&null!=this.layoutManager){var e=this.model.getParent(b);this.model.isVertex(e)&&this.isCellCollapsed(b)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(c[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return c};
Graph.prototype.updateAlternateBounds=function(b,c,e){if(null!=b&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var k=this.layoutManager.getLayout(this.model.getParent(b));null!=k&&k.constructor==mxStackLayout&&(k.horizontal?c.alternateBounds.height=0:c.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,c){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(c.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,c,e,k,g){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<e.length;n++){var t=this.view.getState(e[n]),d=this.getCellGeometry(e[n]);if(null!=t&&null!=d){var f=Math.round(d.width-t.width/this.view.scale),l=Math.round(d.height-t.height/this.view.scale);if(0!=l||0!=f){var m=this.model.getParent(e[n]),p=this.layoutManager.getLayout(m);
-null==p?null!=g&&this.isMoveCellsEvent(g,t)&&this.moveSiblings(t,m,f,l):null!=g&&mxEvent.isAltDown(g)||p.constructor!=mxStackLayout||p.resizeLast||this.resizeParentStacks(m,p,f,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
-Graph.prototype.moveSiblings=function(b,c,e,k){this.model.beginUpdate();try{var g=this.getCellsBeyond(b.x,b.y,c,!0,!0);for(c=0;c<g.length;c++)if(g[c]!=b.cell){var n=this.view.getState(g[c]),t=this.getCellGeometry(g[c]);null!=n&&null!=t&&(t=t.clone(),t.translate(Math.round(e*Math.max(0,Math.min(1,(n.x-b.x)/b.width))),Math.round(k*Math.max(0,Math.min(1,(n.y-b.y)/b.height)))),this.model.setGeometry(g[c],t))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,c,e,k){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var g=c.horizontal;null!=b&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==g&&!c.resizeLast;){var n=this.getCellGeometry(b),t=this.view.getState(b);null!=t&&null!=n&&(n=n.clone(),c.horizontal?n.width+=e+Math.min(0,t.width/this.view.scale-n.width):n.height+=k+Math.min(0,t.height/this.view.scale-n.height),this.model.setGeometry(b,
-n));b=this.model.getParent(b);c=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var c=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.foldCells=function(b,c,e,k,g){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<e.length;p++){var t=this.view.getState(e[p]),d=this.getCellGeometry(e[p]);if(null!=t&&null!=d){var f=Math.round(d.width-t.width/this.view.scale),l=Math.round(d.height-t.height/this.view.scale);if(0!=l||0!=f){var q=this.model.getParent(e[p]),m=this.layoutManager.getLayout(q);
+null==m?null!=g&&this.isMoveCellsEvent(g,t)&&this.moveSiblings(t,q,f,l):null!=g&&mxEvent.isAltDown(g)||m.constructor!=mxStackLayout||m.resizeLast||this.resizeParentStacks(q,m,f,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(b,c,e,k){this.model.beginUpdate();try{var g=this.getCellsBeyond(b.x,b.y,c,!0,!0);for(c=0;c<g.length;c++)if(g[c]!=b.cell){var p=this.view.getState(g[c]),t=this.getCellGeometry(g[c]);null!=p&&null!=t&&(t=t.clone(),t.translate(Math.round(e*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(k*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(g[c],t))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,c,e,k){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var g=c.horizontal;null!=b&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==g&&!c.resizeLast;){var p=this.getCellGeometry(b),t=this.view.getState(b);null!=t&&null!=p&&(p=p.clone(),c.horizontal?p.width+=e+Math.min(0,t.width/this.view.scale-p.width):p.height+=k+Math.min(0,t.height/this.view.scale-p.height),this.model.setGeometry(b,
+p));b=this.model.getParent(b);c=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var c=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.movableLabel?"0"!=c.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,c,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};
Graph.prototype.getSwimlaneAt=function(b,c,e){var k=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(k)&&(k=null);return k};Graph.prototype.isCellFoldable=function(b){var c=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&("1"==c.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=c.collapsible||!this.isContainer(b)&&"1"==c.collapsible))};
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,c){b=Math.max(.01,Math.min(this.view.scale*b,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(b,c){c=null!=c?c:10;var e=this.container.clientWidth-c,k=this.container.clientHeight-c,g=Math.floor(20*Math.min(e/b.width,k/b.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var n=this.view.translate;this.container.scrollTop=(b.y+n.y)*g-Math.max((k-b.height*g)/2+c/2,0);this.container.scrollLeft=(b.x+n.x)*g-Math.max((e-b.width*g)/2+c/2,0)}};
+Graph.prototype.fitWindow=function(b,c){c=null!=c?c:10;var e=this.container.clientWidth-c,k=this.container.clientHeight-c,g=Math.floor(20*Math.min(e/b.width,k/b.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*g-Math.max((k-b.height*g)/2+c/2,0);this.container.scrollLeft=(b.x+p.x)*g-Math.max((e-b.width*g)/2+c/2,0)}};
Graph.prototype.getTooltipForCell=function(b){var c="";if(mxUtils.isNode(b.value)){var e=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==e&&(e=b.value.getAttribute("tooltip"));if(null!=e)null!=e&&this.isReplacePlaceholders(b)&&(e=this.replacePlaceholders(b,e)),c=this.sanitizeHtml(e);else{e=this.builtInProperties;b=b.value.attributes;var k=[];this.isEnabled()&&(e.push("linkTarget"),e.push("link"));for(var g=0;g<b.length;g++)0>
mxUtils.indexOf(e,b[g].nodeName)&&0<b[g].nodeValue.length&&k.push({name:b[g].nodeName,value:b[g].nodeValue});k.sort(function(b,c){return b.name<c.name?-1:b.name>c.name?1:0});for(g=0;g<k.length;g++)"link"==k[g].name&&this.isCustomLink(k[g].value)||(c+=("link"!=k[g].name?"<b>"+k[g].name+":</b> ":"")+mxUtils.htmlEntities(k[g].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1),mxClient.IS_SVG&&(c='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+c+"</div>"))}}return c};
Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var c=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(c);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
@@ -2442,7 +2442,7 @@ HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangle
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(b){null!=b.relatedTarget&&
mxEvent.getSource(b)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(b){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(c){b.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(b,
-k){c=!1;var e=k.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var n=this.getState(k.getState());null==n&&mxEvent.isTouchEvent(e)||this.update(n)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(b,k){var e=k.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(k.getState()),k.getGraphX(),k.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,
+k){c=!1;var e=k.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var p=this.getState(k.getState());null==p&&mxEvent.isTouchEvent(e)||this.update(p)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(b,k){var e=k.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(k.getState()),k.getGraphX(),k.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,
function(b,k){var e=k.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));this.isResetEvent(e)?this.reset():this.isActive()&&!c&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),k):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(k.getGraphX(),k.getGraphY())))):mxEvent.isTouchEvent(e)||
null!=this.bbox&&mxUtils.contains(this.bbox,k.getGraphX(),k.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();c=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,c){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
HoverIcons.prototype.createArrow=function(b,c,e){var k=null,k=mxUtils.createImage(b.src);k.style.width=b.width+"px";k.style.height=b.height+"px";k.style.padding=this.tolerance+"px";null!=c&&k.setAttribute("title",c);k.style.position="absolute";k.style.cursor=this.cssCursor;mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){null==this.currentState||this.isResetEvent(b)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),this.drag(b,
@@ -2452,98 +2452,99 @@ HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;th
HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(c){c.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(b,c,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,c,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,c=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=c&&c.setHandlesVisible(!1),c=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=c&&"orthogonalEdgeStyle"===
mxUtils.getValue(c.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),c.cell.style=mxUtils.setStyle(c.cell.style,"sourcePortConstraint",b),c.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,c,e){return this.graph.view.getState(this.graph.getCellAt(c,e))};
-HoverIcons.prototype.click=function(b,c,e){var k=e.getEvent(),g=e.getGraphX(),n=e.getGraphY(),g=this.getStateAt(b,g,n);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(k)||g.getVisibleTerminalState(!0)!=b&&g.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,c,e):(this.graph.setSelectionCell(g.cell),this.reset());e.consume()};
+HoverIcons.prototype.click=function(b,c,e){var k=e.getEvent(),g=e.getGraphX(),p=e.getGraphY(),g=this.getStateAt(b,g,p);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(k)||g.getVisibleTerminalState(!0)!=b&&g.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,c,e):(this.graph.setSelectionCell(g.cell),this.reset());e.consume()};
HoverIcons.prototype.execute=function(b,c,e){e=e.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,c,this.graph.defaultEdgeLength,e,this.graph.isCloneEvent(e),this.graph.isCloneEvent(e)),e,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
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 b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.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 e=null;null!=c&&(b.x-=c.horizontalOffset/2,b.y-=c.verticalOffset/2,b.width+=c.horizontalOffset,b.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&&
(e=c.rotationShape.boundingBox));c=mxUtils.bind(this,function(b,f,c){if(null!=e){var d=new mxRectangle(f,c,b.clientWidth,b.clientHeight);mxUtils.intersects(d,e)&&(b==this.arrowUp?c-=d.y+d.height-e.y:b==this.arrowRight?f+=e.x+e.width-d.x:b==this.arrowDown?c+=e.y+e.height-d.y:b==this.arrowLeft&&(f-=d.x+d.width-e.x))}b.style.left=f+"px";b.style.top=c+"px";mxUtils.setOpacity(b,this.inactiveOpacity)});c(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));c(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));c(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));c(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var c=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY()),
-k=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2),b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=c&&c==k&&k==g&&g==b&&(b=g=k=c=null);var n=this.graph.getCellGeometry(this.currentState.cell),t=mxUtils.bind(this,function(b,f){var d=this.graph.model.isVertex(b)&&this.graph.getCellGeometry(b);null==b||this.graph.model.isAncestor(b,
-this.currentState.cell)||this.graph.isSwimlane(b)||!(null==d||null==n||d.height<3*n.height&&d.width<3*n.width)?f.style.visibility="visible":f.style.visibility="hidden"});t(c,this.arrowRight);t(k,this.arrowLeft);t(g,this.arrowUp);t(b,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")),
+k=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2),b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=c&&c==k&&k==g&&g==b&&(b=g=k=c=null);var p=this.graph.getCellGeometry(this.currentState.cell),t=mxUtils.bind(this,function(b,f){var d=this.graph.model.isVertex(b)&&this.graph.getCellGeometry(b);null==b||this.graph.model.isAncestor(b,
+this.currentState.cell)||this.graph.isSwimlane(b)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?f.style.visibility="visible":f.style.visibility="hidden"});t(c,this.arrowRight);t(k,this.arrowLeft);t(g,this.arrowUp);t(b,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 b=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==b?b=c:b.add(c))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var c=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(c)&&this.graph.isCellConnectable(c)&&(b=c)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
HoverIcons.prototype.update=function(b,c,e){if(!this.graph.connectionArrowsEnabled||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var k=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,k=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,c,e))}),this.updateDelay+10))):null!=this.startTime&&(k=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&k<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,c,e)?this.reset(!1):(null!=this.currentState||k>this.activationDelay)&&this.currentState!=b&&(k>this.updateDelay&&null!=b||null==this.bbox||null==c||null==e||!mxUtils.contains(this.bbox,
c,e))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.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=b};Graph.prototype.createParent=function(b,c,e,k,g){b=this.cloneCell(b);for(var n=0;n<e;n++){var t=this.cloneCell(c),d=this.getCellGeometry(t);null!=d&&(d.x+=n*k,d.y+=n*g);b.insert(t)}return b};
-Graph.prototype.createTable=function(b,c,e,k,g,n,t,d,f){e=null!=e?e:60;k=null!=k?k:40;n=null!=n?n:30;d=null!=d?d:"shape=partialRectangle;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;";f=null!=f?f:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,null,null!=g?g:"",0,0,c*e,
-b*k+(null!=g?n:0),null!=t?t:"shape=table;startSize="+(null!=g?n:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*e,k,d),this.createVertex(null,null,"",0,0,e,k,f),c,e,0),b,0,k)};Graph.prototype.setTableValues=function(b,c,e){for(var k=this.model.getChildCells(b,!0),g=0;g<k.length;g++)if(null!=e&&(k[g].value=e[g]),null!=c)for(var n=this.model.getChildCells(k[g],!0),t=0;t<n.length;t++)null!=c[g][t]&&(n[t].value=c[g][t]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,c,e,k,g,n,t,d,f){e=null!=e?e:120;k=null!=k?k:120;var l=null==g?0:40;t=null!=t?t:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+l+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";d=null!=d?d:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";f=null!=f?f:"swimlane;connectable=0;startSize="+(null==g?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
-g=this.createVertex(null,null,null!=g?g:"",0,0,c*e,b*k,null!=n?n:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+l+";"+(null==g?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");n=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=n;g.geometry.height+=n;t=this.createVertex(null,null,"",0,n,c*e+n,k,t);g.insert(this.createParent(t,this.createVertex(null,null,"",n,0,e,k,d),c,e,0));
-return 1<b?(t.geometry.y=k+n,this.createParent(g,this.createParent(t,this.createVertex(null,null,"",n,0,e,k,f),c,e,0),b-1,0,k)):g};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};
-Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var g=this.getCellGeometry(b);if(null!=g){g=g.clone();g.height+=c;k.setGeometry(b,g);var n=k.getParent(b),t=k.getChildCells(n,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var f=t[d+1],l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(f,l))}}var m=this.getCellGeometry(n);null!=m&&(e||(e=b==t[t.length-1]),e&&(m=m.clone(),m.height+=c,k.setGeometry(n,m)));
-null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}}finally{k.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),n=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(n,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),m=t[b],p=this.getCellGeometry(m);null!=p&&(p=p.clone(),p.width+=c,null!=p.alternateBounds&&(p.alternateBounds.width+=c),k.setGeometry(m,p));b<t.length-1&&(m=t[b+1],p=this.getCellGeometry(m),null!=p&&(p=p.clone(),
-p.x+=c,e||(p.width-=c,null!=p.alternateBounds&&(p.alternateBounds.width-=c)),k.setGeometry(m,p)))}if(d||e){var q=this.getCellGeometry(n);null!=q&&(q=q.clone(),q.width+=c,k.setGeometry(n,q))}null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.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=b};Graph.prototype.createParent=function(b,c,e,k,g){b=this.cloneCell(b);for(var p=0;p<e;p++){var t=this.cloneCell(c),d=this.getCellGeometry(t);null!=d&&(d.x+=p*k,d.y+=p*g);b.insert(t)}return b};
+Graph.prototype.createTable=function(b,c,e,k,g,p,t,d,f){e=null!=e?e:60;k=null!=k?k:40;p=null!=p?p:30;d=null!=d?d:"shape=partialRectangle;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;";f=null!=f?f:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,null,null!=g?g:"",0,0,c*e,
+b*k+(null!=g?p:0),null!=t?t:"shape=table;startSize="+(null!=g?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*e,k,d),this.createVertex(null,null,"",0,0,e,k,f),c,e,0),b,0,k)};Graph.prototype.setTableValues=function(b,c,e){for(var k=this.model.getChildCells(b,!0),g=0;g<k.length;g++)if(null!=e&&(k[g].value=e[g]),null!=c)for(var p=this.model.getChildCells(k[g],!0),t=0;t<p.length;t++)null!=c[g][t]&&(p[t].value=c[g][t]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,c,e,k,g,p,t,d,f){e=null!=e?e:120;k=null!=k?k:120;var l=null==g?0:40;t=null!=t?t:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+l+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";d=null!=d?d:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";f=null!=f?f:"swimlane;connectable=0;startSize="+(null==g?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
+g=this.createVertex(null,null,null!=g?g:"",0,0,c*e,b*k,null!=p?p:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+l+";"+(null==g?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");p=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=p;g.geometry.height+=p;t=this.createVertex(null,null,"",0,p,c*e+p,k,t);g.insert(this.createParent(t,this.createVertex(null,null,"",p,0,e,k,d),c,e,0));
+return 1<b?(t.geometry.y=k+p,this.createParent(g,this.createParent(t,this.createVertex(null,null,"",p,0,e,k,f),c,e,0),b-1,0,k)):g};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};
+Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var g=this.getCellGeometry(b);if(null!=g){g=g.clone();g.height+=c;k.setGeometry(b,g);var p=k.getParent(b),t=k.getChildCells(p,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var f=t[d+1],l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(f,l))}}var q=this.getCellGeometry(p);null!=q&&(e||(e=b==t[t.length-1]),e&&(q=q.clone(),q.height+=c,k.setGeometry(p,q)));
+null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}}finally{k.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),p=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(p,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),q=t[b],m=this.getCellGeometry(q);null!=m&&(m=m.clone(),m.width+=c,null!=m.alternateBounds&&(m.alternateBounds.width+=c),k.setGeometry(q,m));b<t.length-1&&(q=t[b+1],m=this.getCellGeometry(q),null!=m&&(m=m.clone(),
+m.x+=c,e||(m.width-=c,null!=m.alternateBounds&&(m.alternateBounds.width-=c)),k.setGeometry(q,m)))}if(d||e){var n=this.getCellGeometry(p);null!=n&&(n=n.clone(),n.width+=c,k.setGeometry(p,n))}null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,c){for(var e=0,k=0;k<b.length;k++)if(!this.isVertexIgnored(b[k])){var g=this.graph.getCellGeometry(b[k]);null!=g&&(e+=c?g.width:g.height)}return e};
-TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),g=this.getSize(e,!0),n=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var f=this.graph.getCellGeometry(e[d]);null!=f&&(k+=(null!=f.alternateBounds?f.alternateBounds.width:f.width)*n/g,t.push(Math.round(k)))}return t};
-TableLayout.prototype.layoutRow=function(b,c,e,k){var g=this.graph.getModel(),n=g.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var t=null,d=b.x,f=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var l=0;l<n.length;l++){var m=this.graph.getCellGeometry(n[l]);null!=m&&(m=m.clone(),m.y=b.y,m.height=e-b.y-b.height,null!=c?(m.x=c[l],m.width=c[l+1]-m.x,l==n.length-1&&l<c.length-2&&(m.width=k-m.x-b.x-b.width)):(m.x=d,d+=m.width,l==n.length-1?m.width=k-b.x-b.width-f:f+=m.width),m.alternateBounds=
-new mxRectangle(0,0,m.width,m.height),g.setGeometry(n[l],m));null!=t&&null!=t.geo&&(1<t.colspan?(t.colspan--,t.geo.width+=m.width,g.setVisible(n[l],!1)):g.setVisible(n[l],!0));if(null==t||1>=t.colspan)t=this.graph.getCurrentCellStyle(n[l],!0),t={colspan:null!=t?parseInt(t.colspan||1):1,style:t,cell:n[l],geo:m}}return f};
-TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),g="1"==mxUtils.getValue(k,"resizeLastRow","0"),n="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var f=e.height-c.y-c.height,l=e.width-c.x-c.width,m=t.getChildCells(b,!0),p=this.getSize(m,!1);if(0<f&&0<l&&0<m.length&&0<p){if(g){var q=this.graph.getCellGeometry(m[m.length-
-1]);null!=q&&(q=q.clone(),q.height=f-p+q.height,t.setGeometry(m[m.length-1],q))}for(var v=n?null:this.getRowLayout(m[0],l),u=c.y,y=0;y<m.length;y++)q=this.graph.getCellGeometry(m[y]),null!=q&&(q=q.clone(),q.x=c.x,q.width=l,q.y=Math.round(u),u=g||k?u+q.height:u+q.height/p*f,q.height=Math.round(u)-q.y,t.setGeometry(m[y],q)),d=Math.max(d,this.layoutRow(m[y],v,q.height,l));k&&f<p&&(e=e.clone(),e.height=u+c.height,t.setGeometry(b,e));n&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+c.x+
-Graph.minTableColumnWidth,t.setGeometry(b,e))}}finally{t.endUpdate()}}};
+TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),g=this.getSize(e,!0),p=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var f=this.graph.getCellGeometry(e[d]);null!=f&&(k+=(null!=f.alternateBounds?f.alternateBounds.width:f.width)*p/g,t.push(Math.round(k)))}return t};
+TableLayout.prototype.layoutRow=function(b,c,e,k,g){var p=this.graph.getModel(),t=p.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var d=null,f=b.x,l=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var q=0;q<t.length;q++){var m=this.graph.getCellGeometry(t[q]);null!=m&&(m=m.clone(),m.y=b.y,m.height=e-b.y-b.height,null!=c?(m.x=c[q],m.width=c[q+1]-m.x,q==t.length-1&&q<c.length-2&&(m.width=k-m.x-b.x-b.width)):(m.x=f,f+=m.width,q==t.length-1?m.width=k-b.x-b.width-l:l+=m.width),m.alternateBounds=
+new mxRectangle(0,0,m.width,m.height),p.setGeometry(t[q],m));var n=!0;null!=d&&null!=d.geo&&null!=d.colspan&&1<d.colspan&&(d.geo.width+=null!=m.alternateBounds?m.alternateBounds.width:m.width,n=!1,d.colspan--);var u=g[q];null!=u&&null!=u.geo&&null!=u.rowspan&&1<u.rowspan&&(u.geo.height+=null!=m.alternateBounds?m.alternateBounds.height:m.height,n=!1,u.rowspan--);p.setVisible(t[q],n);n=this.graph.getCurrentCellStyle(t[q],!0);m={style:n,cell:t[q],geo:m};if(null!=n){if(null==d||1>d.colspan)m.colspan=
+parseInt(n.colspan||0),d=m;if(null==u||1>u.rowspan)m.rowspan=parseInt(n.rowspan||0),g[q]=m}}return l};
+TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),g="1"==mxUtils.getValue(k,"resizeLastRow","0"),p="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var f=e.height-c.y-c.height,l=e.width-c.x-c.width,q=t.getChildCells(b,!0),m=this.getSize(q,!1);if(0<f&&0<l&&0<q.length&&0<m){if(g){var n=this.graph.getCellGeometry(q[q.length-
+1]);null!=n&&(n=n.clone(),n.height=f-m+n.height,t.setGeometry(q[q.length-1],n))}for(var u=p?null:this.getRowLayout(q[0],l),v=[],y=c.y,x=0;x<q.length;x++)n=this.graph.getCellGeometry(q[x]),null!=n&&(n=n.clone(),n.x=c.x,n.width=l,n.y=Math.round(y),y=g||k?y+n.height:y+n.height/m*f,n.height=Math.round(y)-n.y,t.setGeometry(q[x],n)),d=Math.max(d,this.layoutRow(q[x],u,n.height,l,v));k&&f<m&&(e=e.clone(),e.height=y+c.height,t.setGeometry(b,e));p&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+
+c.x+Graph.minTableColumnWidth,t.setGeometry(b,e))}}finally{t.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(b,d){d=null!=d?d:!0;var f=this.getState(b);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=c.apply(this,
arguments);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(){e.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var b=this.node.getElementsByTagName("path");if(1<b.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&b[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var d=this.state.view.graph.getFlowAnimationStyle();null!=d&&b[1].setAttribute("class",d.getAttribute("id"))}}};var k=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(b,d){return k.apply(this,arguments)||null!=b.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,b.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(b){g.apply(this,arguments);this.graph.model.isEdge(b.cell)&&1!=b.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(b)};mxGraphView.prototype.updateLineJumps=function(b){var d=b.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=b.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(b.style,"jumpStyle","none")){for(var e=function(d,f,e){var g=new mxPoint(f,e);g.type=d;c.push(g);g=null!=b.routedPoints?b.routedPoints[c.length-1]:null;return null==g||g.type!=
-d||g.x!=f||g.y!=e},g=.5*this.scale,f=!1,c=[],l=0;l<d.length-1;l++){for(var k=d[l+1],m=d[l],n=[],t=d[l+2];l<d.length-2&&mxUtils.ptSegDistSq(m.x,m.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,l++,t=d[l+2];for(var f=e(0,m.x,m.y)||f,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],K=H.absolutePoints;if(null!=K&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<K.length-1;H++){for(var A=K[H+1],M=K[H],t=K[H+2];H<K.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,A.x,A.y)<1*this.scale*this.scale;)A=
-t,H++,t=K[H+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,M.x,M.y,A.x,A.y);if(null!=t&&(Math.abs(t.x-m.x)>g||Math.abs(t.y-m.y)>g)&&(Math.abs(t.x-k.x)>g||Math.abs(t.y-k.y)>g)&&(Math.abs(t.x-M.x)>g||Math.abs(t.y-M.y)>g)&&(Math.abs(t.x-A.x)>g||Math.abs(t.y-A.y)>g)){A=t.x-m.x;M=t.y-m.y;t={distSq:A*A+M*M,x:t.x,y:t.y};for(A=0;A<n.length;A++)if(n[A].distSq>t.distSq){n.splice(A,0,t);t=null;break}null==t||0!=n.length&&n[n.length-1].x===t.x&&n[n.length-1].y===t.y||n.push(t)}}}for(H=0;H<n.length;H++)f=e(1,n[H].x,
-n[H].y)||f}t=d[d.length-1];f=e(0,t.x,t.y)||f}b.routedPoints=c;return f}return!1};var n=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(b,d,f){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)n.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),l=!0,k=null,m=null,p=[],q=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],K=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var A=!1;if(null!=k&&1==H.type){var M=this.state.routedPoints[t+1],H=M.x/this.scale-K.x,M=M.y/this.scale-K.y,H=H*H+M*M;null==q&&(q=new mxPoint(K.x-k.x,K.y-k.y),
-m=Math.sqrt(q.x*q.x+q.y*q.y),0<m?(q.x=q.x*e/m,q.y=q.y*e/m):q=null);H>e*e&&0<m&&(H=k.x-K.x,M=k.y-K.y,H=H*H+M*M,H>e*e&&(A=new mxPoint(K.x-q.x,K.y-q.y),H=new mxPoint(K.x+q.x,K.y+q.y),p.push(A),this.addPoints(b,p,f,c,!1,null,l),p=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,l=!1,"sharp"==g?(b.lineTo(A.x-q.y*p,A.y+q.x*p),b.lineTo(H.x-q.y*p,H.y+q.x*p),b.lineTo(H.x,H.y)):"line"==g?(b.moveTo(A.x+q.y*p,A.y-q.x*p),b.lineTo(A.x-q.y*p,A.y+q.x*p),b.moveTo(H.x-q.y*p,H.y+q.x*p),b.lineTo(H.x+q.y*
-p,H.y-q.x*p),b.moveTo(H.x,H.y)):"arc"==g?(p*=1.3,b.curveTo(A.x-q.y*p,A.y+q.x*p,H.x-q.y*p,H.y+q.x*p,H.x,H.y)):(b.moveTo(H.x,H.y),l=!0),p=[H],A=!0))}else q=null;A||(p.push(K),k=K)}this.addPoints(b,p,f,c,!1,null,l);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(b,f,c,e){if(null==f||null==b||"1"!=f.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{f=this.getTerminalPort(b,f,e);var g=this.getNextPoint(b,c,e),l=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=k)var p=Math.cos(-k),q=Math.sin(-k),g=mxUtils.getRotatedPoint(g,p,q,m);p=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);p+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(f,g,0==k&&l,p);0!=k&&(p=Math.cos(k),q=Math.sin(k),g=mxUtils.getRotatedPoint(g,p,q,m));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,f,c,e,g),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,f,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=f=null;if(null!=b)for(var g=0;g<b.length;g++){var l=this.graph.getConnectionPoint(d,
+d||g.x!=f||g.y!=e},g=.5*this.scale,f=!1,c=[],l=0;l<d.length-1;l++){for(var k=d[l+1],q=d[l],p=[],t=d[l+2];l<d.length-2&&mxUtils.ptSegDistSq(q.x,q.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,l++,t=d[l+2];for(var f=e(0,q.x,q.y)||f,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],K=H.absolutePoints;if(null!=K&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<K.length-1;H++){for(var A=K[H+1],M=K[H],t=K[H+2];H<K.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,A.x,A.y)<1*this.scale*this.scale;)A=
+t,H++,t=K[H+2];t=mxUtils.intersection(q.x,q.y,k.x,k.y,M.x,M.y,A.x,A.y);if(null!=t&&(Math.abs(t.x-q.x)>g||Math.abs(t.y-q.y)>g)&&(Math.abs(t.x-k.x)>g||Math.abs(t.y-k.y)>g)&&(Math.abs(t.x-M.x)>g||Math.abs(t.y-M.y)>g)&&(Math.abs(t.x-A.x)>g||Math.abs(t.y-A.y)>g)){A=t.x-q.x;M=t.y-q.y;t={distSq:A*A+M*M,x:t.x,y:t.y};for(A=0;A<p.length;A++)if(p[A].distSq>t.distSq){p.splice(A,0,t);t=null;break}null==t||0!=p.length&&p[p.length-1].x===t.x&&p[p.length-1].y===t.y||p.push(t)}}}for(H=0;H<p.length;H++)f=e(1,p[H].x,
+p[H].y)||f}t=d[d.length-1];f=e(0,t.x,t.y)||f}b.routedPoints=c;return f}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(b,d,f){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)p.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),l=!0,k=null,q=null,m=[],n=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],K=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var A=!1;if(null!=k&&1==H.type){var M=this.state.routedPoints[t+1],H=M.x/this.scale-K.x,M=M.y/this.scale-K.y,H=H*H+M*M;null==n&&(n=new mxPoint(K.x-k.x,K.y-k.y),
+q=Math.sqrt(n.x*n.x+n.y*n.y),0<q?(n.x=n.x*e/q,n.y=n.y*e/q):n=null);H>e*e&&0<q&&(H=k.x-K.x,M=k.y-K.y,H=H*H+M*M,H>e*e&&(A=new mxPoint(K.x-n.x,K.y-n.y),H=new mxPoint(K.x+n.x,K.y+n.y),m.push(A),this.addPoints(b,m,f,c,!1,null,l),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,l=!1,"sharp"==g?(b.lineTo(A.x-n.y*m,A.y+n.x*m),b.lineTo(H.x-n.y*m,H.y+n.x*m),b.lineTo(H.x,H.y)):"line"==g?(b.moveTo(A.x+n.y*m,A.y-n.x*m),b.lineTo(A.x-n.y*m,A.y+n.x*m),b.moveTo(H.x-n.y*m,H.y+n.x*m),b.lineTo(H.x+n.y*
+m,H.y-n.x*m),b.moveTo(H.x,H.y)):"arc"==g?(m*=1.3,b.curveTo(A.x-n.y*m,A.y+n.x*m,H.x-n.y*m,H.y+n.x*m,H.x,H.y)):(b.moveTo(H.x,H.y),l=!0),m=[H],A=!0))}else n=null;A||(m.push(K),k=K)}this.addPoints(b,m,f,c,!1,null,l);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(b,f,c,e){if(null==f||null==b||"1"!=f.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{f=this.getTerminalPort(b,f,e);var g=this.getNextPoint(b,c,e),l=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||"0")),q=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=k)var m=Math.cos(-k),n=Math.sin(-k),g=mxUtils.getRotatedPoint(g,m,n,q);m=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);m+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(f,g,0==k&&l,m);0!=k&&(m=Math.cos(k),n=Math.sin(k),g=mxUtils.getRotatedPoint(g,m,n,q));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,f,c,e,g),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,f,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=f=null;if(null!=b)for(var g=0;g<b.length;g++){var l=this.graph.getConnectionPoint(d,
b[g]);if(null!=l){var k=(l.x-e.x)*(l.x-e.x)+(l.y-e.y)*(l.y-e.y);if(null==c||k<c)f=l,c=k}}null!=f&&(e=f)}return e};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(b,d,c){var e=f.apply(this,arguments);"1"==b.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var l=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(b){if(null!=b.style&&"undefined"!==typeof pako){var d=
-mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"string"===typeof d&&"stencil("==d.substring(0,8))try{var f=d.substring(8,d.length-1),c=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(c.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"string"===typeof d&&"stencil("==d.substring(0,8))try{var f=d.substring(8,d.length-1),c=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(c.documentElement))}catch(v){null!=window.console&&console.log("Error in shape: "+v)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var c=mxStencilRegistry.stencils[b];if(null==c&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(b);if(null!=e){c=mxStencilRegistry.libraries[e];if(null!=c){if(null==mxStencilRegistry.packages[e]){for(var k=0;k<c.length;k++){var g=c[k];if(!mxStencilRegistry.filesLoaded[g])if(mxStencilRegistry.filesLoaded[g]=!0,".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,
-null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var n=mxUtils.load(g);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(t){null!=window.console&&console.log("error in getStencil:",b,e,c,g,t)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);c=mxStencilRegistry.stencils[b]}}return c};
+null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(g);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(t){null!=window.console&&console.log("error in getStencil:",b,e,c,g,t)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);c=mxStencilRegistry.stencils[b]}}return c};
mxStencilRegistry.getBasenameForStencil=function(b){var c=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0]))for(var c=b[1],e=2;e<b.length-1;e++)c+="/"+b[e];return c};
-mxStencilRegistry.loadStencilSet=function(b,c,e,k){var g=mxStencilRegistry.packages[b];if(null!=e&&e||null==g){var n=!1;if(null==g)try{if(k){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(e){null!=e&&null!=e.documentElement&&(mxStencilRegistry.packages[b]=e,n=!0,mxStencilRegistry.parseStencilSet(e.documentElement,c,n))}));return}g=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=g;n=!0}catch(t){null!=window.console&&console.log("error in loadStencilSet:",b,t)}null!=g&&null!=
-g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,c,n)}};mxStencilRegistry.loadStencil=function(b,c){if(null!=c)mxUtils.get(b,mxUtils.bind(this,function(b){c(200<=b.getStatus()&&299>=b.getStatus()?b.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var c=0;c<b.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[c]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,c,e){if("stencils"==b.nodeName)for(var k=b.firstChild;null!=k;)"shapes"==k.nodeName&&mxStencilRegistry.parseStencilSet(k,c,e),k=k.nextSibling;else{e=null!=e?e:!0;var k=b.firstChild,g="";b=b.getAttribute("name");for(null!=b&&(g=b+".");null!=k;){if(k.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=k.getAttribute("name"),null!=b)){var g=g.toLowerCase(),n=b.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(g+n.toLowerCase(),new mxStencil(k));if(null!=c){var t=k.getAttribute("w"),
-d=k.getAttribute("h"),t=null==t?80:parseInt(t,10),d=null==d?80:parseInt(d,10);c(g,n,b,t,d)}}k=k.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(b,c,e,k){var g=mxStencilRegistry.packages[b];if(null!=e&&e||null==g){var p=!1;if(null==g)try{if(k){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(e){null!=e&&null!=e.documentElement&&(mxStencilRegistry.packages[b]=e,p=!0,mxStencilRegistry.parseStencilSet(e.documentElement,c,p))}));return}g=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=g;p=!0}catch(t){null!=window.console&&console.log("error in loadStencilSet:",b,t)}null!=g&&null!=
+g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,c,p)}};mxStencilRegistry.loadStencil=function(b,c){if(null!=c)mxUtils.get(b,mxUtils.bind(this,function(b){c(200<=b.getStatus()&&299>=b.getStatus()?b.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var c=0;c<b.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[c]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(b,c,e){if("stencils"==b.nodeName)for(var k=b.firstChild;null!=k;)"shapes"==k.nodeName&&mxStencilRegistry.parseStencilSet(k,c,e),k=k.nextSibling;else{e=null!=e?e:!0;var k=b.firstChild,g="";b=b.getAttribute("name");for(null!=b&&(g=b+".");null!=k;){if(k.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=k.getAttribute("name"),null!=b)){var g=g.toLowerCase(),p=b.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(g+p.toLowerCase(),new mxStencil(k));if(null!=c){var t=k.getAttribute("w"),
+d=k.getAttribute("h"),t=null==t?80:parseInt(t,10),d=null==d?80:parseInt(d,10);c(g,p,b,t,d)}}k=k.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function b(){var b=document.createElement("div");b.className="geHint";b.style.whiteSpace="nowrap";b.style.position="absolute";return b}function c(b,d){switch(d){case mxConstants.POINTS:return b;case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(b/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(b){return!mxEvent.isAltDown(b)};var e=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(b){return e.apply(this,arguments)||this.graph.isTableRow(b)||this.graph.isTableCell(b)};var k=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(b){return k.apply(this,arguments)||this.graph.isEdgeIgnored(b)};var g=mxConnectionHandler.prototype.isCreateTarget;
mxConnectionHandler.prototype.isCreateTarget=function(b){return this.graph.isCloneEvent(b)||g.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var b=new mxEllipse(null,this.highlightColor,this.highlightColor,0);b.opacity=mxConstants.HIGHLIGHT_OPACITY;return b};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(b){b=this.graph.createCurrentEdgeStyle();b=this.graph.createEdge(null,
-null,null,null,null,b);b=new mxCellState(this.graph.view,b,this.graph.getCellStyle(b));for(var d in this.graph.currentEdgeStyle)b.style[d]=this.graph.currentEdgeStyle[d];return b};var n=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var b=n.apply(this,arguments);b.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return b};mxConnectionHandler.prototype.updatePreview=function(b){};var t=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+null,null,null,null,b);b=new mxCellState(this.graph.view,b,this.graph.getCellStyle(b));for(var d in this.graph.currentEdgeStyle)b.style[d]=this.graph.currentEdgeStyle[d];return b};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var b=p.apply(this,arguments);b.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return b};mxConnectionHandler.prototype.updatePreview=function(b){};var t=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
function(){var b=t.apply(this,arguments),d=b.getCell;b.getCell=mxUtils.bind(this,function(b){var f=d.apply(this,arguments);this.error=null;return f});return b};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var b="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",d="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),
f=0;f<d.length;f++)null!=this.currentEdgeStyle[d[f]]&&(b+=d[f]+"="+this.currentEdgeStyle[d[f]]+";");null!=this.currentEdgeStyle.orthogonalLoop?b+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(b+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?b+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(b+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(b+="elbow="+this.currentEdgeStyle.elbow+";");return b=null!=this.currentEdgeStyle.html?b+("html="+this.currentEdgeStyle.html+";"):b+"html=1;"};Graph.prototype.updateCellStyles=function(b,d,f){this.model.beginUpdate();try{for(var c=0;c<f.length;c++)if(this.model.isVertex(f[c])||this.model.isEdge(f[c])){this.setCellStyles(b,null,[f[c]]);var e=this.getCellStyle(f[c])[b];d!=(null==e?mxConstants.NONE:e)&&this.setCellStyles(b,
d,[f[c]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var b=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=b&&(new mxCodec(b.ownerDocument)).decode(b,this.getStylesheet())};Graph.prototype.createCellLookup=function(b,d){d=null!=d?d:{};for(var f=0;f<b.length;f++){var c=b[f];d[mxObjectIdentity.get(c)]=
c.getId();for(var e=this.model.getChildCount(c),g=0;g<e;g++)this.createCellLookup([this.model.getChildAt(c,g)],d)}return d};Graph.prototype.createCellMapping=function(b,d,f){f=null!=f?f:{};for(var c in b){var e=d[c];null==f[e]&&(f[e]=b[c].getId()||"")}return f};Graph.prototype.importGraphModel=function(b,d,f,c){d=null!=d?d:0;f=null!=f?f:0;var e=new mxCodec(b.ownerDocument),g=new mxGraphModel;e.decode(b,g);b=[];var e={},l={},k=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges(),e));if(null!=
-k){var m=this.createCellLookup([g.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<k.length;g++)p=this.model.getChildren(this.moveCells([k[g]],d,f,!1,this.model.getRoot())[0]),null!=p&&(b=b.concat(p));else{var p=g.getChildren(k[0]);null!=p&&(b=this.moveCells(p,d,f,!1,this.getDefaultParent()),l[g.getChildAt(g.root,0).getId()]=this.getDefaultParent().getId())}if(null!=b&&(this.createCellMapping(e,m,l),this.updateCustomLinks(l,b),c)){this.isGridEnabled()&&
-(d=this.snap(d),f=this.snap(f));var q=this.getBoundingBoxFromGeometry(b,!0);null!=q&&this.moveCells(b,d-q.x,f-q.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},f=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],!0);for(var g=new mxCodec,l=new mxGraphModel,k=l.getChildAt(l.getRoot(),0),e=0;e<f.length;e++){l.add(k,f[e]);var m=this.view.getState(b[e]);if(null!=m){var p=this.getCellGeometry(f[e]);null!=p&&p.relative&&!this.model.isEdge(b[e])&&
-null==c.get(this.model.getParent(b[e]))&&(p.offset=null,p.relative=!1,p.x=m.x/m.view.scale-m.view.translate.x,p.y=m.y/m.view.scale-m.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),f);return g.encode(l)};Graph.prototype.isSwimlane=function(b,d){if(null!=b&&this.model.getParent(b)!=this.model.getRoot()&&!this.model.isEdge(b)){var f=this.getCurrentCellStyle(b,d)[mxConstants.STYLE_SHAPE];return f==mxConstants.SHAPE_SWIMLANE||"table"==f}return!1};var d=Graph.prototype.isExtendParent;
-Graph.prototype.isExtendParent=function(b){var f=this.model.getParent(b);if(null!=f){var c=this.getCurrentCellStyle(f);if(null!=c.expand)return"0"!=c.expand}return d.apply(this,arguments)&&(null==f||!this.isTable(f))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(b,d,c,e,g,l,k,m){null==m&&(m=this.model.getParent(b),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(l,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=f.apply(this,[b,d,c,e,g,l,k,m]);this.model.setValue(c,
-"");var p=this.getChildCells(c,!0);for(d=0;d<p.length;d++){var q=this.getCellGeometry(p[d]);null!=q&&q.relative&&0<q.x&&this.model.remove(p[d])}var E=this.getChildCells(b,!0);for(d=0;d<E.length;d++)q=this.getCellGeometry(E[d]),null!=q&&q.relative&&0>=q.x&&this.model.remove(E[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
-mxConstants.NONE,[b]);var X=this.model.getTerminal(c,!1);if(null!=X){var u=this.getCurrentCellStyle(X);null!=u&&"1"==u.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(b,d,f){if(d||f)l.apply(this,arguments);
-else{var c=this.getSelectionCell(),e=null,g=[],k=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(g.push(d),d==c)e=g.length-1;else if(b&&null==c&&0<g.length||null!=e&&b&&g.length>e||!b&&0<e)return;for(var f=0;f<this.model.getChildCount(d);f++)k(this.model.getChildAt(d,f))});k(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=
-function(b,d,f,c,e,g,l){l=null!=l?l:{};if(this.isTable(e)){for(var k=[],p=0;p<b.length;p++)this.isTable(b[p])?k=k.concat(this.model.getChildCells(b[p],!0).reverse()):k.push(b[p]);b=k}this.model.beginUpdate();try{k=[];for(p=0;p<b.length;p++)if(null!=e&&this.isTableRow(b[p])){var q=this.model.getParent(b[p]),E=this.getCellGeometry(b[p]);this.isTable(q)&&k.push(q);if(null!=q&&null!=E&&this.isTable(q)&&this.isTable(e)&&(c||q!=e)){if(!c){var u=this.getCellGeometry(q);null!=u&&(u=u.clone(),u.height-=E.height,
-this.model.setGeometry(q,u))}u=this.getCellGeometry(e);null!=u&&(u=u.clone(),u.height+=E.height,this.model.setGeometry(e,u));var X=this.model.getChildCells(e,!0);if(0<X.length){b[p]=c?this.cloneCell(b[p]):b[p];var n=this.model.getChildCells(b[p],!0),v=this.model.getChildCells(X[0],!0),B=v.length-n.length;if(0<B)for(var F=0;F<B;F++){var x=this.cloneCell(n[n.length-1]);null!=x&&(x.value="",this.model.add(b[p],x))}else if(0>B)for(F=0;F>B;F--)this.model.remove(n[n.length+F-1]);n=this.model.getChildCells(b[p],
-!0);for(F=0;F<v.length;F++){var ta=this.getCellGeometry(v[F]),t=this.getCellGeometry(n[F]);null!=ta&&null!=t&&(t=t.clone(),t.width=ta.width,this.model.setGeometry(n[F],t))}}}}for(var sa=m.apply(this,arguments),p=0;p<k.length;p++)!c&&this.model.contains(k[p])&&0==this.model.getChildCount(k[p])&&this.model.remove(k[p]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),sa)}finally{this.model.endUpdate()}return sa};var p=Graph.prototype.removeCells;Graph.prototype.removeCells=
-function(b,d){var f=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),g=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(g)?0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g)&&f.push(g):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(g=this.model.getParent(b[c]),0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g))){for(var l=this.model.getChildCells(g,!0),k=0,m=0;m<l.length;m++)0<=mxUtils.indexOf(b,
-l[m])&&k++;k==l.length&&f.push(g)}f.push(b[c])}f=p.apply(this,[f,d])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(b,d,f){f=null!=f?f:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&f.updateCustomLinksForCell(b,d[c],f)};Graph.prototype.updateCustomLinksForCell=function(b,d){this.doUpdateCustomLinksForCell(b,d);for(var f=this.model.getChildCount(d),c=0;c<f;c++)this.updateCustomLinksForCell(b,this.model.getChildAt(d,c))};Graph.prototype.doUpdateCustomLinksForCell=
+k){var q=this.createCellLookup([g.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<k.length;g++)m=this.model.getChildren(this.moveCells([k[g]],d,f,!1,this.model.getRoot())[0]),null!=m&&(b=b.concat(m));else{var m=g.getChildren(k[0]);null!=m&&(b=this.moveCells(m,d,f,!1,this.getDefaultParent()),l[g.getChildAt(g.root,0).getId()]=this.getDefaultParent().getId())}if(null!=b&&(this.createCellMapping(e,q,l),this.updateCustomLinks(l,b),c)){this.isGridEnabled()&&
+(d=this.snap(d),f=this.snap(f));var n=this.getBoundingBoxFromGeometry(b,!0);null!=n&&this.moveCells(b,d-n.x,f-n.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},f=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],!0);for(var g=new mxCodec,l=new mxGraphModel,k=l.getChildAt(l.getRoot(),0),e=0;e<f.length;e++){l.add(k,f[e]);var q=this.view.getState(b[e]);if(null!=q){var m=this.getCellGeometry(f[e]);null!=m&&m.relative&&!this.model.isEdge(b[e])&&
+null==c.get(this.model.getParent(b[e]))&&(m.offset=null,m.relative=!1,m.x=q.x/q.view.scale-q.view.translate.x,m.y=q.y/q.view.scale-q.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),f);return g.encode(l)};Graph.prototype.isSwimlane=function(b,d){if(null!=b&&this.model.getParent(b)!=this.model.getRoot()&&!this.model.isEdge(b)){var f=this.getCurrentCellStyle(b,d)[mxConstants.STYLE_SHAPE];return f==mxConstants.SHAPE_SWIMLANE||"table"==f}return!1};var d=Graph.prototype.isExtendParent;
+Graph.prototype.isExtendParent=function(b){var f=this.model.getParent(b);if(null!=f){var c=this.getCurrentCellStyle(f);if(null!=c.expand)return"0"!=c.expand}return d.apply(this,arguments)&&(null==f||!this.isTable(f))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(b,d,c,e,g,l,k,q){null==q&&(q=this.model.getParent(b),this.isTable(q)||this.isTableRow(q))&&(q=this.getCellAt(l,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=f.apply(this,[b,d,c,e,g,l,k,q]);this.model.setValue(c,
+"");var m=this.getChildCells(c,!0);for(d=0;d<m.length;d++){var n=this.getCellGeometry(m[d]);null!=n&&n.relative&&0<n.x&&this.model.remove(m[d])}var E=this.getChildCells(b,!0);for(d=0;d<E.length;d++)n=this.getCellGeometry(E[d]),null!=n&&n.relative&&0>=n.x&&this.model.remove(E[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
+mxConstants.NONE,[b]);var X=this.model.getTerminal(c,!1);if(null!=X){var v=this.getCurrentCellStyle(X);null!=v&&"1"==v.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(b,d,f){if(d||f)l.apply(this,arguments);
+else{var c=this.getSelectionCell(),e=null,g=[],k=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(g.push(d),d==c)e=g.length-1;else if(b&&null==c&&0<g.length||null!=e&&b&&g.length>e||!b&&0<e)return;for(var f=0;f<this.model.getChildCount(d);f++)k(this.model.getChildAt(d,f))});k(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var q=Graph.prototype.moveCells;Graph.prototype.moveCells=
+function(b,d,f,c,e,g,l){l=null!=l?l:{};if(this.isTable(e)){for(var k=[],m=0;m<b.length;m++)this.isTable(b[m])?k=k.concat(this.model.getChildCells(b[m],!0).reverse()):k.push(b[m]);b=k}this.model.beginUpdate();try{k=[];for(m=0;m<b.length;m++)if(null!=e&&this.isTableRow(b[m])){var n=this.model.getParent(b[m]),E=this.getCellGeometry(b[m]);this.isTable(n)&&k.push(n);if(null!=n&&null!=E&&this.isTable(n)&&this.isTable(e)&&(c||n!=e)){if(!c){var v=this.getCellGeometry(n);null!=v&&(v=v.clone(),v.height-=E.height,
+this.model.setGeometry(n,v))}v=this.getCellGeometry(e);null!=v&&(v=v.clone(),v.height+=E.height,this.model.setGeometry(e,v));var X=this.model.getChildCells(e,!0);if(0<X.length){b[m]=c?this.cloneCell(b[m]):b[m];var u=this.model.getChildCells(b[m],!0),p=this.model.getChildCells(X[0],!0),B=p.length-u.length;if(0<B)for(var F=0;F<B;F++){var x=this.cloneCell(u[u.length-1]);null!=x&&(x.value="",this.model.add(b[m],x))}else if(0>B)for(F=0;F>B;F--)this.model.remove(u[u.length+F-1]);u=this.model.getChildCells(b[m],
+!0);for(F=0;F<p.length;F++){var ta=this.getCellGeometry(p[F]),t=this.getCellGeometry(u[F]);null!=ta&&null!=t&&(t=t.clone(),t.width=ta.width,this.model.setGeometry(u[F],t))}}}}for(var sa=q.apply(this,arguments),m=0;m<k.length;m++)!c&&this.model.contains(k[m])&&0==this.model.getChildCount(k[m])&&this.model.remove(k[m]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),sa)}finally{this.model.endUpdate()}return sa};var m=Graph.prototype.removeCells;Graph.prototype.removeCells=
+function(b,d){var f=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),g=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(g)?0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g)&&f.push(g):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(g=this.model.getParent(b[c]),0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g))){for(var l=this.model.getChildCells(g,!0),k=0,q=0;q<l.length;q++)0<=mxUtils.indexOf(b,
+l[q])&&k++;k==l.length&&f.push(g)}f.push(b[c])}f=m.apply(this,[f,d])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(b,d,f){f=null!=f?f:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&f.updateCustomLinksForCell(b,d[c],f)};Graph.prototype.updateCustomLinksForCell=function(b,d){this.doUpdateCustomLinksForCell(b,d);for(var f=this.model.getChildCount(d),c=0;c<f;c++)this.updateCustomLinksForCell(b,this.model.getChildAt(d,c))};Graph.prototype.doUpdateCustomLinksForCell=
function(b,d){};Graph.prototype.getAllConnectionConstraints=function(b,d){if(null!=b){var f=mxUtils.getValue(b.style,"points",null);if(null!=f){var c=[];try{for(var e=JSON.parse(f),f=0;f<e.length;f++){var g=e[f];c.push(new mxConnectionConstraint(new mxPoint(g[0],g[1]),2<g.length?"0"!=g[2]:!0,null,3<g.length?g[3]:0,4<g.length?g[4]:0))}}catch(xa){}return c}if(null!=b.shape&&null!=b.shape.bounds){g=b.shape.direction;e=b.shape.bounds;f=b.shape.scale;c=e.width/f;e=e.height/f;if(g==mxConstants.DIRECTION_NORTH||
g==mxConstants.DIRECTION_SOUTH)g=c,c=e,e=g;f=b.shape.getConstraints(b.style,c,e);if(null!=f)return f;if(null!=b.shape.stencil&&null!=b.shape.stencil.constraints)return b.shape.stencil.constraints;if(null!=b.shape.constraints)return b.shape.constraints}}return null};Graph.prototype.flipEdge=function(b){if(null!=b){var d=this.getCurrentCellStyle(b),d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
this.setCellStyles(mxConstants.STYLE_ELBOW,d,[b])}};Graph.prototype.isValidRoot=function(b){for(var d=this.model.getChildCount(b),f=0,c=0;c<d;c++){var e=this.model.getChildAt(b,c);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||f++)}return 0<f||this.isContainer(b)};Graph.prototype.isValidDropTarget=function(b,d,f){for(var c=this.getCurrentCellStyle(b),e=!0,g=!0,l=0;l<d.length&&g;l++)e=e&&this.isTable(d[l]),g=g&&this.isTableRow(d[l]);return("1"!=mxUtils.getValue(c,"part","0")||
this.isContainer(b))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(b))&&!this.isTableRow(b)&&(!this.isTable(b)||g||e)};Graph.prototype.createGroupCell=function(){var b=mxGraph.prototype.createGroupCell.apply(this,arguments);b.setStyle("group");return b};Graph.prototype.isExtendParentsOnAdd=function(b){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=b&&null!=this.layoutManager){var f=this.model.getParent(b);
null!=f&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(b){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(b,d){var f=this.getModel(),c=[];f.beginUpdate();try{for(var e=0;e<b.length;e++){var g=b[e];if(f.isEdge(g)){var l=f.getTerminal(g,
-!0),k=f.getTerminal(g,!1);f.setTerminal(g,k,!0);f.setTerminal(g,l,!1);var m=f.getGeometry(g);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var p=m.getTerminalPoint(!0),q=m.getTerminalPoint(!1);m.setTerminalPoint(p,!1);m.setTerminalPoint(q,!0);f.setGeometry(g,m);var E=this.view.getState(g),u=this.view.getState(l),n=this.view.getState(k);if(null!=E){var X=null!=u?this.getConnectionConstraint(E,u,!0):null,v=null!=n?this.getConnectionConstraint(E,n,!1):null;this.setConnectionConstraint(g,
-l,!0,v);this.setConnectionConstraint(g,k,!1,X);var B=mxUtils.getValue(E.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(E.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,B,[g])}c.push(g)}}else if(f.isVertex(g)&&(m=this.getCellGeometry(g),null!=m)){if(!(this.isTable(g)||this.isTableRow(g)||this.isTableCell(g)||this.isSwimlane(g))){m=m.clone();m.x+=m.width/
+!0),k=f.getTerminal(g,!1);f.setTerminal(g,k,!0);f.setTerminal(g,l,!1);var m=f.getGeometry(g);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var q=m.getTerminalPoint(!0),n=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(n,!0);f.setGeometry(g,m);var E=this.view.getState(g),v=this.view.getState(l),u=this.view.getState(k);if(null!=E){var X=null!=v?this.getConnectionConstraint(E,v,!0):null,p=null!=u?this.getConnectionConstraint(E,u,!1):null;this.setConnectionConstraint(g,
+l,!0,p);this.setConnectionConstraint(g,k,!1,X);var B=mxUtils.getValue(E.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(E.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,B,[g])}c.push(g)}}else if(f.isVertex(g)&&(m=this.getCellGeometry(g),null!=m)){if(!(this.isTable(g)||this.isTableRow(g)||this.isTableCell(g)||this.isSwimlane(g))){m=m.clone();m.x+=m.width/
2-m.height/2;m.y+=m.height/2-m.width/2;var F=m.width;m.width=m.height;m.height=F;f.setGeometry(g,m)}var x=this.view.getState(g);if(null!=x){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],I=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,I)+(d?-1:1),t.length)],[g])}c.push(g)}}}finally{f.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=
-function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var q=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||this.isTableRow(b.cell))&&(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&
-(d=this.model.getParent(d));var f=this.view.getState(d);null!=f&&null!=f.shape&&(this.view.invalidate(d),f.shape.bounds=null)}q.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(b){b=this.model.getDescendants(b);if(0<b.length)for(var d=0;d<b.length;d++){var f=this.view.getState(b[d]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&
+function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||this.isTableRow(b.cell))&&(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&
+(d=this.model.getParent(d));var f=this.view.getState(d);null!=f&&null!=f.shape&&(this.view.invalidate(d),f.shape.bounds=null)}n.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(b){b=this.model.getDescendants(b);if(0<b.length)for(var d=0;d<b.length;d++){var f=this.view.getState(b[d]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&
this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(b[d]):this.isReplacePlaceholders(b[d])&&this.view.invalidate(b[d],!1,!1)}};Graph.prototype.replaceElement=function(b,d){for(var f=b.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(b.attributes);attr=c.pop();)f.setAttribute(attr.nodeName,attr.nodeValue);f.innerHTML=b.innerHTML;b.parentNode.replaceChild(f,b)};Graph.prototype.processElements=function(b,d){if(null!=b)for(var f=b.getElementsByTagName("*"),c=
0;c<f.length;c++)d(f[c])};Graph.prototype.updateLabelElements=function(b,d,f){b=null!=b?b:this.getSelectionCells();for(var c=document.createElement("div"),e=0;e<b.length;e++)if(this.isHtmlLabel(b[e])){var g=this.convertValueToString(b[e]);if(null!=g&&0<g.length){c.innerHTML=g;for(var l=c.getElementsByTagName(null!=f?f:"*"),k=0;k<l.length;k++)d(l[k]);c.innerHTML!=g&&this.cellLabelChanged(b[e],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(b,d,f){d=Graph.zapGremlins(d);this.model.beginUpdate();
try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),e=b;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(c)){this.setAttributeForCell(e,c,d);break}e=this.model.getParent(e)}var g=b.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.hasAttribute("label_"+Graph.diagramLanguage)?g.setAttribute("label_"+Graph.diagramLanguage,d):
g.setAttribute("label",d);d=g}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(b){if(null!=b){for(var d=new mxDictionary,f=0;f<b.length;f++)d.put(b[f],!0);for(var c=[],f=0;f<b.length;f++){var e=this.model.getParent(b[f]);null==e||d.get(e)||(d.put(e,!0),c.push(e))}for(f=0;f<c.length;f++)if(e=this.view.getState(c[f]),null!=e&&(this.model.isEdge(e.cell)||this.model.isVertex(e.cell))&&this.isCellDeletable(e.cell)&&this.isTransparentState(e)){for(var g=
!0,l=0;l<this.model.getChildCount(e.cell)&&g;l++)d.get(this.model.getChildAt(e.cell,l))||(g=!1);g&&b.push(e.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(b){for(var d=[],f=0;f<b.length;f++)this.isCellDeletable(b[f])&&this.isTransparentState(this.view.getState(b[f]))&&d.push(b[f]);b=d;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(b,d){this.setAttributeForCell(b,"link",d)};Graph.prototype.setTooltipForCell=
function(b,d){var f="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(b.value)&&b.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(f="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(b,f,d)};Graph.prototype.getAttributeForCell=function(b,d,f){b=null!=b.value&&"object"===typeof b.value?b.value.getAttribute(d):null;return null!=b?b:f};Graph.prototype.setAttributeForCell=function(b,d,f){var c;null!=b.value&&"object"==typeof b.value?c=b.value.cloneNode(!0):(c=
-mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",b.value||""));null!=f?c.setAttribute(d,f):c.removeAttribute(d);this.model.setValue(b,c)};var v=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(b,d,f,c){this.getModel();if(mxEvent.isAltDown(d))return null;for(var e=0;e<b.length;e++){var g=this.model.getParent(b[e]);if(this.model.isEdge(g)&&0>mxUtils.indexOf(b,g))return null}for(var g=v.apply(this,arguments),l=!0,e=0;e<b.length&&l;e++)l=l&&this.isTableRow(b[e]);
+mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",b.value||""));null!=f?c.setAttribute(d,f):c.removeAttribute(d);this.model.setValue(b,c)};var u=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(b,d,f,c){this.getModel();if(mxEvent.isAltDown(d))return null;for(var e=0;e<b.length;e++){var g=this.model.getParent(b[e]);if(this.model.isEdge(g)&&0>mxUtils.indexOf(b,g))return null}for(var g=u.apply(this,arguments),l=!0,e=0;e<b.length&&l;e++)l=l&&this.isTableRow(b[e]);
l&&(this.isTableCell(g)&&(g=this.model.getParent(g)),this.isTableRow(g)&&(g=this.model.getParent(g)),this.isTable(g)||(g=null));return g};Graph.prototype.click=function(b){mxGraph.prototype.click.call(this,b);this.firstClickState=b.getState();this.firstClickSource=b.getSource()};Graph.prototype.dblClick=function(b,d){this.isEnabled()&&(d=this.insertTextForEvent(b,d),mxGraph.prototype.dblClick.call(this,b,d))};Graph.prototype.insertTextForEvent=function(b,d){var f=mxUtils.convertPoint(this.container,
mxEvent.getClientX(b),mxEvent.getClientY(b));if(null!=b&&!this.model.isVertex(d)){var c=this.model.isEdge(d)?this.view.getState(d):null,e=mxEvent.getSource(b);this.firstClickState!=c||this.firstClickSource!=e||null!=c&&null!=c.text&&null!=c.text.node&&null!=c.text.boundingBox&&(mxUtils.contains(c.text.boundingBox,f.x,f.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(b)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||!(null!=c||mxClient.IS_SVG&&
e==this.view.getCanvas().ownerSVGElement)||(null==c&&(c=this.view.getState(this.getCellAt(f.x,f.y))),d=this.addText(f.x,f.y,c))}return d};Graph.prototype.getInsertPoint=function(){var b=this.getGridSize(),d=this.container.scrollLeft/this.view.scale-this.view.translate.x,f=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var c=this.getPageLayout(),e=this.getPageSize(),d=Math.max(d,c.x*e.width),f=Math.max(f,c.y*e.height);return new mxPoint(this.snap(d+b),this.snap(f+
@@ -2558,19 +2559,19 @@ f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null!=f?this.clear():(null!=l.t
l.container.scrollLeft)<g&&Math.abs(this.scrollTop-l.container.scrollTop)<g&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(e=l.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==d||d(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":
e?l.linkTarget:"_top",l.openLink(this.currentLink,k),c.consume())):null!=f&&!c.isConsumed()&&Math.abs(this.scrollLeft-l.container.scrollLeft)<g&&Math.abs(this.scrollTop-l.container.scrollTop)<g&&Math.abs(this.startX-c.getGraphX())<g&&Math.abs(this.startY-c.getGraphY())<g&&f(c.getEvent()));this.clear()},activate:function(b){this.currentLink=l.getAbsoluteUrl(l.getLinkForCell(b.cell));null!=this.currentLink&&(this.currentTarget=l.getLinkTargetForCell(b.cell),l.container.style.cursor="pointer",null!=
this.highlight&&this.highlight.highlight(b))},clear:function(){null!=l.container&&(l.container.style.cursor=e);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=l.tooltipHandler&&l.tooltipHandler.hide()}};l.click=function(b){};l.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(b){k.clear()})};Graph.prototype.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();d=null!=d?d:!0;for(var f=0;f<b.length;f++)this.isTableCell(b[f])&&
-(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,g=[];c.beginUpdate();try{for(var l={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,l,!0),f=0;f<b.length;f++){var p=c.getParent(b[f]);if(null!=p){var q=this.moveCells([m[f]],e,e,!1)[0];g.push(q);if(d)c.add(p,m[f]);else{var E=p.getIndex(b[f]);c.add(p,m[f],E+1)}if(this.isTable(p)){var u=this.getCellGeometry(m[f]),n=this.getCellGeometry(p);null!=u&&null!=n&&(n=n.clone(),n.height+=u.height,c.setGeometry(p,
-n))}}else g.push(m[f])}this.updateCustomLinks(this.createCellMapping(l,k),m,this)}finally{c.endUpdate()}return g};Graph.prototype.insertImage=function(b,d,f){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),e=[],g=0;g<c.length;g++)e.push(c[g]);document.execCommand("insertimage",!1,b);b=this.cellEditor.textarea.getElementsByTagName("img");if(b.length==e.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=e[g-1]){b[g].setAttribute("width",d);b[g].setAttribute("height",
+(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,g=[];c.beginUpdate();try{for(var l={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,l,!0),f=0;f<b.length;f++){var q=c.getParent(b[f]);if(null!=q){var n=this.moveCells([m[f]],e,e,!1)[0];g.push(n);if(d)c.add(q,m[f]);else{var E=q.getIndex(b[f]);c.add(q,m[f],E+1)}if(this.isTable(q)){var v=this.getCellGeometry(m[f]),u=this.getCellGeometry(q);null!=v&&null!=u&&(u=u.clone(),u.height+=v.height,c.setGeometry(q,
+u))}}else g.push(m[f])}this.updateCustomLinks(this.createCellMapping(l,k),m,this)}finally{c.endUpdate()}return g};Graph.prototype.insertImage=function(b,d,f){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),e=[],g=0;g<c.length;g++)e.push(c[g]);document.execCommand("insertimage",!1,b);b=this.cellEditor.textarea.getElementsByTagName("img");if(b.length==e.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=e[g-1]){b[g].setAttribute("width",d);b[g].setAttribute("height",
f);break}}};Graph.prototype.insertLink=function(b){if(null!=this.cellEditor.textarea)if(0==b.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),f=[],c=0;c<d.length;c++)f.push(d[c]);document.execCommand("createlink",!1,mxUtils.trim(b));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==f.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=f[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(f=d[0].parentNode;null!=
d[0].firstChild;)f.insertBefore(d[0].firstChild,d[0]);f.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(b))};Graph.prototype.isCellResizable=function(b){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),f=this.getCurrentCellStyle(b);return!this.isTableCell(b)&&!this.isTableRow(b)&&(d||"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==f[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(b,d){null==d&&(d=this.getSelectionCells());
-if(null!=d&&1<d.length){for(var f=[],c=null,e=null,g=0;g<d.length;g++)if(this.getModel().isVertex(d[g])){var l=this.view.getState(d[g]);if(null!=l){var k=b?l.getCenterX():l.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):k;f.push(l)}}if(2<f.length){f.sort(function(d,f){return b?d.x-f.x:d.y-f.y});l=this.view.translate;k=this.view.scale;e=e/k-(b?l.x:l.y);c=c/k-(b?l.x:l.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(f.length-1),c=e,g=1;g<f.length-1;g++){var p=this.view.getState(this.model.getParent(f[g].cell)),
-q=this.getCellGeometry(f[g].cell),c=c+m;null!=q&&null!=p&&(q=q.clone(),b?q.x=Math.round(c-q.width/2)-p.origin.x:q.y=Math.round(c-q.height/2)-p.origin.y,this.getModel().setGeometry(f[g].cell,q))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,d){return this.getLinkForCell(b.cell)});
-return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=function(b,d,f,c,e,g,l,k,m,p,q,E,u,n){var v=null;if(null!=n)for(v=new mxDictionary,q=0;q<n.length;q++)v.put(n[q],!0);if(n=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;
-g=null!=g?g:!0;l=null!=l?l:!0;var B="page"==u?this.view.getBackgroundPageBounds():g&&null==v||c||"diagram"==u?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),F=this.view.scale;"diagram"==u&&null!=this.backgroundImage&&B.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*F,(this.view.translate.y+this.backgroundImage.y)*F,this.backgroundImage.width*F,this.backgroundImage.height*F));if(null==B)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),
-t=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=t.style?t.style.backgroundColor=b:t.setAttribute("style","background-color:"+b));null==x.createElementNS?(t.setAttribute("xmlns",mxConstants.NS_SVG),t.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/F;var I=Math.max(1,Math.ceil(B.width*b)+2*f)+(p?5:0),y=Math.max(1,Math.ceil(B.height*b)+2*f)+(p?5:0);t.setAttribute("version",
+if(null!=d&&1<d.length){for(var f=[],c=null,e=null,g=0;g<d.length;g++)if(this.getModel().isVertex(d[g])){var l=this.view.getState(d[g]);if(null!=l){var k=b?l.getCenterX():l.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):k;f.push(l)}}if(2<f.length){f.sort(function(d,f){return b?d.x-f.x:d.y-f.y});l=this.view.translate;k=this.view.scale;e=e/k-(b?l.x:l.y);c=c/k-(b?l.x:l.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(f.length-1),c=e,g=1;g<f.length-1;g++){var q=this.view.getState(this.model.getParent(f[g].cell)),
+n=this.getCellGeometry(f[g].cell),c=c+m;null!=n&&null!=q&&(n=n.clone(),b?n.x=Math.round(c-n.width/2)-q.origin.x:n.y=Math.round(c-n.height/2)-q.origin.y,this.getModel().setGeometry(f[g].cell,n))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,d){return this.getLinkForCell(b.cell)});
+return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=function(b,d,f,c,e,g,l,k,m,q,n,E,v,u){var p=null;if(null!=u)for(p=new mxDictionary,n=0;n<u.length;n++)p.put(u[n],!0);if(u=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;
+g=null!=g?g:!0;l=null!=l?l:!0;var B="page"==v?this.view.getBackgroundPageBounds():g&&null==p||c||"diagram"==v?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),F=this.view.scale;"diagram"==v&&null!=this.backgroundImage&&B.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*F,(this.view.translate.y+this.backgroundImage.y)*F,this.backgroundImage.width*F,this.backgroundImage.height*F));if(null==B)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),
+t=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=t.style?t.style.backgroundColor=b:t.setAttribute("style","background-color:"+b));null==x.createElementNS?(t.setAttribute("xmlns",mxConstants.NS_SVG),t.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/F;var I=Math.max(1,Math.ceil(B.width*b)+2*f)+(q?5:0),y=Math.max(1,Math.ceil(B.height*b)+2*f)+(q?5:0);t.setAttribute("version",
"1.1");t.setAttribute("width",I+"px");t.setAttribute("height",y+"px");t.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+I+" "+y);x.appendChild(t);var C=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");t.appendChild(C);var X=this.createSvgCanvas(C);X.foOffset=e?-.5:0;X.textOffset=e?-.5:0;X.imageOffset=e?-.5:0;X.translate(Math.floor(f/d-B.x/F),Math.floor(f/d-B.y/F));var Z=document.createElement("div"),A=X.getAlternateText;X.getAlternateText=function(b,d,f,c,e,
-g,l,k,m,p,q,z,oa){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(Z.innerHTML=g,g=mxUtils.extractTextWithWhitespace(Z.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),ua=[],Sa=0,E=0;(0==Wa||Sa<Wa)&&E<g.length;){var Ta=g.charCodeAt(E);if(10==Ta||13==Ta){if(0<Sa)break}else ua.push(g.charAt(E)),255>Ta&&Sa++;E++}ua.length<g.length&&1<g.length-ua.length&&(g=mxUtils.trim(ua.join(""))+"...");return g}catch(gb){return A.apply(this,arguments)}else return A.apply(this,arguments)};
+g,l,k,m,q,n,z,oa){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(Z.innerHTML=g,g=mxUtils.extractTextWithWhitespace(Z.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),ua=[],Sa=0,E=0;(0==Wa||Sa<Wa)&&E<g.length;){var Ta=g.charCodeAt(E);if(10==Ta||13==Ta){if(0<Sa)break}else ua.push(g.charAt(E)),255>Ta&&Sa++;E++}ua.length<g.length&&1<g.length-ua.length&&(g=mxUtils.trim(ua.join(""))+"...");return g}catch(gb){return A.apply(this,arguments)}else return A.apply(this,arguments)};
var N=this.backgroundImage;if(null!=N){d=F/d;var ta=this.view.translate,ca=new mxRectangle((N.x+ta.x)*d,(N.y+ta.y)*d,N.width*d,N.height*d);mxUtils.intersects(B,ca)&&X.image(N.x+ta.x,N.y+ta.y,N.width,N.height,N.src,!0)}X.scale(b);X.textEnabled=l;k=null!=k?k:this.createSvgImageExport();var G=k.drawCellState,ba=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=ba.apply(this,arguments);return null==f||b.view.graph.isCustomLink(f)?null:f};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};
-k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=v?v.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(g&&null==v||c)&&null!=e;)c=null!=v?v.get(e):f.isCellSelected(e),e=f.model.getParent(e);(g&&null==v||c)&&G.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),X);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(X,t);return t}finally{n&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
+k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=p?p.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(g&&null==p||c)&&null!=e;)c=null!=p?p.get(e):f.isCellSelected(e),e=f.model.getParent(e);(g&&null==p||c)&&G.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),X);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(X,t);return t}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
function(b,d){if("0"!=urlParams["svg-warning"]&&0<d.getElementsByTagName("foreignObject").length){var f=b.createElement("switch"),c=b.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=b.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,
"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var g=b.createElement("text");g.setAttribute("text-anchor","middle");g.setAttribute("font-size","10px");g.setAttribute("x","50%");g.setAttribute("y","100%");mxUtils.write(g,Graph.foreignObjectWarningText);f.appendChild(c);e.appendChild(g);f.appendChild(e);d.appendChild(f)}};Graph.prototype.updateSvgLinks=function(b,d,f){b=b.getElementsByTagName("a");for(var c=0;c<b.length;c++)if(null==b[c].getAttribute("target")){var e=
b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&(null!=d&&/^https?:\/\//.test(e)?b[c].setAttribute("target",d):f&&this.isCustomLink(e)&&b[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(b){b=new mxSvgCanvas2D(b);b.pointerEvents=!0;return b};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(b=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&
@@ -2578,11 +2579,11 @@ b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&
d;){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.getParentByNames=function(b,d,f){for(;null!=b&&!(0<=mxUtils.indexOf(d,b.nodeName));){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var f=document.createRange();f.selectNode(b);d.removeAllRanges();d.addRange(f)}}else(d=document.selection)&&"Control"!=d.type&&(b=d.createRange(),b.collapse(!0),f=d.createRange(),
f.setEndPoint("StartToStart",b),f.select())};Graph.prototype.deleteCells=function(b,d){var f=null;if(null!=b&&0<b.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var e=this.model.getParent(b[c]);if(this.isTable(e)){var g=this.getCellGeometry(b[c]),l=this.getCellGeometry(e);null!=g&&null!=l&&(l=l.clone(),l.height-=g.height,this.model.setGeometry(e,l))}}var k=this.selectParentAfterDelete?this.model.getParents(b):null;this.removeCells(b,d)}finally{this.model.endUpdate()}if(null!=k)for(f=
[],c=0;c<k.length;c++)this.model.contains(k[c])&&(this.model.isVertex(k[c])||this.model.isEdge(k[c]))&&f.push(k[c])}return f};Graph.prototype.insertTableColumn=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=0;if(this.isTableCell(b))var g=f.getParent(b),c=f.getParent(g),e=mxUtils.indexOf(f.getChildCells(g,!0),b);else this.isTableRow(b)?c=f.getParent(b):b=f.getChildCells(c,!0)[0],d||(e=f.getChildCells(b,!0).length-1);for(var l=f.getChildCells(c,!0),k=Graph.minTableColumnWidth,g=0;g<
-l.length;g++){var m=f.getChildCells(l[g],!0)[e],p=f.cloneCell(m,!1),q=this.getCellGeometry(p);p.value=null;if(null!=q){var k=q.width,E=this.getCellGeometry(l[g]);null!=E&&(q.height=E.height)}f.add(l[g],p,e+(d?0:1))}var u=this.getCellGeometry(c);null!=u&&(u=u.clone(),u.width+=k,f.setGeometry(c,u))}finally{f.endUpdate()}};Graph.prototype.deleteLane=function(b){var d=this.getModel();d.beginUpdate();try{var f=null,f="stackLayout"==this.getCurrentCellStyle(b).childLayout?b:d.getParent(b),c=d.getChildCells(f,
+l.length;g++){var m=f.getChildCells(l[g],!0)[e],q=f.cloneCell(m,!1),n=this.getCellGeometry(q);q.value=null;if(null!=n){var k=n.width,E=this.getCellGeometry(l[g]);null!=E&&(n.height=E.height)}f.add(l[g],q,e+(d?0:1))}var v=this.getCellGeometry(c);null!=v&&(v=v.clone(),v.width+=k,f.setGeometry(c,v))}finally{f.endUpdate()}};Graph.prototype.deleteLane=function(b){var d=this.getModel();d.beginUpdate();try{var f=null,f="stackLayout"==this.getCurrentCellStyle(b).childLayout?b:d.getParent(b),c=d.getChildCells(f,
!0);0==c.length?d.remove(f):(f==b&&(b=c[c.length-1]),d.remove(b))}finally{d.endUpdate()}};Graph.prototype.insertLane=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=null,e=b;if("stackLayout"==this.getCurrentCellStyle(e).childLayout)var c=e,g=f.getChildCells(c,!0),e=g[d?0:g.length-1];else c=f.getParent(e);var l=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;f.add(c,e,l+(d?0:1))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(b,d){var f=this.getModel();f.beginUpdate();
-try{var c=b,e=b;if(this.isTableCell(b))e=f.getParent(b),c=f.getParent(e);else if(this.isTableRow(b))c=f.getParent(b);else var g=f.getChildCells(c,!0),e=g[d?0:g.length-1];var l=f.getChildCells(e,!0),k=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;var m=this.getCellGeometry(e);if(null!=m){for(g=0;g<l.length;g++){b=f.cloneCell(l[g],!1);e.insert(b);b.value=null;var p=this.getCellGeometry(b);null!=p&&(p.height=m.height)}f.add(c,e,k+(d?0:1));var q=this.getCellGeometry(c);null!=q&&(q=q.clone(),q.height+=
-m.height,f.setGeometry(c,q))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(0==e.length)d.remove(f);else{this.isTableRow(c)||(c=e[0]);var g=d.getChildCells(c,!0);if(1>=g.length)d.remove(f);else{var l=g.length-1;this.isTableCell(b)&&(l=mxUtils.indexOf(g,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[l];
-d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var p=this.getCellGeometry(f);null!=p&&(p=p.clone(),p.width-=b,d.setGeometry(f,p))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(b=c=d.getParent(b));this.isTableRow(b)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(1>=e.length)d.remove(f);else{this.isTableRow(c)||(c=e[e.length-1]);d.remove(c);b=0;var g=this.getCellGeometry(c);
+try{var c=b,e=b;if(this.isTableCell(b))e=f.getParent(b),c=f.getParent(e);else if(this.isTableRow(b))c=f.getParent(b);else var g=f.getChildCells(c,!0),e=g[d?0:g.length-1];var l=f.getChildCells(e,!0),k=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;var m=this.getCellGeometry(e);if(null!=m){for(g=0;g<l.length;g++){b=f.cloneCell(l[g],!1);e.insert(b);b.value=null;var q=this.getCellGeometry(b);null!=q&&(q.height=m.height)}f.add(c,e,k+(d?0:1));var n=this.getCellGeometry(c);null!=n&&(n=n.clone(),n.height+=
+m.height,f.setGeometry(c,n))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(0==e.length)d.remove(f);else{this.isTableRow(c)||(c=e[0]);var g=d.getChildCells(c,!0);if(1>=g.length)d.remove(f);else{var l=g.length-1;this.isTableCell(b)&&(l=mxUtils.indexOf(g,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[l];
+d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var q=this.getCellGeometry(f);null!=q&&(q=q.clone(),q.width-=b,d.setGeometry(f,q))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(b=c=d.getParent(b));this.isTableRow(b)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(1>=e.length)d.remove(f);else{this.isTableRow(c)||(c=e[e.length-1]);d.remove(c);b=0;var g=this.getCellGeometry(c);
null!=g&&(b=g.height);var l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.height-=b,d.setGeometry(f,l))}}finally{d.endUpdate()}};Graph.prototype.insertRow=function(b,d){for(var f=b.tBodies[0],c=f.rows[0].cells,e=0,g=0;g<c.length;g++)var l=c[g].getAttribute("colspan"),e=e+(null!=l?parseInt(l):1);f=f.insertRow(d);for(g=0;g<e;g++)mxUtils.br(f.insertCell(-1));return f.cells[0]};Graph.prototype.deleteRow=function(b,d){b.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(b,d){var f=b.tHead;
if(null!=f)for(var c=0;c<f.rows.length;c++){var e=document.createElement("th");f.rows[c].appendChild(e);mxUtils.br(e)}f=b.tBodies[0];for(c=0;c<f.rows.length;c++)e=f.rows[c].insertCell(d),mxUtils.br(e);return f.rows[0].cells[0<=d?d:f.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(b,d){if(0<=d)for(var f=b.tBodies[0].rows,c=0;c<f.length;c++)f[c].cells.length>d&&f[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(b){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&
d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var f=document.createElement("div");f.innerHTML=b;b=document.createDocumentFragment();for(var c;c=f.firstChild;)lastNode=b.appendChild(c);d.insertNode(b)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(b)};Graph.prototype.createLinkForHint=function(b,d){function f(b,d){b.length>d&&(b=b.substring(0,Math.round(d/2))+"..."+b.substring(b.length-Math.round(d/4)));return b}b=null!=b?b:"javascript:void(0);";if(null==d||0==d.length)d=
@@ -2593,8 +2594,8 @@ d.state.shape.node.style.cursor))}null==d.getState()&&this.isEnabled()&&(this.co
[b,e,g])})};mxCellEditor.prototype.isContentEditing=function(){var b=this.graph.view.getState(this.editingCell);return null!=b&&1==b.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var b="";window.getSelection?b=window.getSelection():document.getSelection?b=document.getSelection():document.selection&&(b=document.selection.createRange().text);
return""!=b};mxCellEditor.prototype.insertTab=function(b){var d=this.textarea.ownerDocument.defaultView.getSelection(),f=d.getRangeAt(0),c="\t";if(null!=b)for(c="";0<b;)c+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(c));f.insertNode(b);f.setStartAfter(b);f.setEndAfter(b);d.removeAllRanges();d.addRange(f)};mxCellEditor.prototype.alignText=function(b,d){var f=null!=d&&mxEvent.isShiftDown(d);if(f||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=
!0;this.graph.processElements(this.textarea,function(b){f||window.getSelection().containsNode(b,!0)?(b.removeAttribute("align"),b.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(b)}document.execCommand("justify"+b.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var b=window.getSelection();if(b.getRangeAt&&b.rangeCount){for(var d=[],f=0,c=b.rangeCount;f<c;++f)d.push(b.getRangeAt(f));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
-return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,f=b.length;d<f;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(la){}};var u=mxCellRenderer.prototype.postConfigureShape;mxCellRenderer.prototype.postConfigureShape=function(b){var d=Editor.isDarkMode()?"#ffffff":"#000000",f=b.view.graph.defaultPageBackgroundColor;this.resolveDefaultColor(b,"fill",b.shape,f);this.resolveDefaultColor(b,
-"stroke",b.shape,d);this.resolveDefaultColor(b,"laneFill",b.shape,f);this.resolveDefaultColor(b,"imageBackground",b.shape,f);this.resolveDefaultColor(b,"imageBorder",b.shape,d);this.resolveDefaultColor(b,"background",b.text,f);this.resolveDefaultColor(b,"color",b.text,d);u.apply(this,arguments)};mxCellRenderer.prototype.resolveDefaultColor=function(b,d,f,c){null!=f&&"default"==f[d]&&(f[d]=c)};var y=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(b){null!=
+return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,f=b.length;d<f;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(la){}};var v=mxCellRenderer.prototype.postConfigureShape;mxCellRenderer.prototype.postConfigureShape=function(b){var d=Editor.isDarkMode()?"#ffffff":"#000000",f=b.view.graph.defaultPageBackgroundColor;this.resolveDefaultColor(b,"fill",b.shape,f);this.resolveDefaultColor(b,
+"stroke",b.shape,d);this.resolveDefaultColor(b,"laneFill",b.shape,f);this.resolveDefaultColor(b,"imageBackground",b.shape,f);this.resolveDefaultColor(b,"imageBorder",b.shape,d);this.resolveDefaultColor(b,"background",b.text,f);this.resolveDefaultColor(b,"color",b.text,d);v.apply(this,arguments)};mxCellRenderer.prototype.resolveDefaultColor=function(b,d,f,c){null!=f&&"default"==f[d]&&(f[d]=c)};var y=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(b){null!=
b.text&&(b.text.replaceLinefeeds="0"!=mxUtils.getValue(b.style,"nl2Br","1"));y.apply(this,arguments)};var x=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,d){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?x.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var D=mxCellEditor.prototype.startEditing;
mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);D.apply(this,arguments);var f=this.graph.view.getState(b);this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var f=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(f)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=
mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(b){function d(b,f){f.originalNode=b;b=b.firstChild;for(var c=f.firstChild;null!=b&&null!=c;)d(b,c),b=b.nextSibling,c=c.nextSibling;return f}function f(b,d){if(null!=b)if(d.originalNode!=b)c(b);else for(b=b.firstChild,d=d.firstChild;null!=b;){var e=b.nextSibling;null==d?c(b):(f(b,d),d=d.nextSibling);b=e}}function c(b){for(var d=
@@ -2622,10 +2623,10 @@ b.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(b,d){return this.gr
var Q=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return Q.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 T=mxVertexHandler.prototype.isParentHighlightVisible;
mxVertexHandler.prototype.isParentHighlightVisible=function(){return T.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var N=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(b){return b.tableHandle||N.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var b=0;this.graph.isTableRow(this.state.cell)?
b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var O=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return O.apply(this,arguments).grow(-this.getSelectionBorderInset())};var ha=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=ha.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,f=d.model,c=this.state,e=this.selectionBorder,g=this;
-null==b&&(b=[]);var l=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<l.length){for(var k=f.getChildCells(l[0].cell,!0),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var l=d.view.getState(k[f]),m=d.getCellGeometry(k[f]),p=null!=m.alternateBounds?m.alternateBounds:m;null==l&&(l=new mxCellState(d.view,k[f],d.getCellStyle(k[f])),l.x=c.x+m.x*d.view.scale,l.y=c.y+m.y*d.view.scale,l.width=p.width*d.view.scale,l.height=p.height*d.view.scale,l.updateCachedBounds());var m=f<k.length-1?k[f+
-1]:null,m=null!=m?d.getCellGeometry(m):null,q=null!=m&&null!=m.alternateBounds?m.alternateBounds:m,m=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);m.isDashed=e.isDashed;m.svgStrokeTolerance++;l=new mxHandle(l,"col-resize",null,m);l.tableHandle=!0;var E=0;l.shape.node.parentNode.insertBefore(l.shape.node,l.shape.node.parentNode.firstChild);l.redraw=function(){if(null!=this.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==E?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+
-(p.width+E)*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var u=!1;l.setPosition=function(b,d,f){E=Math.max(Graph.minTableColumnWidth-p.width,d.x-b.x-p.width);u=mxEvent.isShiftDown(f.getEvent());null==q||u||(E=Math.min(E,q.width-Graph.minTableColumnWidth))};l.execute=function(b){if(0!=E)d.setTableColumnWidth(this.state.cell,
-E,u);else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}E=0};l.positionChanged=function(){};l.reset=function(){E=0};b.push(l)})(f);for(f=0;f<l.length;f++)mxUtils.bind(this,function(f){f=l[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,k);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,f.shape.node.parentNode.firstChild);
+null==b&&(b=[]);var l=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<l.length){for(var k=f.getChildCells(l[0].cell,!0),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var l=d.view.getState(k[f]),m=d.getCellGeometry(k[f]),q=null!=m.alternateBounds?m.alternateBounds:m;null==l&&(l=new mxCellState(d.view,k[f],d.getCellStyle(k[f])),l.x=c.x+m.x*d.view.scale,l.y=c.y+m.y*d.view.scale,l.width=q.width*d.view.scale,l.height=q.height*d.view.scale,l.updateCachedBounds());var m=f<k.length-1?k[f+
+1]:null,m=null!=m?d.getCellGeometry(m):null,n=null!=m&&null!=m.alternateBounds?m.alternateBounds:m,m=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);m.isDashed=e.isDashed;m.svgStrokeTolerance++;l=new mxHandle(l,"col-resize",null,m);l.tableHandle=!0;var E=0;l.shape.node.parentNode.insertBefore(l.shape.node,l.shape.node.parentNode.firstChild);l.redraw=function(){if(null!=this.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==E?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+
+(q.width+E)*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var v=!1;l.setPosition=function(b,d,f){E=Math.max(Graph.minTableColumnWidth-q.width,d.x-b.x-q.width);v=mxEvent.isShiftDown(f.getEvent());null==n||v||(E=Math.min(E,n.width-Graph.minTableColumnWidth))};l.execute=function(b){if(0!=E)d.setTableColumnWidth(this.state.cell,
+E,v);else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}E=0};l.positionChanged=function(){};l.reset=function(){E=0};b.push(l)})(f);for(f=0;f<l.length;f++)mxUtils.bind(this,function(f){f=l[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,k);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,f.shape.node.parentNode.firstChild);
f.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:e.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())};f.setPosition=function(b,d,f){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};f.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(b.getEvent()));
else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}m=0};f.reset=function(){m=0};b.push(f)})(f)}}return null!=b?b.reverse():null};var E=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){E.apply(this,arguments);if(null!=this.moveHandles)for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].style.visibility=b?"":"hidden";if(null!=this.cornerHandles)for(d=0;d<this.cornerHandles.length;d++)this.cornerHandles[d].node.style.visibility=
b?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var b=this.graph.model;if(null!=this.moveHandles){for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].parentNode.removeChild(this.moveHandles[d]);this.moveHandles=null}this.moveHandles=[];for(d=0;d<b.getChildCount(this.state.cell);d++)mxUtils.bind(this,function(d){if(null!=d&&b.isVertex(d.cell)){var f=mxUtils.createImage(Editor.rowMoveImage);f.style.position="absolute";f.style.cursor="pointer";f.style.width="7px";f.style.height=
@@ -2650,7 +2651,7 @@ if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigat
b.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var I=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){I.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return mxEvent.isLeftMouseButton(d)&&
(this.useLeftButtonForPanning&&null==b.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(b){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(b.getEvent())&&mxEvent.isShiftDown(b.getEvent())&&mxEvent.isAltDown(b.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=
!0,this.reset())};mxRubberband.prototype.mouseUp=function(b,d){if(this.cancelled)this.cancelled=!1,d.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,c=null,e=null,g=null,l=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,e=this.first.y,g=(this.currentX-c)/this.graph.view.scale,l=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(g=this.graph.snap(g),l=this.graph.snap(l),this.graph.isGridEnabled()||(Math.abs(g)<this.graph.tolerance&&
-(g=0),Math.abs(l)<this.graph.tolerance&&(l=0))));this.reset();if(f){if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(var k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=this.graph.view.getState(k[f]),p=this.graph.getCellGeometry(k[f]);null!=m&&null!=p&&(p=p.clone(),p.translate(g,l),this.graph.model.setGeometry(k[f],p))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,
+(g=0),Math.abs(l)<this.graph.tolerance&&(l=0))));this.reset();if(f){if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(var k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=this.graph.view.getState(k[f]),q=this.graph.getCellGeometry(k[f]);null!=m&&null!=q&&(q=q.clone(),q.translate(g,l),this.graph.model.setGeometry(k[f],q))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,
this.height),this.graph.selectRegion(g,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);f.x-=c.x;f.y-=c.y;var c=d.getX()+f.x,f=d.getY()+f.y,e=this.first.x-c,g=this.first.y-f,l=this.graph.tolerance;if(null!=this.div||Math.abs(e)>l||Math.abs(g)>l)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,f),this.isSpaceEvent(d)?
(c=this.x+this.width,f=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=f-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=
@@ -2679,43 +2680,43 @@ d=this.cornerHandles,f=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].boun
function(){pa.apply(this,arguments);if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)null!=this.moveHandles[b]&&null!=this.moveHandles[b].parentNode&&this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}if(null!=this.cornerHandles){for(b=0;b<this.cornerHandles.length;b++)null!=this.cornerHandles[b]&&null!=this.cornerHandles[b].node&&null!=this.cornerHandles[b].node.parentNode&&this.cornerHandles[b].node.parentNode.removeChild(this.cornerHandles[b].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 aa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
function(){if(null!=this.marker&&(aa.apply(this),null!=this.state&&null!=this.linkHint)){var b=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(b=new mxRectangle(b.x,b.y,b.width,b.height),b.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b.y+b.height+Editor.hintOffset)+"px"}};var ja=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ja.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var P=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function m(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function p(){mxActor.call(this)}function q(){mxCylinder.call(this)}
-function v(){mxCylinder.call(this)}function u(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function D(){mxActor.call(this)}function C(){mxActor.call(this)}function G(){mxActor.call(this)}function J(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
+null!=this.linkHint&&(this.linkHint.style.visibility="")};var P=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function q(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function m(){mxActor.call(this)}function n(){mxCylinder.call(this)}
+function u(){mxCylinder.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function D(){mxActor.call(this)}function C(){mxActor.call(this)}function G(){mxActor.call(this)}function J(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
this.canvas.moveTo=mxUtils.bind(this,L.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,L.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,L.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,L.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,L.prototype.arcTo)}function H(){mxRectangleShape.call(this)}function K(){mxRectangleShape.call(this)}
function A(){mxActor.call(this)}function M(){mxActor.call(this)}function Q(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function O(){mxCylinder.call(this)}function ha(){mxShape.call(this)}function E(){mxShape.call(this)}function B(){mxEllipse.call(this)}function F(){mxShape.call(this)}function Z(){mxShape.call(this)}function I(){mxRectangleShape.call(this)}function ba(){mxShape.call(this)}function ca(){mxShape.call(this)}function da(){mxShape.call(this)}
function ka(){mxShape.call(this)}function ma(){mxShape.call(this)}function ia(){mxCylinder.call(this)}function W(){mxCylinder.call(this)}function na(){mxRectangleShape.call(this)}function V(){mxDoubleEllipse.call(this)}function R(){mxDoubleEllipse.call(this)}function ra(){mxArrowConnector.call(this);this.spacing=0}function S(){mxArrowConnector.call(this);this.spacing=0}function fa(){mxActor.call(this)}function ga(){mxRectangleShape.call(this)}function qa(){mxActor.call(this)}function U(){mxActor.call(this)}
function pa(){mxActor.call(this)}function aa(){mxActor.call(this)}function ja(){mxActor.call(this)}function P(){mxActor.call(this)}function X(){mxActor.call(this)}function ta(){mxActor.call(this)}function sa(){mxActor.call(this)}function la(){mxActor.call(this)}function Ba(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function Fa(){mxRhombus.call(this)}function Ja(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function Ia(){mxEllipse.call(this)}
-function za(){mxEllipse.call(this)}function wa(){mxActor.call(this)}function va(){mxActor.call(this)}function Ca(){mxActor.call(this)}function Y(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ga(){mxConnector.call(this)}function Ua(b,d,f,c,e,g,l,k,m,p){l+=m;var z=c.clone();c.x-=e*(2*l+m);c.y-=g*(2*l+m);e*=l+m;g*=l+m;return function(){b.ellipse(z.x-
-e-l,z.y-g-l,2*l,2*l);p?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,f,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-f));this.paintForeground(b,
+function za(){mxEllipse.call(this)}function wa(){mxActor.call(this)}function va(){mxActor.call(this)}function Ca(){mxActor.call(this)}function Y(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ga(){mxConnector.call(this)}function Ua(b,d,f,c,e,g,l,k,m,q){l+=m;var z=c.clone();c.x-=e*(2*l+m);c.y-=g*(2*l+m);e*=l+m;g*=l+m;return function(){b.ellipse(z.x-
+e-l,z.y-g-l,2*l,2*l);q?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,f,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-f));this.paintForeground(b,
d,f,c,e)};b.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.state){var z=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var l=z,z=g,g=l;b.rotate(-this.getShapeRotation(),z,g,d+c/2,f+e/2);s=this.scale;d=this.bounds.x/s;f=this.bounds.y/s;c=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(b,d,f,c,e)}};b.prototype.paintTableForeground=function(b,d,f,c,e){var z=this.state.view.graph,g=z.getActualStartSize(this.state.cell),
-l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),m="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),oa=z.getCellGeometry(l[0]),ua=[{y:null!=oa?oa.y+oa.height:0,cells:z.model.getChildCells(l[0],!0)}];if(k)for(k=1;k<l.length;k++){var oa=z.getCellGeometry(l[k]),p={y:0,cells:z.model.getChildCells(l[k],!0)};ua.push(p);null!=oa&&(p.y=oa.y+oa.height,b.begin(),b.moveTo(d+g.x,f+oa.y),b.lineTo(d+c-g.width,f+oa.y),b.end(),b.stroke())}if(m)for(c=
-z.model.getChildCells(l[0],!0),k=1;k<c.length;k++)if(oa=z.getCellGeometry(c[k]),null!=oa){b.begin();b.moveTo(d+oa.x+g.x,f+g.y);for(m=l=0;m<ua.length;m++)p=ua[m],null!=p&&(z.model.isVisible(p.cells[k])?l=p.y:(0<l&&b.lineTo(d+oa.x+g.x,f+l-g.height),b.moveTo(d+oa.x+g.x,f+p.y),l=0));b.lineTo(d+oa.x+g.x,f+e-g.height);b.end();b.stroke()}}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=
+l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),m="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),oa=z.getCellGeometry(l[0]),ua=[{y:null!=oa?oa.y+oa.height:0,cells:z.model.getChildCells(l[0],!0)}];if(k)for(k=1;k<l.length;k++){var oa=z.getCellGeometry(l[k]),q={y:0,cells:z.model.getChildCells(l[k],!0)};ua.push(q);null!=oa&&(q.y=oa.y+oa.height,b.begin(),b.moveTo(d+g.x,f+oa.y),b.lineTo(d+c-g.width,f+oa.y),b.end(),b.stroke())}if(m)for(c=
+z.model.getChildCells(l[0],!0),k=1;k<c.length;k++)if(oa=z.getCellGeometry(c[k]),null!=oa){b.begin();b.moveTo(d+oa.x+g.x,f+g.y);for(m=l=0;m<ua.length;m++)q=ua[m],null!=q&&(z.model.isVisible(q.cells[k])?l=q.y:(0<l&&b.lineTo(d+oa.x+g.x,f+l-g.height),b.moveTo(d+oa.x+g.x,f+q.y),l=0));b.lineTo(d+oa.x+g.x,f+e-g.height);b.end();b.stroke()}}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=
function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(z,e);b.lineTo(0,e-z);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),
0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(c-z,0),b.lineTo(c,z),b.lineTo(z,z),b.close(),b.fill()),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(z,z),b.lineTo(z,e),b.lineTo(0,e-z),b.close(),b.fill()),b.begin(),b.moveTo(z,e),b.lineTo(z,z),b.lineTo(0,0),b.moveTo(z,z),b.lineTo(c,z),b.end(),b.stroke())};c.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",c);var Qa=Math.tan(mxUtils.toRadians(30)),Ha=(.5-Qa)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(e,mxCylinder);e.prototype.size=6;e.prototype.paintVertexShape=function(b,d,f,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),
f+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/Qa);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ha);b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ha)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(g,mxCylinder);g.prototype.size=20;g.prototype.redrawPath=
-function(b,d,f,c,e,g){d=Math.min(c,e/(.5+Qa));g?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ha)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ha)*d),b.lineTo(.5*d,(1-Ha)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ha),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ha)*d),b.lineTo(0,.75*d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(b,d,f,c,e,g){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=
-this.fill||!g&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,-d);g||(b.moveTo(0,d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};n.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/
-8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,
+function(b,d,f,c,e,g){d=Math.min(c,e/(.5+Qa));g?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ha)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ha)*d),b.lineTo(.5*d,(1-Ha)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ha),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ha)*d),b.lineTo(0,.75*d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(p,mxCylinder);p.prototype.redrawPath=function(b,d,f,c,e,g){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=
+this.fill||!g&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,-d);g||(b.moveTo(0,d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};p.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/
+8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",p);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,
0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.close(),b.fill()),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.end(),b.stroke())};mxCellRenderer.registerShape("note",t);mxUtils.extend(d,t);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,
"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,z=Math.min(c*Math.tan(z),.5*e);b.translate(d,f);b.begin();b.moveTo(.5*c,0);b.lineTo(c,z);b.lineTo(c,e-z);b.lineTo(.5*c,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);
b.begin();b.moveTo(0,z);b.lineTo(.5*c,2*z);b.lineTo(c,z);b.moveTo(.5*c,2*z);b.lineTo(.5*c,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z),b.lineTo(c,e-z),b.arcTo(.5*c,
-z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):
-(b.begin(),g?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),g&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(p,mxActor);p.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/
-2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",p);mxUtils.extend(q,mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.arcSize=.1;q.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
+z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(q,mxCylinder);q.prototype.size=15;q.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):
+(b.begin(),g?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),g&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",q);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/
+2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.prototype.arcSize=.1;n.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),g=mxUtils.getValue(this.style,"rounded",!1),l=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));l||(k*=Math.min(c,e));k=Math.min(k,.5*c,.5*(e-f));d=Math.max(d,k);d=Math.min(c-k,d);g||(k=0);b.begin();"left"==z?(b.moveTo(Math.max(k,0),f),b.lineTo(Math.max(k,0),0),b.lineTo(d,0),b.lineTo(d,f)):(b.moveTo(c-d,f),b.lineTo(c-d,0),b.lineTo(c-Math.max(k,0),0),b.lineTo(c-Math.max(k,
-0),f));g?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",q);q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,
+0),f));g?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",n);n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==
-mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};mxUtils.extend(v,mxCylinder);v.prototype.arcSize=.1;v.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);var z=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=
+mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);var z=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=
parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f=mxUtils.getValue(this.style,"umlStateConnection",null);g||(d*=Math.min(c,e));d=Math.min(d,.5*c,.5*e);z||(d=0);z=0;null!=f&&(z=10);b.begin();b.moveTo(z,d);b.arcTo(d,d,0,0,1,z+d,0);b.lineTo(c-d,0);b.arcTo(d,d,0,0,1,c,d);b.lineTo(c,e-d);b.arcTo(d,d,0,0,1,c-d,e);b.lineTo(z+d,e);b.arcTo(d,d,0,0,1,z,e-d);b.close();b.fillAndStroke();b.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(b.roundrect(c-40,e-20,
-10,10,3,3),b.stroke(),b.roundrect(c-20,e-20,10,10,3,3),b.stroke(),b.begin(),b.moveTo(c-30,e-15),b.lineTo(c-20,e-15),b.stroke());"connPointRefEntry"==f?(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke()):"connPointRefExit"==f&&(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,.5*e-5),b.lineTo(15,.5*e+5),b.moveTo(15,.5*e-5),b.lineTo(5,.5*e+5),b.stroke())};v.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",
-null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",v);mxUtils.extend(u,mxActor);u.prototype.size=30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,
-d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};y.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,
+10,10,3,3),b.stroke(),b.roundrect(c-20,e-20,10,10,3,3),b.stroke(),b.begin(),b.moveTo(c-30,e-15),b.lineTo(c-20,e-15),b.stroke());"connPointRefEntry"==f?(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke()):"connPointRefExit"==f&&(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,.5*e-5),b.lineTo(15,.5*e+5),b.moveTo(15,.5*e-5),b.lineTo(5,.5*e+5),b.stroke())};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",
+null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",u);mxUtils.extend(v,mxActor);v.prototype.size=30;v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,
+d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("card",v);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};y.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),f=b.width,c=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(b.x,b.y+d,f,c-2*d);d*=f;return new mxRectangle(b.x+d,b.y,f-2*d,c)}return b};mxCellRenderer.registerShape("tape",y);mxUtils.extend(x,mxActor);x.prototype.size=.3;x.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,
0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};x.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,0);b.lineTo(c,0);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};mxCellRenderer.registerShape("document",x);var $a=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,d,f,c){var e=
-mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,b.height*d),0,0)}return null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,
-"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,
-"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};v.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
+mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,b.height*d),0,0)}return null};q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,
+"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,
+"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=
function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("parallelogram",D);mxUtils.extend(C,
mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,
@@ -2738,9 +2739,9 @@ A);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prot
"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("hexagon",Q);mxUtils.extend(T,mxRectangleShape);T.prototype.isHtmlAllowed=function(){return!1};T.prototype.paintForeground=function(b,d,f,c,e){var z=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+z);b.lineTo(d+c/2,
f+e-z);b.moveTo(d+z,f+e/2);b.lineTo(d+c-z,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",T);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=
function(b,d,f,c,e){Xa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var z=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&(b.setShadow(!1),Xa.apply(this,[b,d,f,c,e]))}};mxUtils.extend(N,mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;
-return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};N.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=g;f+=g;c-=2*g;e-=2*g;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var g=0,z;do{z=mxCellRenderer.defaultShapes[this.style["symbol"+g]];if(null!=z){var l=this.style["symbol"+g+"Align"],
-k=this.style["symbol"+g+"VerticalAlign"],m=this.style["symbol"+g+"Width"],p=this.style["symbol"+g+"Height"],q=this.style["symbol"+g+"Spacing"]||0,oa=this.style["symbol"+g+"VSpacing"]||q,E=this.style["symbol"+g+"ArcSpacing"];null!=E&&(E*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),q+=E,oa+=E);var E=d,ua=f,E=l==mxConstants.ALIGN_CENTER?E+(c-m)/2:l==mxConstants.ALIGN_RIGHT?E+(c-m-q):E+q,ua=k==mxConstants.ALIGN_MIDDLE?ua+(e-p)/2:k==mxConstants.ALIGN_BOTTOM?ua+(e-p-oa):ua+oa;b.save();l=new z;
-l.style=this.style;z.prototype.paintVertexShape.call(l,b,E,ua,m,p);b.restore()}g++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(O,mxCylinder);O.prototype.redrawPath=function(b,d,f,c,e,g){g?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",O);mxUtils.extend(ha,mxShape);ha.prototype.paintBackground=
+return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};N.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var z=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var z=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+z]];if(null!=g){var l=this.style["symbol"+z+"Align"],
+k=this.style["symbol"+z+"VerticalAlign"],m=this.style["symbol"+z+"Width"],q=this.style["symbol"+z+"Height"],n=this.style["symbol"+z+"Spacing"]||0,oa=this.style["symbol"+z+"VSpacing"]||n,E=this.style["symbol"+z+"ArcSpacing"];null!=E&&(E*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),n+=E,oa+=E);var E=d,ua=f,E=l==mxConstants.ALIGN_CENTER?E+(c-m)/2:l==mxConstants.ALIGN_RIGHT?E+(c-m-n):E+n,ua=k==mxConstants.ALIGN_MIDDLE?ua+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?ua+(e-q-oa):ua+oa;b.save();l=new g;
+l.style=this.style;g.prototype.paintVertexShape.call(l,b,E,ua,m,q);b.restore()}z++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(O,mxCylinder);O.prototype.redrawPath=function(b,d,f,c,e,g){g?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",O);mxUtils.extend(ha,mxShape);ha.prototype.paintBackground=
function(b,d,f,c,e){b.translate(d,f);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlActor",ha);mxUtils.extend(E,mxShape);E.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};E.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();
b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",E);mxUtils.extend(B,mxEllipse);B.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,f+e);b.lineTo(d+7*c/8,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",B);mxUtils.extend(F,mxShape);F.prototype.paintVertexShape=
function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",F);mxUtils.extend(Z,mxShape);Z.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};Z.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};Z.prototype.paintForeground=
@@ -2757,11 +2758,11 @@ d,f,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter
mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?C.prototype.fixedSize:C.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):
m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<l||f.x>l+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?M.prototype.fixedSize:M.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,
-"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,p=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,b),new mxPoint(l,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,
-g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,b),new mxPoint(l+k,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(p,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(p,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(p,z+
-e),new mxPoint(l+k,z),new mxPoint(l+k,z+m-e),new mxPoint(p,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]);p=new mxPoint(p,b);c&&(f.x<l||f.x>l+k?p.y=f.y:p.x=f.x);return mxUtils.getPerimeterPoint(z,p,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?Q.prototype.fixedSize:Q.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,
-m=b.height,p=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(p,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(p,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e),new mxPoint(p,z)]):(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
-e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]);p=new mxPoint(p,b);c&&(f.x<l||f.x>l+k?p.y=f.y:p.x=f.x);return mxUtils.getPerimeterPoint(z,p,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ca,mxShape);ca.prototype.size=10;ca.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-g)/2,0,g,g);
+"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,b),new mxPoint(l,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,
+g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,b),new mxPoint(l+k,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(q,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(q,z+
+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]);q=new mxPoint(q,b);c&&(f.x<l||f.x>l+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?Q.prototype.fixedSize:Q.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,
+m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e),new mxPoint(q,z)]):(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
+e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]);q=new mxPoint(q,b);c&&(f.x<l||f.x>l+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ca,mxShape);ca.prototype.size=10;ca.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-g)/2,0,g,g);
b.fillAndStroke();b.begin();b.moveTo(c/2,g);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",ca);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.inset=2;da.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.begin();b.moveTo(c/2,g+l);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-g)/2-l,g/2);b.quadTo((c-
g)/2-l,g+l,c/2,g+l);b.quadTo((c+g)/2+l,g+l,(c+g)/2+l,g/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",da);mxUtils.extend(ka,mxShape);ka.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",ka);mxUtils.extend(ma,mxShape);ma.prototype.inset=2;ma.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+
this.strokewidth;b.translate(d,f);b.ellipse(0,g,c-2*g,e-2*g);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ma);mxUtils.extend(ia,mxCylinder);ia.prototype.jettyWidth=20;ia.prototype.jettyHeight=10;ia.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));
@@ -2795,58 +2796,58 @@ dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Inde
type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},
{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",
type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",
-dispName:"Fold"}]}];Y.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};Y.prototype.strictDrawShape=function(b,d,f,c,e,g){var l=g&&g.rectStyle?g.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=g&&g.absoluteCornerSize?g.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=g&&g.size?g.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),p=g&&g.rectOutline?g.rectOutline:
-mxUtils.getValue(this.style,"rectOutline",this.rectOutline),q=g&&g.indent?g.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=g&&g.dashed?g.dashed:mxUtils.getValue(this.style,"dashed",!1),E=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),u=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,q)),n=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),v=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),B=g&&g.bottom?g.bottom:
+dispName:"Fold"}]}];Y.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};Y.prototype.strictDrawShape=function(b,d,f,c,e,g){var l=g&&g.rectStyle?g.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=g&&g.absoluteCornerSize?g.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=g&&g.size?g.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),q=g&&g.rectOutline?g.rectOutline:
+mxUtils.getValue(this.style,"rectOutline",this.rectOutline),n=g&&g.indent?g.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=g&&g.dashed?g.dashed:mxUtils.getValue(this.style,"dashed",!1),E=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),v=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,n)),u=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),p=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),B=g&&g.bottom?g.bottom:
mxUtils.getValue(this.style,"bottom",!0),F=g&&g.left?g.left:mxUtils.getValue(this.style,"left",!0),x=g&&g.topLeftStyle?g.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),t=g&&g.topRightStyle?g.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),I=g&&g.bottomRightStyle?g.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),y=g&&g.bottomLeftStyle?g.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),C=g&&g.fillColor?g.fillColor:
mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Z=g&&g.strokeWidth?g.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),A=g&&g.fillColor2?g.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),N=g&&g.gradientColor2?g.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),ua=g&&g.gradientDirection2?g.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),oa=g&&g.opacity?g.opacity:
-mxUtils.getValue(this.style,"opacity","100"),ca=Math.max(0,Math.min(50,m));g=Y.prototype;b.setDashed(z);E&&""!=E&&b.setDashPattern(E);b.setStrokeWidth(Z);m=Math.min(.5*e,.5*c,m);k||(m=ca*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(q=Math.min(u*Math.min(c,e)/100));q=Math.min(q,.5*Math.min(c,e)-m);(n||v||B||F)&&"frame"!=p&&(b.begin(),n?g.moveNW(b,d,f,c,e,l,x,m,F):b.moveTo(0,0),n&&g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),v&&g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,
-c,e,l,I,m,B),B&&g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),F&&g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(A),z=k=oa,"none"==A&&(k=0),"none"==N&&(z=0),b.setGradient(A,N,0,0,c,e,ua,k,z),b.begin(),n?g.moveNWInner(b,d,f,c,e,l,x,m,q,n,F):b.moveTo(q,0),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),F&&B&&g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),B&&v&&g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,
-d,f,c,e,l,t,m,q,n,v),v&&n&&g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),n&&F&&g.paintNWInner(b,d,f,c,e,l,x,m,q),b.fill(),"none"==C&&(b.begin(),g.paintFolds(b,d,f,c,e,l,x,t,I,y,m,n,v,B,F),b.stroke()));n||v||B||!F?n||v||!B||F?!n&&!v&&B&&F?"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),g.paintSWInner(b,
-d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.lineNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),b.close(),b.fillAndStroke()):n||!v||B||F?!n&&v&&!B&&F?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),"double"==
-p&&(g.moveNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F)),b.stroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.lineNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),b.close(),b.fillAndStroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,
-l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),b.close(),b.fillAndStroke()):!n&&v&&B&&!F?"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,
-d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),b.close(),b.fillAndStroke()):!n&&v&&B&&F?"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),"double"==p&&(g.moveNWInner(b,
-d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.lineNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),g.paintSWInner(b,
-d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),b.close(),b.fillAndStroke()):!n||v||B||F?n&&!v&&!B&&F?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F)),b.stroke()):
-(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.lineNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),b.close(),b.fillAndStroke()):n&&!v&&B&&!F?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n)),b.stroke(),b.begin(),
-g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.lineNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),b.close(),b.fillAndStroke(),b.begin(),g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),b.close(),b.fillAndStroke()):
-n&&!v&&B&&F?"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,I,
-m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.lineNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),b.close(),b.fillAndStroke()):n&&v&&!B&&!F?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,
-v),g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,
-c,e,l,x,m,q,F,n),b.close(),b.fillAndStroke()):n&&v&&!B&&F?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F)),b.stroke()):
-(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),b.close(),b.fillAndStroke()):n&&v&&B&&!F?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,
-F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,
-m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),b.close(),b.fillAndStroke()):n&&v&&B&&F&&("frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,m,
-n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),b.close(),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,F),g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,
-e,l,y,m,q,B,F),b.close()),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),b.close(),g.moveSWInner(b,d,f,c,e,l,y,m,q,F),g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,
-e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),b.close(),b.fillAndStroke())):"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.lineNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,
-e,l,x,m,q,F,n),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==p&&
-(g.moveSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,
-d,f,c,e,l,x,m,n),g.lineNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,c,e,l,x,t,I,y,m,n,v,B,F);b.stroke()};Y.prototype.moveNW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,0):b.moveTo(0,m)};Y.prototype.moveNE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(c,0):b.moveTo(c-m,0)};Y.prototype.moveSE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&
+mxUtils.getValue(this.style,"opacity","100"),ca=Math.max(0,Math.min(50,m));g=Y.prototype;b.setDashed(z);E&&""!=E&&b.setDashPattern(E);b.setStrokeWidth(Z);m=Math.min(.5*e,.5*c,m);k||(m=ca*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(n=Math.min(v*Math.min(c,e)/100));n=Math.min(n,.5*Math.min(c,e)-m);(u||p||B||F)&&"frame"!=q&&(b.begin(),u?g.moveNW(b,d,f,c,e,l,x,m,F):b.moveTo(0,0),u&&g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),p&&g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,
+c,e,l,I,m,B),B&&g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),F&&g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(A),z=k=oa,"none"==A&&(k=0),"none"==N&&(z=0),b.setGradient(A,N,0,0,c,e,ua,k,z),b.begin(),u?g.moveNWInner(b,d,f,c,e,l,x,m,n,u,F):b.moveTo(n,0),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),F&&B&&g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),B&&p&&g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,
+d,f,c,e,l,t,m,n,u,p),p&&u&&g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),u&&F&&g.paintNWInner(b,d,f,c,e,l,x,m,n),b.fill(),"none"==C&&(b.begin(),g.paintFolds(b,d,f,c,e,l,x,t,I,y,m,u,p,B,F),b.stroke()));u||p||B||!F?u||p||!B||F?!u&&!p&&B&&F?"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),g.paintSWInner(b,
+d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),b.close(),b.fillAndStroke()):u||!p||B||F?!u&&p&&!B&&F?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==
+q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F)),b.stroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),b.close(),b.fillAndStroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,
+l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),b.close(),b.fillAndStroke()):!u&&p&&B&&!F?"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,
+d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),b.close(),b.fillAndStroke()):!u&&p&&B&&F?"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==q&&(g.moveNWInner(b,
+d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),g.paintSWInner(b,
+d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),b.close(),b.fillAndStroke()):!u||p||B||F?u&&!p&&!B&&F?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F)),b.stroke()):
+(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.lineNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),b.close(),b.fillAndStroke()):u&&!p&&B&&!F?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u)),b.stroke(),b.begin(),
+g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.lineNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),b.close(),b.fillAndStroke(),b.begin(),g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),b.close(),b.fillAndStroke()):
+u&&!p&&B&&F?"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,I,
+m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.lineNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),b.close(),b.fillAndStroke()):u&&p&&!B&&!F?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,
+p),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,
+c,e,l,x,m,n,F,u),b.close(),b.fillAndStroke()):u&&p&&!B&&F?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F)),b.stroke()):
+(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),b.close(),b.fillAndStroke()):u&&p&&B&&!F?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,
+F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,
+m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),b.close(),b.fillAndStroke()):u&&p&&B&&F&&("frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,m,
+u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),b.close(),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,F),g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,
+e,l,y,m,n,B,F),b.close()),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),b.close(),g.moveSWInner(b,d,f,c,e,l,y,m,n,F),g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,
+e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.lineNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,
+e,l,x,m,n,F,u),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==q&&
+(g.moveSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,
+d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,c,e,l,x,t,I,y,m,u,p,B,F);b.stroke()};Y.prototype.moveNW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,0):b.moveTo(0,m)};Y.prototype.moveNE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(c,0):b.moveTo(c-m,0)};Y.prototype.moveSE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&
"square"==g||!k?b.moveTo(c,e):b.moveTo(c,e-m)};Y.prototype.moveSW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,e):b.moveTo(m,e)};Y.prototype.paintNW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(m,0);else b.lineTo(0,0)};Y.prototype.paintTop=
function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(c,0):b.lineTo(c-m,0)};Y.prototype.paintNE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c,m);else b.lineTo(c,0)};Y.prototype.paintRight=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==
l&&"square"==g||!k?b.lineTo(c,e):b.lineTo(c,e-m)};Y.prototype.paintLeft=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,0):b.lineTo(0,m)};Y.prototype.paintSE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-m,e);else b.lineTo(c,
e)};Y.prototype.paintBottom=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,e):b.lineTo(m,e)};Y.prototype.paintSW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(0,e-m);else b.lineTo(0,e)};Y.prototype.paintNWInner=function(b,d,f,
-c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,k,k+m);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(k,.5*k+m);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};Y.prototype.paintTopInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(0,k):q&&!p?b.lineTo(k,0):q?"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&
+c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,k,k+m);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(k,.5*k+m);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};Y.prototype.paintTopInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(0,k):n&&!q?b.lineTo(k,0):n?"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&
"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};Y.prototype.paintNEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-m-.5*k,k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};Y.prototype.paintRightInner=
-function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(c-k,0):q&&!p?b.lineTo(c,k):q?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};Y.prototype.paintLeftInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(k,e):q&&!p?b.lineTo(0,e-k):q?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
+function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(c-k,0):n&&!q?b.lineTo(c,k):n?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};Y.prototype.paintLeftInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(k,e):n&&!q?b.lineTo(0,e-k):n?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
l&&"snip"==g?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};Y.prototype.paintSEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-k,e-m-.5*k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};Y.prototype.paintBottomInner=function(b,d,f,c,
-e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(c,e-k):q&&!p?b.lineTo(c-k,e):"square"==l||"default"==l&&"square"==g||!q?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};Y.prototype.paintSWInner=function(b,d,f,c,e,g,l,m,k,q){if(!q)b.lineTo(k,e);else if("square"==l||"default"==l&&"square"==g)b.lineTo(k,e-k);else if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==
-l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(m+.5*k,e-k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};Y.prototype.moveSWInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.moveTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,
-e-m-k):b.moveTo(0,e-k)};Y.prototype.lineSWInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};Y.prototype.moveSEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.moveTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==
-g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,e-m-k):b.moveTo(c-k,e)};Y.prototype.lineSEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,e-m-k):b.lineTo(c-
-k,e)};Y.prototype.moveNEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g||q?b.moveTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};Y.prototype.lineNEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g||q?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
-l&&"snip"==g?b.lineTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};Y.prototype.moveNWInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.moveTo(k,0):q&&!p?b.moveTo(0,k):"square"==l||"default"==l&&"square"==g?b.moveTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,m+k):b.moveTo(0,
-0)};Y.prototype.lineNWInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(k,0):q&&!p?b.lineTo(0,k):"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,m+k):b.lineTo(0,0)};Y.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,q,p,E,n,u,v){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==q)("fold"==l||"default"==
-l&&"fold"==g)&&E&&v&&(b.moveTo(0,p),b.lineTo(p,p),b.lineTo(p,0)),("fold"==m||"default"==m&&"fold"==g)&&E&&n&&(b.moveTo(c-p,0),b.lineTo(c-p,p),b.lineTo(c,p)),("fold"==k||"default"==k&&"fold"==g)&&u&&n&&(b.moveTo(c-p,e),b.lineTo(c-p,e-p),b.lineTo(c,e-p)),("fold"==q||"default"==q&&"fold"==g)&&u&&v&&(b.moveTo(0,e-p),b.lineTo(p,e-p),b.lineTo(p,e))};mxCellRenderer.registerShape(Y.prototype.cst.RECT2,Y);Y.prototype.constraints=null;mxUtils.extend(Ga,mxConnector);Ga.prototype.origPaintEdgeShape=Ga.prototype.paintEdgeShape;
+e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(c,e-k):n&&!q?b.lineTo(c-k,e):"square"==l||"default"==l&&"square"==g||!n?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};Y.prototype.paintSWInner=function(b,d,f,c,e,g,l,m,k,n){if(!n)b.lineTo(k,e);else if("square"==l||"default"==l&&"square"==g)b.lineTo(k,e-k);else if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==
+l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(m+.5*k,e-k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};Y.prototype.moveSWInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.moveTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,
+e-m-k):b.moveTo(0,e-k)};Y.prototype.lineSWInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};Y.prototype.moveSEInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.moveTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==
+g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,e-m-k):b.moveTo(c-k,e)};Y.prototype.lineSEInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,e-m-k):b.lineTo(c-
+k,e)};Y.prototype.moveNEInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g||n?b.moveTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};Y.prototype.lineNEInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g||n?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
+l&&"snip"==g?b.lineTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};Y.prototype.moveNWInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.moveTo(k,0):n&&!q?b.moveTo(0,k):"square"==l||"default"==l&&"square"==g?b.moveTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,m+k):b.moveTo(0,
+0)};Y.prototype.lineNWInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(k,0):n&&!q?b.lineTo(0,k):"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,m+k):b.lineTo(0,0)};Y.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,n,q,E,u,p,v){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==n)("fold"==l||"default"==
+l&&"fold"==g)&&E&&v&&(b.moveTo(0,q),b.lineTo(q,q),b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==g)&&E&&u&&(b.moveTo(c-q,0),b.lineTo(c-q,q),b.lineTo(c,q)),("fold"==k||"default"==k&&"fold"==g)&&p&&u&&(b.moveTo(c-q,e),b.lineTo(c-q,e-q),b.lineTo(c,e-q)),("fold"==n||"default"==n&&"fold"==g)&&p&&v&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(Y.prototype.cst.RECT2,Y);Y.prototype.constraints=null;mxUtils.extend(Ga,mxConnector);Ga.prototype.origPaintEdgeShape=Ga.prototype.paintEdgeShape;
Ga.prototype.paintEdgeShape=function(b,d,f){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,g=b.state.fixDash;Ga.prototype.origPaintEdgeShape.apply(this,[b,c,f]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,g),Ga.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",Ga);"undefined"!==typeof StyleFormatPanel&&function(){var b=
-StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),E=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-p/2-E/2,c.y-E/2+p/2);b.lineTo(c.x+E/2-3*p/2,c.y-3*E/2-p/2);b.stroke()}});mxMarker.addMarker("box",
-function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),E=g*(l+k+1),n=c.x+p/2,z=c.y+E/2;c.x-=p;c.y-=E;return function(){b.begin();b.moveTo(n-p/2-E/2,z-E/2+p/2);b.lineTo(n-p/2+E/2,z-E/2-p/2);b.lineTo(n+E/2-3*p/2,z-3*E/2-p/2);b.lineTo(n-E/2-3*p/2,z-3*E/2+p/2);b.close();q?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),E=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-p/2-E/2,c.y-E/2+p/2);b.lineTo(c.x+E/2-3*p/2,c.y-3*E/2-p/2);b.moveTo(c.x-p/2+E/2,c.y-
-E/2-p/2);b.lineTo(c.x-E/2-3*p/2,c.y-3*E/2+p/2);b.stroke()}});mxMarker.addMarker("circle",Ua);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,g,l,m,k,q){var p=c.clone(),E=Ua.apply(this,arguments),n=e*(l+2*k),u=g*(l+2*k);return function(){E.apply(this,arguments);b.begin();b.moveTo(p.x-e*k,p.y-g*k);b.lineTo(p.x-2*n+e*k,p.y-2*u+g*k);b.moveTo(p.x-n-u+g*k,p.y-u+n-e*k);b.lineTo(p.x+u-n-g*k,p.y-u-n+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,m,k,p){var q=e*(l+k+1),E=g*(l+
-k+1),n=c.clone();c.x-=q;c.y-=E;return function(){b.begin();b.moveTo(n.x-E,n.y+q);b.quadTo(c.x-E,c.y+q,c.x,c.y);b.quadTo(c.x+E,c.y-q,n.x+E,n.y-q);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,g,l,m,k,q){d=e*k*1.118;f=g*k*1.118;e*=l+k;g*=l+k;var p=c.clone();p.x-=d;p.y-=f;c.x+=1*-e-d;c.y+=1*-g-f;return function(){b.begin();b.moveTo(p.x,p.y);m?b.lineTo(p.x-e-g/2,p.y-g+e/2):b.lineTo(p.x+g/2-e,p.y-g-e/2);b.lineTo(p.x-e,p.y-g);b.close();q?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",
-function(b){b=null!=b?b:2;return function(d,f,c,e,g,l,m,k,p,q){g*=m+p;l*=m+p;var E=e.clone();return function(){d.begin();d.moveTo(E.x,E.y);k?d.lineTo(E.x-g-l/b,E.y-l+g/b):d.lineTo(E.x+l/b-g,E.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return La(b,["width"],d,function(d,c,e,g,l){l=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(g.x+c*d/4+e*l/2,g.y+e*d/4-c*l/2)},function(d,c,e,g,l,m){d=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));b.style.width=
-Math.round(2*d)/b.view.scale-f})},La=function(b,d,f,c,e){return ea(b,d,function(d){var e=b.absolutePoints,g=e.length-1;d=b.view.translate;var l=b.view.scale,m=f?e[0]:e[g],e=f?e[1]:e[g-1],g=e.x-m.x,k=e.y-m.y,p=Math.sqrt(g*g+k*k),m=c.call(this,p,g/p,k/p,m,e);return new mxPoint(m.x/l-d.x,m.y/l-d.y)},function(d,c,g){var l=b.absolutePoints,m=l.length-1;d=b.view.translate;var k=b.view.scale,p=f?l[0]:l[m],l=f?l[1]:l[m-1],m=l.x-p.x,q=l.y-p.y,E=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,
-E,m/E,q/E,p,l,c,g)})},Da=function(b){return function(d){return[ea(d,["arrowWidth","arrowSize"],function(d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",aa.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",aa.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,
+StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,g,l,m,k,n){var q=e*(l+k+1),E=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-E/2,c.y-E/2+q/2);b.lineTo(c.x+E/2-3*q/2,c.y-3*E/2-q/2);b.stroke()}});mxMarker.addMarker("box",
+function(b,d,f,c,e,g,l,m,k,n){var q=e*(l+k+1),E=g*(l+k+1),u=c.x+q/2,z=c.y+E/2;c.x-=q;c.y-=E;return function(){b.begin();b.moveTo(u-q/2-E/2,z-E/2+q/2);b.lineTo(u-q/2+E/2,z-E/2-q/2);b.lineTo(u+E/2-3*q/2,z-3*E/2-q/2);b.lineTo(u-E/2-3*q/2,z-3*E/2+q/2);b.close();n?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,g,l,m,k,n){var q=e*(l+k+1),E=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-E/2,c.y-E/2+q/2);b.lineTo(c.x+E/2-3*q/2,c.y-3*E/2-q/2);b.moveTo(c.x-q/2+E/2,c.y-
+E/2-q/2);b.lineTo(c.x-E/2-3*q/2,c.y-3*E/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Ua);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,g,l,m,k,q){var n=c.clone(),E=Ua.apply(this,arguments),u=e*(l+2*k),p=g*(l+2*k);return function(){E.apply(this,arguments);b.begin();b.moveTo(n.x-e*k,n.y-g*k);b.lineTo(n.x-2*u+e*k,n.y-2*p+g*k);b.moveTo(n.x-u-p+g*k,n.y-p+u-e*k);b.lineTo(n.x+p-u-g*k,n.y-p-u+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,m,k,n){var q=e*(l+k+1),E=g*(l+
+k+1),u=c.clone();c.x-=q;c.y-=E;return function(){b.begin();b.moveTo(u.x-E,u.y+q);b.quadTo(c.x-E,c.y+q,c.x,c.y);b.quadTo(c.x+E,c.y-q,u.x+E,u.y-q);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,g,l,m,k,q){d=e*k*1.118;f=g*k*1.118;e*=l+k;g*=l+k;var n=c.clone();n.x-=d;n.y-=f;c.x+=1*-e-d;c.y+=1*-g-f;return function(){b.begin();b.moveTo(n.x,n.y);m?b.lineTo(n.x-e-g/2,n.y-g+e/2):b.lineTo(n.x+g/2-e,n.y-g-e/2);b.lineTo(n.x-e,n.y-g);b.close();q?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",
+function(b){b=null!=b?b:2;return function(d,f,c,e,g,l,m,k,n,q){g*=m+n;l*=m+n;var E=e.clone();return function(){d.begin();d.moveTo(E.x,E.y);k?d.lineTo(E.x-g-l/b,E.y-l+g/b):d.lineTo(E.x+l/b-g,E.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return La(b,["width"],d,function(d,c,e,g,l){l=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(g.x+c*d/4+e*l/2,g.y+e*d/4-c*l/2)},function(d,c,e,g,l,m){d=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));b.style.width=
+Math.round(2*d)/b.view.scale-f})},La=function(b,d,f,c,e){return ea(b,d,function(d){var e=b.absolutePoints,g=e.length-1;d=b.view.translate;var l=b.view.scale,m=f?e[0]:e[g],e=f?e[1]:e[g-1],g=e.x-m.x,k=e.y-m.y,n=Math.sqrt(g*g+k*k),m=c.call(this,n,g/n,k/n,m,e);return new mxPoint(m.x/l-d.x,m.y/l-d.y)},function(d,c,g){var l=b.absolutePoints,m=l.length-1;d=b.view.translate;var k=b.view.scale,n=f?l[0]:l[m],l=f?l[1]:l[m-1],m=l.x-n.x,q=l.y-n.y,E=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,
+E,m/E,q/E,n,l,c,g)})},Da=function(b){return function(d){return[ea(d,["arrowWidth","arrowSize"],function(d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",aa.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",aa.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,
Math.min(b,(d.x+d.width-f.x)/d.width))})]}},Za=function(b){return function(d){return[ea(d,["size"],function(d){var f=Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+f)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Ra=function(b,d,f){return function(c){var e=[ea(c,["size"],function(f){var c=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(f.x+
c,f.y+c)},function(d,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,f.x-d.x),Math.min(d.height,f.y-d.y)))/b)},!1)];f&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Aa(c));return e}},Ma=function(b,d,f,c,e){f=null!=f?f:.5;return function(g){var l=[ea(g,["size"],function(d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",f?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,
c*(f?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?d.x-b.x:Math.max(0,Math.min(f,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(Aa(g));return l}},Va=function(b,d,f){b=null!=b?b:.5;return function(c){var e=[ea(c,["size"],function(c){var e=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,g=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
@@ -2878,16 +2879,16 @@ f*b.width+c),b.y+b.height-d)},function(b,d){var f=Math.max(0,Math.min(1,mxUtils.
"dy",ga.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Aa(b));return d},module:function(b){return[ea(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",ia.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,
mxUtils.getValue(this.state.style,"jettyHeight",ia.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+2*f)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",qa.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
"dy",qa.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",pa.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",pa.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+f)},function(b,
-d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Da(1),doubleArrow:Da(.5),folder:function(b){return[ea(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Da(1),doubleArrow:Da(.5),folder:function(b){return[ea(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[ea(b,
-["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Za(l.prototype.size),cylinder3:Za(m.prototype.size),offPageConnector:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",la.prototype.size))));
+["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Za(l.prototype.size),cylinder3:Za(q.prototype.size),offPageConnector:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",la.prototype.size))));
return new mxPoint(b.getCenterX(),b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},"mxgraph.basic.rect":function(b){var d=[Graph.createHandle(b,["size"],function(b){var d=Math.max(0,Math.min(b.width/2,b.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(b.x+d,b.y+d)},function(b,d){this.state.style.size=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,d.x-b.x)))/100})];b=Graph.createHandle(b,
["indent"],function(b){var d=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Ma(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:Ma(Q.prototype.size,!0,.5,!0,Q.prototype.fixedSize),curlyBracket:Ma(G.prototype.size,!1),display:Ma(Ca.prototype.size,!1),cube:Ra(1,
-c.prototype.size,!1),card:Ra(.5,u.prototype.size,!0),loopLimit:Ra(.5,sa.prototype.size,!0),trapezoid:Va(.5,C.prototype.size,C.prototype.fixedSize),parallelogram:Va(1,D.prototype.size,D.prototype.fixedSize)};Graph.createHandle=ea;Graph.handleFactory=Na;var eb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=eb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&
+c.prototype.size,!1),card:Ra(.5,v.prototype.size,!0),loopLimit:Ra(.5,sa.prototype.size,!0),trapezoid:Va(.5,C.prototype.size,C.prototype.fixedSize),parallelogram:Va(1,D.prototype.size,D.prototype.fixedSize)};Graph.createHandle=ea;Graph.handleFactory=Na;var eb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=eb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&
null==mxStencilRegistry.getStencil(d)?d=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(d=mxConstants.SHAPE_SWIMLANE);d=Na[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Na[mxConstants.SHAPE_RECTANGLE]);null!=d&&(d=d(this.state),null!=d&&(b=null==b?d:b.concat(d)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);
b=Na[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Oa=new mxPoint(1,0),Pa=new mxPoint(1,0),Da=mxUtils.toRadians(-30),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Da),Math.sin(Da)),Da=mxUtils.toRadians(-150),Pa=mxUtils.getRotatedPoint(Pa,Math.cos(Da),Math.sin(Da));mxEdgeStyle.IsometricConnector=function(b,d,f,c,e){var g=b.view;c=null!=c&&0<c.length?c[0]:null;var l=b.absolutePoints,m=l[0],l=l[l.length-1];null!=c&&(c=g.transformControlPoint(b,c));null==
-m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==l&&null!=f&&(l=new mxPoint(f.getCenterX(),f.getCenterY()));var k=Oa.x,p=Oa.y,q=Pa.x,E=Pa.y,n="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=m){b=function(b,d,f){b-=u.x;var c=d-u.y;d=(E*b-q*c)/(k*E-p*q);b=(p*b-k*c)/(p*q-k*E);n?(f&&(u=new mxPoint(u.x+k*d,u.y+p*d),e.push(u)),u=new mxPoint(u.x+q*b,u.y+E*b)):(f&&(u=new mxPoint(u.x+q*b,u.y+E*b),e.push(u)),u=new mxPoint(u.x+k*d,u.y+p*d));e.push(u)};var u=m;null==
+m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==l&&null!=f&&(l=new mxPoint(f.getCenterX(),f.getCenterY()));var k=Oa.x,n=Oa.y,q=Pa.x,E=Pa.y,u="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=m){b=function(b,d,f){b-=p.x;var c=d-p.y;d=(E*b-q*c)/(k*E-n*q);b=(n*b-k*c)/(n*q-k*E);u?(f&&(p=new mxPoint(p.x+k*d,p.y+n*d),e.push(p)),p=new mxPoint(p.x+q*b,p.y+E*b)):(f&&(p=new mxPoint(p.x+q*b,p.y+E*b),e.push(p)),p=new mxPoint(p.x+k*d,p.y+n*d));e.push(p)};var p=m;null==
c&&(c=new mxPoint(m.x+(l.x-m.x)/2,m.y+(l.y-m.y)/2));b(c.x,c.y,!0);b(l.x,l.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,d){if(d==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(b);f.snapToTerminals=!1;return f}return fb.apply(this,arguments)};k.prototype.constraints=[];g.prototype.getConstraints=function(b,d,f){b=[];var c=Math.tan(mxUtils.toRadians(30)),e=(.5-
c)/2,c=Math.min(d,f/(.5+c));d=(d-c)/2;f=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+c*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.75*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+(1-e)*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.75*c));return b};f.prototype.getConstraints=
function(b,d,f){b=[];var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,c=Math.min(d*Math.tan(c),.5*f);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2898,12 +2899,12 @@ d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(
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))];Ia.prototype.constraints=mxRectangleShape.prototype.constraints;
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};u.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};v.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};c.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,
"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};m.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};q.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};q.prototype.getConstraints=
+0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};n.prototype.getConstraints=
function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2916,7 +2917,7 @@ xa.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraint
.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)];ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];p.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
@@ -2939,14 +2940,14 @@ function(b,d,f){b=[];var c=Math.min(f,d),e=Math.max(0,Math.min(c,c*parseFloat(mx
0),!1,null,0,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,c));return b};I.prototype.constraints=null;X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
.9),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ka.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(b){g.escape();b=g.deleteCells(g.getDeletableCells(g.getSelectionCells()),b);null!=b&&g.setSelectionCells(b)}function c(){if(!g.isSelectionEmpty()){g.getModel().beginUpdate();try{for(var b=g.getSelectionCells(),d=0;d<b.length;d++)g.cellLabelChanged(b[d],"")}finally{g.getModel().endUpdate()}}}var e=this.editorUi,k=e.editor,g=k.graph,n=function(){return Action.prototype.isEnabled.apply(this,arguments)&&g.isEnabled()};this.addAction("new...",function(){g.openLink(e.getUrl())});
+Actions.prototype.init=function(){function b(b){g.escape();b=g.deleteCells(g.getDeletableCells(g.getSelectionCells()),b);null!=b&&g.setSelectionCells(b)}function c(){if(!g.isSelectionEmpty()){g.getModel().beginUpdate();try{for(var b=g.getSelectionCells(),d=0;d<b.length;d++)g.cellLabelChanged(b[d],"")}finally{g.getModel().endUpdate()}}}var e=this.editorUi,k=e.editor,g=k.graph,p=function(){return Action.prototype.isEnabled.apply(this,arguments)&&g.isEnabled()};this.addAction("new...",function(){g.openLink(e.getUrl())});
this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});this.addAction("smartFit",function(){g.popupMenuHandler.hideMenu();var b=g.view.scale,d=g.view.translate.x,c=g.view.translate.y;e.actions.get("resetView").funct();1E-5>Math.abs(b-g.view.scale)&&d==g.view.translate.x&&c==g.view.translate.y&&e.actions.get(g.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){g.isEnabled()&&(g.isSelectionEmpty()?e.actions.get("smartFit").funct():
-g.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var f=mxUtils.parseXml(b);k.graph.setSelectionCells(k.graph.importGraphModel(f.documentElement))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+p.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
-null})}).isEnabled=n;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=n;this.addAction("saveAs...",function(){e.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=n;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(e);e.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,
-320,240,!0,!0)}).isEnabled=n;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(g,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var b=null;try{b=e.copyXml(),
+g.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var f=mxUtils.parseXml(b);k.graph.setSelectionCells(k.graph.importGraphModel(f.documentElement))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
+null})}).isEnabled=p;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=p;this.addAction("saveAs...",function(){e.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=p;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(e);e.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,
+320,240,!0,!0)}).isEnabled=p;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(g,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var b=null;try{b=e.copyXml(),
null!=b&&g.removeCells(b,!1)}catch(l){}null==b&&mxClipboard.cut(g)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(f){}try{mxClipboard.copy(g)}catch(f){e.handleError(f)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{e.pasteXml(b,!0)}finally{g.getModel().endUpdate()}}else mxClipboard.paste(g)}),
b=!0)}catch(l){}b||mxClipboard.paste(g)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(b){function d(b){if(null!=b){for(var d=!0,f=0;f<b.length&&d;f++)d=d&&g.model.isEdge(b[f]);var c=g.view.translate,f=g.view.scale,e=c.x,l=c.y,c=null;if(1==b.length&&d){var m=g.getCellGeometry(b[0]);null!=m&&(c=m.getTerminalPoint(!0))}c=null!=c?c:g.getBoundingBoxFromGeometry(b,d);null!=c&&(d=Math.round(g.snap(g.popupMenuHandler.triggerX/f-e)),f=Math.round(g.snap(g.popupMenuHandler.triggerY/
-f-l)),g.cellsMoved(b,d-c.x,f-c.y))}}function f(){g.getModel().beginUpdate();try{d(mxClipboard.paste(g))}finally{g.getModel().endUpdate()}}if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{d(e.pasteXml(b,!0))}finally{g.getModel().endUpdate()}}else f()}),b=!0)}catch(p){}b||f()}});this.addAction("copySize",function(){var b=g.getSelectionCell();g.isEnabled()&&null!=b&&g.getModel().isVertex(b)&&
+f-l)),g.cellsMoved(b,d-c.x,f-c.y))}}function f(){g.getModel().beginUpdate();try{d(mxClipboard.paste(g))}finally{g.getModel().endUpdate()}}if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{d(e.pasteXml(b,!0))}finally{g.getModel().endUpdate()}}else f()}),b=!0)}catch(m){}b||f()}});this.addAction("copySize",function(){var b=g.getSelectionCell();g.isEnabled()&&null!=b&&g.getModel().isVertex(b)&&
(b=g.getCellGeometry(b),null!=b&&(e.copiedSize=new mxRectangle(b.x,b.y,b.width,b.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=e.copiedSize){g.getModel().beginUpdate();try{for(var b=g.getResizableCells(g.getSelectionCells()),d=0;d<b.length;d++)if(g.getModel().isVertex(b[d])){var c=g.getCellGeometry(b[d]);null!=c&&(c=c.clone(),c.width=e.copiedSize.width,c.height=e.copiedSize.height,g.getModel().setGeometry(b[d],c))}}finally{g.getModel().endUpdate()}}},
null,null,"Alt+Shift+V");this.addAction("copyData",function(){var b=g.getSelectionCell()||g.getModel().getRoot();g.isEnabled()&&null!=b&&(b=b.cloneValue(),null==b||isNaN(b.nodeType)||(e.copiedValue=b))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(b,d){function f(d,f){var e=c.getValue(d);f=d.cloneValue(f);f.removeAttribute("placeholders");null==e||isNaN(e.nodeType)||f.setAttribute("placeholders",e.getAttribute("placeholders"));null!=b&&mxEvent.isShiftDown(b)||f.setAttribute("label",
g.convertValueToString(d));c.setValue(d,f)}b=null!=d?d:b;var c=g.getModel();if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=e.copiedValue){c.beginUpdate();try{var l=g.getEditableCells(g.getSelectionCells());if(0==l.length)f(c.getRoot(),e.copiedValue);else for(var k=0;k<l.length;k++)f(l[k],e.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,e){d=null!=e?e:d;null!=d&&mxEvent.isShiftDown(d)?c():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||
@@ -2959,13 +2960,13 @@ g.isTableRow(b[0])?(b=g.getCellsForGroup(b),1<b.length&&g.setSelectionCell(g.gro
d.length&&g.setSelectionCells(d)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(g.isEnabled()){var b=g.getSelectionCells();if(null!=b){for(var d=[],c=0;c<b.length;c++)g.isTableRow(b[c])||g.isTableCell(b[c])||d.push(b[c]);g.removeCellsFromParent(d)}}});this.addAction("edit",function(){g.isEnabled()&&g.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var b=g.getSelectionCell()||g.getModel().getRoot();e.showDataDialog(b)},null,
null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var b=g.getSelectionCell();if(g.isEnabled()&&null!=b&&g.isCellEditable(b)){var d="";if(mxUtils.isNode(b.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&b.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==c&&(c=b.value.getAttribute("tooltip"));null!=c&&(d=c)}d=new TextareaDialog(e,mxResources.get("editTooltip")+":",d,function(d){g.setTooltipForCell(b,
d)});e.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var b=g.getLinkForCell(g.getSelectionCell());null!=b&&g.openLink(b)});this.addAction("editLink...",function(){var b=g.getSelectionCell();if(g.isEnabled()&&null!=b&&g.isCellEditable(b)){var d=g.getLinkForCell(b)||"";e.showLinkDialog(d,mxResources.get("apply"),function(d,c,f){d=mxUtils.trim(d);g.setLinkForCell(b,0<d.length?d:null);g.setAttributeForCell(b,"linkTarget",f)},!0,g.getLinkTargetForCell(b))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(g.clearSelection(),e.actions.get("image").funct())})).isEnabled=n;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(b,d,c){b=mxUtils.trim(b);if(0<b.length){var f=null,e=g.getLinkTitle(b);null!=d&&0<d.length&&(f=d[0].iconUrl,
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(g.clearSelection(),e.actions.get("image").funct())})).isEnabled=p;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(b,d,c){b=mxUtils.trim(b);if(0<b.length){var f=null,e=g.getLinkTitle(b);null!=d&&0<d.length&&(f=d[0].iconUrl,
e=d[0].name||d[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&(e=e.substring(0,30)+"..."));d=new mxCell(e,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));d.vertex=!0;f=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([d],!0));d.geometry.x=f.x;d.geometry.y=f.y;g.setAttributeForCell(d,"linkTarget",c);g.setLinkForCell(d,b);g.cellSizeUpdated(d,
-!0);g.getModel().beginUpdate();try{d=g.addCell(d),g.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{g.getModel().endUpdate()}g.setSelectionCell(d);g.scrollCellToVisible(g.getSelectionCell())}},!0)})).isEnabled=n;this.addAction("link...",mxUtils.bind(this,function(){if(g.isEnabled())if(g.cellEditor.isContentEditing()){var b=g.getSelectedElement(),d=g.getParentByName(b,"A",g.cellEditor.textarea),c="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var k=b.getElementsByTagName("a"),
-q=0;q<k.length&&null==d;q++)k[q].textContent==b.textContent&&(d=k[q]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",g.selectNode(d));var n=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(n);null!=b&&g.insertLink(b)}))}else g.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=n;this.addAction("autosize",function(){var b=g.getSelectionCells();if(null!=b){g.getModel().beginUpdate();
-try{for(var d=0;d<b.length;d++){var c=b[d];0<g.getModel().getChildCount(c)?g.updateGroupBounds([c],0,!0):g.updateCellSize(c)}}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){g.stopEditing();var b=g.getCommonStyle(g.getSelectionCells()),b="1"==mxUtils.getValue(b,"html","0")?null:"1";g.getModel().beginUpdate();try{for(var d=g.getEditableCells(g.getSelectionCells()),c=0;c<d.length;c++)if(state=g.getView().getState(d[c]),null!=state){var k=
-mxUtils.getValue(state.style,"html","0");if("1"==k&&null==b){var q=g.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(q=q.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var n=document.createElement("div");n.innerHTML=g.sanitizeHtml(q);q=mxUtils.extractTextWithWhitespace(n.childNodes);g.cellLabelChanged(state.cell,q);g.setCellStyles("html",b,[d[c]])}else"0"==k&&"1"==b&&(q=mxUtils.htmlEntities(g.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
-"1")&&(q=q.replace(/\n/g,"<br/>")),g.cellLabelChanged(state.cell,g.sanitizeHtml(q)),g.setCellStyles("html",b,[d[c]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=b?b:"0"],"cells",d))}finally{g.getModel().endUpdate()}});this.addAction("wordWrap",function(){var b=g.getView().getState(g.getSelectionCell()),d="wrap";g.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);g.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",
+!0);g.getModel().beginUpdate();try{d=g.addCell(d),g.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{g.getModel().endUpdate()}g.setSelectionCell(d);g.scrollCellToVisible(g.getSelectionCell())}},!0)})).isEnabled=p;this.addAction("link...",mxUtils.bind(this,function(){if(g.isEnabled())if(g.cellEditor.isContentEditing()){var b=g.getSelectedElement(),d=g.getParentByName(b,"A",g.cellEditor.textarea),c="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var m=b.getElementsByTagName("a"),
+k=0;k<m.length&&null==d;k++)m[k].textContent==b.textContent&&(d=m[k]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",g.selectNode(d));var p=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(p);null!=b&&g.insertLink(b)}))}else g.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=p;this.addAction("autosize",function(){var b=g.getSelectionCells();if(null!=b){g.getModel().beginUpdate();
+try{for(var d=0;d<b.length;d++){var c=b[d];0<g.getModel().getChildCount(c)?g.updateGroupBounds([c],0,!0):g.updateCellSize(c)}}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){g.stopEditing();var b=g.getCommonStyle(g.getSelectionCells()),b="1"==mxUtils.getValue(b,"html","0")?null:"1";g.getModel().beginUpdate();try{for(var d=g.getEditableCells(g.getSelectionCells()),c=0;c<d.length;c++)if(state=g.getView().getState(d[c]),null!=state){var m=
+mxUtils.getValue(state.style,"html","0");if("1"==m&&null==b){var k=g.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(k=k.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var p=document.createElement("div");p.innerHTML=g.sanitizeHtml(k);k=mxUtils.extractTextWithWhitespace(p.childNodes);g.cellLabelChanged(state.cell,k);g.setCellStyles("html",b,[d[c]])}else"0"==m&&"1"==b&&(k=mxUtils.htmlEntities(g.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
+"1")&&(k=k.replace(/\n/g,"<br/>")),g.cellLabelChanged(state.cell,g.sanitizeHtml(k)),g.setCellStyles("html",b,[d[c]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=b?b:"0"],"cells",d))}finally{g.getModel().endUpdate()}});this.addAction("wordWrap",function(){var b=g.getView().getState(g.getSelectionCell()),d="wrap";g.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);g.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",
function(){var b="0",d=g.getView().getState(g.getSelectionCell());null!=d&&(b=d.style[mxConstants.STYLE_ROTATION]||b);b=new FilenameDialog(e,b,mxResources.get("apply"),function(b){null!=b&&0<b.length&&g.setCellStyles(mxConstants.STYLE_ROTATION,b)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(b.container,375,80,!0,!0);b.init()});this.addAction("resetView",function(){g.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(b){g.isFastZoomEnabled()?
g.lazyZoom(!0,!0,e.buttonZoomDelay):g.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(b){g.isFastZoomEnabled()?g.lazyZoom(!1,!0,e.buttonZoomDelay):g.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var b=g.isSelectionEmpty()?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells()),d=g.view.translate,c=g.view.scale;b.x=b.x/c-d.x;b.y=b.y/c-d.y;b.width/=c;b.height/=c;null!=g.backgroundImage&&
b.add(new mxRectangle(0,0,g.backgroundImage.width,g.backgroundImage.height));0==b.width||0==b.height?(g.zoomTo(1),e.resetScrollbars()):(d=Editor.fitWindowBorders,null!=d&&(b.x-=d.x,b.y-=d.y,b.width+=d.width+d.x,b.height+=d.height+d.y),g.fitWindow(b))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){g.pageVisible||this.get("pageView").funct();var b=g.pageFormat,d=g.pageScale;g.zoomTo(Math.floor(20*Math.min((g.container.clientWidth-10)/b.width/d,(g.container.clientHeight-
@@ -2974,10 +2975,10 @@ d))/20);mxUtils.hasScrollbars(g.container)&&(b=g.getPagePadding(),g.container.sc
g.getPagePadding();g.container.scrollLeft=Math.min(b.x*g.view.scale,(g.container.scrollWidth-g.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.editorUi,parseInt(100*g.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(b){b=parseInt(b);!isNaN(b)&&0<b&&g.zoomTo(b/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(b.container,300,80,!0,!0);b.init()}),null,null,
Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.editorUi,parseInt(100*g.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(b){b=parseInt(b);!isNaN(b)&&0<b&&(b=new ChangePageSetup(e,null,null,null,b/100),b.ignoreColor=!0,b.ignoreImage=!0,g.model.execute(b))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(b.container,300,80,!0,!0);b.init()}));var t=null,t=this.addAction("grid",function(){g.setGridEnabled(!g.isGridEnabled());
e.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");t.setToggleAction(!0);t.setSelectedCallback(function(){return g.isGridEnabled()});t.setEnabled(!1);t=this.addAction("guides",function(){g.graphHandler.guidesEnabled=!g.graphHandler.guidesEnabled;e.fireEvent(new mxEventObject("guidesEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.graphHandler.guidesEnabled});t.setEnabled(!1);t=this.addAction("tooltips",function(){g.tooltipHandler.setEnabled(!g.tooltipHandler.isEnabled());
-e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.tooltipHandler.isEnabled()});t=this.addAction("collapseExpand",function(){var b=new ChangePageSetup(e);b.ignoreColor=!0;b.ignoreImage=!0;b.foldingEnabled=!g.foldingEnabled;g.model.execute(b)});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.foldingEnabled});t.isEnabled=n;t=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});t.setToggleAction(!0);
+e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.tooltipHandler.isEnabled()});t=this.addAction("collapseExpand",function(){var b=new ChangePageSetup(e);b.ignoreColor=!0;b.ignoreImage=!0;b.foldingEnabled=!g.foldingEnabled;g.model.execute(b)});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.foldingEnabled});t.isEnabled=p;t=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});t.setToggleAction(!0);
t.setSelectedCallback(function(){return g.scrollbars});t=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!g.pageVisible)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return g.pageVisible});t=this.addAction("connectionArrows",function(){g.connectionArrowsEnabled=!g.connectionArrowsEnabled;e.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");t.setToggleAction(!0);t.setSelectedCallback(function(){return g.connectionArrowsEnabled});t=
this.addAction("connectionPoints",function(){g.setConnectable(!g.connectionHandler.isEnabled());e.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");t.setToggleAction(!0);t.setSelectedCallback(function(){return g.connectionHandler.isEnabled()});t=this.addAction("copyConnect",function(){g.connectionHandler.setCreateTarget(!g.connectionHandler.isCreateTarget());e.fireEvent(new mxEventObject("copyConnectChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.connectionHandler.isCreateTarget()});
-t.isEnabled=n;t=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});t.setToggleAction(!0);t.setSelectedCallback(function(){return e.editor.autosave});t.isEnabled=n;t.visible=!1;this.addAction("help",function(){var b="";mxResources.isLanguageSupported(mxClient.language)&&(b="_"+mxClient.language);g.openLink(RESOURCES_PATH+"/help"+b+".html")});var d=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){d||(e.showDialog((new AboutDialog(e)).container,
+t.isEnabled=p;t=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});t.setToggleAction(!0);t.setSelectedCallback(function(){return e.editor.autosave});t.isEnabled=p;t.visible=!1;this.addAction("help",function(){var b="";mxResources.isLanguageSupported(mxClient.language)&&(b="_"+mxClient.language);g.openLink(RESOURCES_PATH+"/help"+b+".html")});var d=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){d||(e.showDialog((new AboutDialog(e)).container,
320,280,!0,!0,function(){d=!1}),d=!0)}));t=mxUtils.bind(this,function(b,d,c,e){return this.addAction(b,function(){if(null!=c&&g.cellEditor.isContentEditing())c();else{g.stopEditing(!1);g.getModel().beginUpdate();try{var b=g.getEditableCells(g.getSelectionCells());g.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,d,b);(d&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?g.updateLabelElements(b,function(b){b.style.fontWeight=null;"B"==b.nodeName&&g.replaceElement(b)}):(d&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
g.updateLabelElements(b,function(b){b.style.fontStyle=null;"I"==b.nodeName&&g.replaceElement(b)}):(d&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&g.updateLabelElements(b,function(b){b.style.textDecoration=null;"U"==b.nodeName&&g.replaceElement(b)});for(var f=0;f<b.length;f++)0==g.model.getChildCount(b[f])&&g.autoSizeCell(b[f],!1)}finally{g.getModel().endUpdate()}}},null,null,e)});t("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");t("italic",
mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");t("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){e.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){e.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){e.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});
@@ -2989,41 +2990,41 @@ g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("shar
c);g.setCellStyles(mxConstants.STYLE_CURVED,null);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}}});this.addAction("curved",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),g.setCellStyles(mxConstants.STYLE_CURVED,"1"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
"values",["0","1"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("collapsible",function(){var b=g.view.getState(g.getSelectionCell()),d="1";null!=b&&null!=g.getFoldingImage(b)&&(d="0");g.setCellStyles("collapsible",d);e.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[d],"cells",g.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var b=g.getEditableCells(g.getSelectionCells());if(null!=b&&0<b.length){var d=
g.getModel(),d=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",d.getStyle(b[0])||"",function(d){null!=d&&g.setCellStyle(mxUtils.trim(d),b)},null,null,400,220);this.editorUi.showDialog(d.container,420,300,!0,!0);d.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&e.setDefaultStyle(g.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){g.isEnabled()&&e.clearDefaultStyle()},
-null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var b=g.getSelectionCell();if(null!=b&&g.getModel().isEdge(b)){var d=k.graph.selectionCellsHandler.getHandler(b);if(d instanceof mxEdgeHandler){for(var c=g.view.translate,e=g.view.scale,q=c.x,c=c.y,b=g.getModel().getParent(b),n=g.getCellGeometry(b);g.getModel().isVertex(b)&&null!=n;)q+=n.x,c+=n.y,b=g.getModel().getParent(b),n=g.getCellGeometry(b);q=Math.round(g.snap(g.popupMenuHandler.triggerX/e-q));e=Math.round(g.snap(g.popupMenuHandler.triggerY/
-e-c));d.addPointAt(d.state,q,e)}}});this.addAction("removeWaypoint",function(){var b=e.actions.get("removeWaypoint");null!=b.handler&&b.handler.removePoint(b.handler.state,b.index)});this.addAction("clearWaypoints",function(b,d){b=null!=d?d:b;var c=g.getSelectionCells();if(null!=c){c=g.getEditableCells(g.addAllEdges(c));g.getModel().beginUpdate();try{for(var f=0;f<c.length;f++){var e=c[f];if(g.getModel().isEdge(e)){var l=g.getCellGeometry(e);mxEvent.isShiftDown(b)?(g.setCellStyles(mxConstants.STYLE_EXIT_X,
+null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var b=g.getSelectionCell();if(null!=b&&g.getModel().isEdge(b)){var d=k.graph.selectionCellsHandler.getHandler(b);if(d instanceof mxEdgeHandler){for(var c=g.view.translate,e=g.view.scale,n=c.x,c=c.y,b=g.getModel().getParent(b),p=g.getCellGeometry(b);g.getModel().isVertex(b)&&null!=p;)n+=p.x,c+=p.y,b=g.getModel().getParent(b),p=g.getCellGeometry(b);n=Math.round(g.snap(g.popupMenuHandler.triggerX/e-n));e=Math.round(g.snap(g.popupMenuHandler.triggerY/
+e-c));d.addPointAt(d.state,n,e)}}});this.addAction("removeWaypoint",function(){var b=e.actions.get("removeWaypoint");null!=b.handler&&b.handler.removePoint(b.handler.state,b.index)});this.addAction("clearWaypoints",function(b,d){b=null!=d?d:b;var c=g.getSelectionCells();if(null!=c){c=g.getEditableCells(g.addAllEdges(c));g.getModel().beginUpdate();try{for(var f=0;f<c.length;f++){var e=c[f];if(g.getModel().isEdge(e)){var l=g.getCellGeometry(e);mxEvent.isShiftDown(b)?(g.setCellStyles(mxConstants.STYLE_EXIT_X,
null,[e]),g.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[e]),g.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[e]),g.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[e])):null!=l&&(l=l.clone(),l.points=null,l.x=0,l.y=0,l.offset=null,g.getModel().setGeometry(e,l))}}}finally{g.getModel().endUpdate()}}},null,null,"Alt+Shift+C");t=this.addAction("subscript",mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");t=this.addAction("superscript",
-mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=g.getView().getState(g.getSelectionCell()),c="";null!=d&&(c=d.style[mxConstants.STYLE_IMAGE]||c);var k=g.cellEditor.saveSelection();e.showImageDialog(b,c,function(b,d,c){if(g.cellEditor.isContentEditing())g.cellEditor.restoreSelection(k),
+mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=g.getView().getState(g.getSelectionCell()),c="";null!=d&&(c=d.style[mxConstants.STYLE_IMAGE]||c);var m=g.cellEditor.saveSelection();e.showImageDialog(b,c,function(b,d,c){if(g.cellEditor.isContentEditing())g.cellEditor.restoreSelection(m),
g.insertImage(b,d,c);else{var f=g.getSelectionCells();if(null!=b&&(0<b.length||0<f.length)){var e=null;g.getModel().beginUpdate();try{if(0==f.length){var f=[g.insertVertex(g.getDefaultParent(),null,"",0,0,d,c,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],l=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry(f,!0));f[0].geometry.x=l.x;f[0].geometry.y=l.y;e=f;g.fireEvent(new mxEventObject("cellsInserted","cells",e))}g.setCellStyles(mxConstants.STYLE_IMAGE,
-0<b.length?b:null,f);var m=g.getCurrentCellStyle(f[0]);"image"!=m[mxConstants.STYLE_SHAPE]&&"label"!=m[mxConstants.STYLE_SHAPE]?g.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==b.length&&g.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==g.getSelectionCount()&&null!=d&&null!=c){var p=f[0],q=g.getModel().getGeometry(p);null!=q&&(q=q.clone(),q.width=d,q.height=c,g.getModel().setGeometry(p,q))}}finally{g.getModel().endUpdate()}null!=e&&(g.setSelectionCells(e),g.scrollCellToVisible(e[0]))}}},
-g.cellEditor.isContentEditing(),!g.cellEditor.isContentEditing())}}).isEnabled=n;t=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),
+0<b.length?b:null,f);var k=g.getCurrentCellStyle(f[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?g.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==b.length&&g.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==g.getSelectionCount()&&null!=d&&null!=c){var n=f[0],q=g.getModel().getGeometry(n);null!=q&&(q=q.clone(),q.width=d,q.height=c,g.getModel().setGeometry(n,q))}}finally{g.getModel().endUpdate()}null!=e&&(g.setSelectionCells(e),g.scrollCellToVisible(e[0]))}}},
+g.cellEditor.isContentEditing(),!g.cellEditor.isContentEditing())}}).isEnabled=p;t=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),
this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));t=this.addAction("formatPanel",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));
t=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
-null,null,Editor.ctrlKey+"+Shift+O");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(b,c,e,k,g){var n;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),n=mxResources.get(b)+"..."):n=mxResources.get(b);return this.put(b,new Action(n,c,e,k,g))};Actions.prototype.put=function(b,c){return this.actions[b]=c};Actions.prototype.get=function(b){return this.actions[b]};
+null,null,Editor.ctrlKey+"+Shift+O");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(b,c,e,k,g){var p;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),p=mxResources.get(b)+"..."):p=mxResources.get(b);return this.put(b,new Action(p,c,e,k,g))};Actions.prototype.put=function(b,c){return this.actions[b]=c};Actions.prototype.get=function(b){return this.actions[b]};
function Action(b,c,e,k,g){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(c);this.enabled=null!=e?e:!0;this.iconCls=k;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,c){mxEventSource.call(this);this.ui=b;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.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;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(b,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(b,c):this.updateFile(b,c)};
-DrawioFile.prototype.updateFile=function(b,c,e,k){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,b,c,k):this.reloadFile(b,c))}catch(n){null!=c&&c(n)}}),c))};
-DrawioFile.prototype.mergeFile=function(b,c,e,k){var g=!0;try{this.stats.fileMerged++;var n=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(n,this.ui.pages):null;var d=[this.ui.diffPages(null!=k?k:n,this.shadowPages)];if(!this.ignorePatches(d)){var f=this.ui.patchPages(n,
-d[0]);k={};var l=this.ui.getHashValueForPages(f,k),n={},m=this.ui.getHashValueForPages(this.shadowPages,n);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",m==l,l);if(null!=l&&l!=m){var p=this.compressReportData(this.getAnonymizedXmlForPages(t)),q=this.compressReportData(this.getAnonymizedXmlForPages(f)),v=this.ui.hashValue(b.getCurrentEtag()),u=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
-"\nChecksum: "+l+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+v+"\nTo: "+u+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+q,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+DrawioFile.prototype.updateFile=function(b,c,e,k){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,b,c,k):this.reloadFile(b,c))}catch(p){null!=c&&c(p)}}),c))};
+DrawioFile.prototype.mergeFile=function(b,c,e,k){var g=!0;try{this.stats.fileMerged++;var p=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;var d=[this.ui.diffPages(null!=k?k:p,this.shadowPages)];if(!this.ignorePatches(d)){var f=this.ui.patchPages(p,
+d[0]);k={};var l=this.ui.getHashValueForPages(f,k),p={},q=this.ui.getHashValueForPages(this.shadowPages,p);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",q==l,l);if(null!=l&&l!=q){var m=this.compressReportData(this.getAnonymizedXmlForPages(t)),n=this.compressReportData(this.getAnonymizedXmlForPages(f)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
+"\nChecksum: "+l+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(p)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
null!=e&&e(D);try{if(g)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(C){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var c=new mxCodec(mxUtils.createXmlDocument()),e=c.document.createElement("mxfile");if(null!=b)for(var k=0;k<b.length;k++){var g=c.encode(new mxGraphModel(b[k].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",b[k].getId());b[k].viewState&&this.ui.editor.graph.saveViewState(b[k].viewState,g,!0);e.appendChild(g)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.compressReportData=function(b,c,e){c=null!=c?c:1E4;null!=e&&null!=b&&b.length>e?b=b.substring(0,e)+"[...]":null!=b&&b.length>c&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,c,e,k,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=c)for(b=0;b<c.length;b++)this.ui.anonymizePatch(c[b]);var n=mxUtils.bind(this,function(b){var d=this.compressReportData(JSON.stringify(c,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==k?n(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==k?n(b):n(null)}),function(){})}else{var t=this.getCurrentUser(),d=null!=t?t.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+DrawioFile.prototype.checksumError=function(b,c,e,k,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=c)for(b=0;b<c.length;b++)this.ui.anonymizePatch(c[b]);var p=mxUtils.bind(this,function(b){var d=this.compressReportData(JSON.stringify(c,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==k?p(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==k?p(b):p(null)}),function(){})}else{var t=this.getCurrentUser(),d=null!=t?t.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(f){}}}catch(f){}};
-DrawioFile.prototype.sendErrorReport=function(b,c,e,k){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),d=null!=t?this.ui.hashValue(t.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),m=l.lastIndexOf("."),t="xml";0<m&&(t=l.substring(m));var p=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+DrawioFile.prototype.sendErrorReport=function(b,c,e,k){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),d=null!=t?this.ui.hashValue(t.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),q=l.lastIndexOf("."),t="xml";0<q&&(t=l.substring(q));var m=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+t+")\nUser="+d+f+"\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!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+g+"\n\nData:\n"+n,k)}catch(q){}};
-DrawioFile.prototype.reloadFile=function(b,c){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),e=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,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var g=this.ui.getCurrentFile();null!=g&&(g.stats=this.stats);null!=b&&
+"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+m+"\n\nShadow:\n"+g+"\n\nData:\n"+p,k)}catch(n){}};
+DrawioFile.prototype.reloadFile=function(b,c){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),p=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(p,c,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var g=this.ui.getCurrentFile();null!=g&&(g.stats=this.stats);null!=b&&
b()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(k){null!=c&&c(k)}};DrawioFile.prototype.copyFile=function(b,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(b){for(var c=!0,e=0;e<b.length&&c;e++)c=c&&0==Object.keys(b[e]).length;return c};
-DrawioFile.prototype.patch=function(b,c,e){var k=this.ui.editor.undoManager,g=k.history.slice(),n=k.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=e;var f=t.foldingEnabled,l=t.mathEnabled,m=t.cellRenderer.redraw;t.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());m.apply(this,arguments)};t.model.beginUpdate();try{for(var p=
-0;p<b.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[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{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=m;this.changeListenerEnabled=d;e||(k.history=g,k.indexOfNextAdd=n,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
+DrawioFile.prototype.patch=function(b,c,e){var k=this.ui.editor.undoManager,g=k.history.slice(),p=k.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=e;var f=t.foldingEnabled,l=t.mathEnabled,q=t.cellRenderer.redraw;t.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());q.apply(this,arguments)};t.model.beginUpdate();try{for(var m=
+0;m<b.length;m++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[m],!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{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=q;this.changeListenerEnabled=d;e||(k.history=g,k.indexOfNextAdd=p,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
t.mathEnabled?(this.ui.editor.updateGraphComponents(),t.refresh()):(f!=t.foldingEnabled?t.view.revalidate():t.view.validate(),t.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}};
-DrawioFile.prototype.save=function(b,c,e,k,g,n){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};
+DrawioFile.prototype.save=function(b,c,e,k,g,p){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};
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 b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,c,e){};DrawioFile.prototype.saveFile=function(b,c,e,k){};
DrawioFile.prototype.getPublicUrl=function(b){b(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(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};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(b,c,e){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,c,e){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -3053,27 +3054,27 @@ window.location.href=e});null==b&&this.isModified()?this.ui.confirm(mxResources.
g)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():b?(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(b,c){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(b,c);else if(this.isModified()&&this.addUnsavedStatus(b),c)this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var e=this.getErrorMessage(b);null!=e&&60<e.length&&(e=e.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=
e?" ("+mxUtils.htmlEntities(e)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(b,c){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),k=mxUtils.bind(this,function(b){this.handleFileError(b,!0)}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,k,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.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(this.savingSpinnerKey))&&this.save(!0,e,k,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),k)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,k,g):this.invalidChecksum?this.showRefreshDialog(e,k,this.getErrorMessage(b)):c?this.showConflictDialog(g,n):this.addConflictStatus(mxUtils.bind(this,
+DrawioFile.prototype.handleConflictError=function(b,c){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),k=mxUtils.bind(this,function(b){this.handleFileError(b,!0)}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,k,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=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(this.savingSpinnerKey))&&this.save(!0,e,k,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),k)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,k,g):this.invalidChecksum?this.showRefreshDialog(e,k,this.getErrorMessage(b)):c?this.showConflictDialog(g,p):this.addConflictStatus(mxUtils.bind(this,
function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(e,k)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var c=null!=b?null!=b.error?b.error.message:b.message:null;null==c&&null!=b&&b.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()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.sendFileChanges(),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(b){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(b){this.handleFileError(b)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.isOptimisticSync=function(){return!1};
DrawioFile.prototype.createSecret=function(b){var c=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(c):this.sync.createToken(c,mxUtils.bind(this,function(e){b(c,e)}),mxUtils.bind(this,function(){b(c)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.isOptimisticSync()&&this.sync.fileSaving();"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaving",[this])};
DrawioFile.prototype.sendFileChanges=function(){try{null!=this.p2pCollab&&null!=this.sync&&(this.updateFileData(),this.sync.sendFileChanges(this.ui.getPagesForNode(mxUtils.parseXml(this.getData()).documentElement),this.desc),"1"==urlParams.test&&EditorUi.debug("DrawioFile.sendFileChanges",[this]))}catch(b){console.log(b)}};
DrawioFile.prototype.fileSaved=function(b,c,e,k,g){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=b,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(b).documentElement),c,e,k,g)}catch(d){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=k&&k(d);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,d);else{var n=this.getCurrentUser(),t=null!=n?n.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),t,d)}}catch(f){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
+!0;this.descriptorChanged();null!=k&&k(d);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,d);else{var p=this.getCurrentUser(),t=null!=p?p.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),t,d)}}catch(f){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
DrawioFile.prototype.autosave=function(b,c,e,k){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<c?b:0;this.clearAutosave();var g=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==g&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var b=this.isAutosaveRevision();b&&(this.lastAutosaveRevision=(new Date).getTime());this.save(b,mxUtils.bind(this,function(b){this.autosaveCompleted();null!=e&&e(b)}),mxUtils.bind(this,
function(b){null!=k&&k(b)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),b);this.autosaveThread=g};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-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(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,c){if(null!=b&&null!=c){var e=b.lastIndexOf("."),k=0<e?b.substring(e):"",e=c.lastIndexOf(".");return k===(0<e?c.substring(e):"")}return b==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(b,c){b([])};DrawioFile.prototype.addComment=function(b,c,e){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,c){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};LocalFile=function(b,c,e,k,g,n){DrawioFile.call(this,b,c);this.title=e;this.mode=k?null:App.MODE_DEVICE;this.fileHandle=g;this.desc=n};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&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(b,c){b([])};DrawioFile.prototype.addComment=function(b,c,e){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,c){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};LocalFile=function(b,c,e,k,g,p){DrawioFile.call(this,b,c);this.title=e;this.mode=k?null:App.MODE_DEVICE;this.fileHandle=g;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&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!0};LocalFile.prototype.save=function(b,c,e){this.saveAs(this.title,c,e)};LocalFile.prototype.saveAs=function(b,c,e){this.saveFile(b,!1,c,e)};LocalFile.prototype.saveAs=function(b,c,e){this.saveFile(b,!1,c,e)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,c){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,c)};
-LocalFile.prototype.saveFile=function(b,c,e,k,g){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;g||this.updateFileData();var n=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var t=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),f=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
-function(b){this.savingFile=!1;null!=k&&k({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(e){this.invalidFileHandle=null;this.desc.lastModified==e.lastModified?b.write(n?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=
-b;this.fileSaved(t,c,d,f);this.removeDraft()}catch(x){f(x)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;f(b)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,n?"image/png":"text/xml",n);else if(c.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf("."),e=0<e?b.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(n?"&binary=1":""))).simulate(document,
-"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));d()}});n?(c=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){f(b)}),k,this.ui.getCurrentFile()!=this?t:null,c.scale,c.border)):f(t)};LocalFile.prototype.rename=function(b,c,e){this.title=b;this.descriptorChanged();null!=c&&c()};
+LocalFile.prototype.saveFile=function(b,c,e,k,g){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;g||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var t=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),f=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
+function(b){this.savingFile=!1;null!=k&&k({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(e){this.invalidFileHandle=null;this.desc.lastModified==e.lastModified?b.write(p?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=
+b;this.fileSaved(t,c,d,f);this.removeDraft()}catch(x){f(x)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;f(b)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,p?"image/png":"text/xml",p);else if(c.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf("."),e=0<e?b.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,
+"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));d()}});p?(c=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){f(b)}),k,this.ui.getCurrentFile()!=this?t:null,c.scale,c.border)):f(t)};LocalFile.prototype.rename=function(b,c,e){this.title=b;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,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/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"},
@@ -3106,21 +3107,21 @@ d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}}]
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(b){return"orthogonalEdgeStyle"==mxUtils.getValue(b.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:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",
-defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(b,d){var c=d.editorUi.editor.graph;return"1"==urlParams.test&&1==b.vertices.length&&0==b.edges.length&&c.isTableCell(b.vertices[0])}},{type:"separator"},
-{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLastRow","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==
-b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLast","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.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:"block",dispName:"Block"},{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(b,d){return d.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,d){return 1==b.vertices.length&&
-0==b.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"},{val:"centerPerimeter",dispName:"Center"}]},{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(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isSwimlane(c)||0<f.model.getChildCount(c))},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&
-0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isContainer(c)&&"0"!=b.style.collapsible||!f.isContainer(c)&&"1"==b.style.collapsible)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length&&!d.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",
-dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,d){var c=d.editorUi.editor.graph.model;return 0<b.vertices.length?c.isVertex(c.getParent(b.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(b,d){var c=0<b.vertices.length?d.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=c&&!c.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(b,d){var c=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==c||c==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
-type:"bool",defVal:!1,isVisible:function(b,d){return 0<b.vertices.length&&d.editorUi.editor.graph.isContainer(b.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## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\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## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\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## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\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\nTessa 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-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa 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\nAlison Donovan,System Admin,rdo,Office 3,Tessa 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\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var f=0;f<c.length;f++){var e=c[f];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,f){var e=b.state.strokeColor,g=b.state.strokeWidth,l=b.state.strokeAlpha,k=b.state.dashed,m=f.fillWeight;
-0>m&&(m=f.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(f.fill||"");b.setStrokeWidth(m);b.setDashed(!1);this._drawToContext(d,c,f);b.setDashed(k);b.setStrokeWidth(g);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var f=0;f<d.ops.length;f++){var e=d.ops[f],g=e.data;switch(e.op){case "move":b.moveTo(g[0],g[1]);break;case "bcurveTo":b.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":b.lineTo(g[0],g[1])}}b.end();"fillPath"===d.type&&
+defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(b,d){var c=d.editorUi.editor.graph;return"1"==urlParams.test&&1==b.vertices.length&&0==b.edges.length&&c.isTableCell(b.vertices[0])}},{name:"rowspan",
+dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(b,d){var c=d.editorUi.editor.graph;return"1"==urlParams.test&&1==b.vertices.length&&0==b.edges.length&&c.isTableCell(b.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLastRow","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;
+return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLast","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.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:"block",dispName:"Block"},{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(b,d){return d.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.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"},{val:"centerPerimeter",dispName:"Center"}]},{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(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=
+c&&(f.isSwimlane(c)||0<f.model.getChildCount(c))},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isContainer(c)&&"0"!=b.style.collapsible||!f.isContainer(c)&&"1"==b.style.collapsible)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",
+dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length&&!d.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,d){var c=d.editorUi.editor.graph.model;return 0<b.vertices.length?c.isVertex(c.getParent(b.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(b,d){var c=0<b.vertices.length?d.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=c&&!c.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(b,d){var c=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==c||c==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(b,d){return 0<b.vertices.length&&d.editorUi.editor.graph.isContainer(b.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## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\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## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\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## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\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\nTessa 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-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa 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\nAlison Donovan,System Admin,rdo,Office 3,Tessa 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\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var f=0;f<c.length;f++){var e=c[f];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,f){var e=b.state.strokeColor,g=b.state.strokeWidth,l=b.state.strokeAlpha,m=b.state.dashed,k=f.fillWeight;
+0>k&&(k=f.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(f.fill||"");b.setStrokeWidth(k);b.setDashed(!1);this._drawToContext(d,c,f);b.setDashed(m);b.setStrokeWidth(g);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var f=0;f<d.ops.length;f++){var e=d.ops[f],g=e.data;switch(e.op){case "move":b.moveTo(g[0],g[1]);break;case "bcurveTo":b.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":b.lineTo(g[0],g[1])}}b.end();"fillPath"===d.type&&
c.filled?b.fill():b.stroke()};return d};(function(){function b(d,c,f){this.canvas=d;this.rc=c;this.shape=f;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,b.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,b.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,b.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,b.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,b.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,b.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,b.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,b.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
b.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,b.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,b.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,b.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,b.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,b.prototype.fillAndStroke);
@@ -3130,20 +3131,20 @@ mxUtils.getValue(this.shape.style,"simplification",f.simplification);c.disableMu
"zigzagOffset",g);g=mxUtils.getValue(this.shape.style,"fillWeight",-1);c.fillWeight="auto"==g?-1:g;g=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==g&&(g=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",g=null!=c.fill&&(null!=e||null!=g&&c.fill.toLowerCase()==g.toLowerCase())?"solid":f.fillStyle);c.fillStyle=g;return c};b.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&
this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};b.prototype.lineTo=function(b,d){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,b,d),this.lastX=b,this.lastY=d)};b.prototype.moveTo=
function(b,d){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,d),this.lastX=b,this.lastY=d,this.firstX=b,this.firstY=d)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,d,c,f){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,d,c,f),this.lastX=c,this.lastY=f)};b.prototype.curveTo=function(b,d,c,f,e,g){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,f,e,g),this.lastX=e,this.lastY=g)};b.prototype.arcTo=function(b,d,c,f,e,g,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var k=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,f,e,g,l);if(null!=k)for(var m=0;m<k.length;m+=6)this.curveTo(k[m],k[m+1],k[m+2],k[m+3],k[m+4],k[m+5]);this.lastX=g;this.lastY=l}};b.prototype.rect=function(b,d,c,f){this.passThrough?this.originalRect.apply(this.canvas,
+this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,f,e,g),this.lastX=e,this.lastY=g)};b.prototype.arcTo=function(b,d,c,f,e,g,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var m=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,f,e,g,l);if(null!=m)for(var k=0;k<m.length;k+=6)this.curveTo(m[k],m[k+1],m[k+2],m[k+3],m[k+4],m[k+5]);this.lastX=g;this.lastY=l}};b.prototype.rect=function(b,d,c,f){this.passThrough?this.originalRect.apply(this.canvas,
arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,d,c,f,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,d,c,f){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+c/2,d+f/2,c,f,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,d,c,f,e,g){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c,d,b+c,d+g),this.lineTo(b+
c,d+f-g),this.quadTo(b+c,d+f,b+c-e,d+f),this.lineTo(b+e,d+f),this.quadTo(b,d+f,b,d+f-g),this.lineTo(b,d+g),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(ca){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};b.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;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(d){return new b(d,Editor.createRoughCanvas(d),this)};var d=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?d.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):this.createRoughCanvas(b)};var c=mxShape.prototype.paint;
-mxShape.prototype.paint=function(d){var f=d.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=d.handJiggle&&d.handJiggle.constructor==b&&!this.outline){d.save();var g=this.fill,l=this.stroke;this.stroke=this.fill=null;var k=this.configurePointerEvents,m=d.setStrokeColor;d.setStrokeColor=function(){};var p=d.setFillColor;d.setFillColor=function(){};e||null==g||(this.configurePointerEvents=function(){});d.handJiggle.passThrough=!0;
-c.apply(this,arguments);d.handJiggle.passThrough=!1;d.setFillColor=p;d.setStrokeColor=m;this.configurePointerEvents=k;this.stroke=l;this.fill=g;d.restore();e&&null!=g&&(d.addTolerance=function(){})}c.apply(this,arguments);d.addTolerance=f};var f=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(d,c,e,g,l,k){null!=d.handJiggle&&d.handJiggle.constructor==b?(d.handJiggle.passThrough=!0,f.apply(this,arguments),d.handJiggle.passThrough=!1):f.apply(this,arguments)}})();Editor.fastCompress=
+mxShape.prototype.paint=function(d){var f=d.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=d.handJiggle&&d.handJiggle.constructor==b&&!this.outline){d.save();var g=this.fill,l=this.stroke;this.stroke=this.fill=null;var m=this.configurePointerEvents,k=d.setStrokeColor;d.setStrokeColor=function(){};var n=d.setFillColor;d.setFillColor=function(){};e||null==g||(this.configurePointerEvents=function(){});d.handJiggle.passThrough=!0;
+c.apply(this,arguments);d.handJiggle.passThrough=!1;d.setFillColor=n;d.setStrokeColor=k;this.configurePointerEvents=m;this.stroke=l;this.fill=g;d.restore();e&&null!=g&&(d.addTolerance=function(){})}c.apply(this,arguments);d.addTolerance=f};var f=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(d,c,e,g,l,m){null!=d.handJiggle&&d.handJiggle.constructor==b?(d.handJiggle.passThrough=!0,f.apply(this,arguments),d.handJiggle.passThrough=!1):f.apply(this,arguments)}})();Editor.fastCompress=
function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,d,c){if(null!=b&&"undefined"!==typeof pako){var f=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=f&&0<f.length)for(var g=0;g<f.length;g++)if("mxgraph"==f[g].getAttribute("class")){e.push(f[g]);
break}0<e.length&&(f=e[0].getAttribute("data-mxgraph"),null!=f?(e=JSON.parse(f),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(f=mxUtils.getTextContent(e[0]),f=Graph.decompress(f,null,c),0<f.length&&(b=mxUtils.parseXml(f),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(f=b.getAttribute("content"),null!=f&&"<"!=f.charAt(0)&&"%"!=f.charAt(0)&&(f=unescape(window.atob?atob(f):Base64.decode(cont,f))),null!=f&&"%"==f.charAt(0)&&
(f=decodeURIComponent(f)),null!=f&&0<f.length)b=mxUtils.parseXml(f).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||d||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(f=b.getElementsByTagName("diagram"),0<f.length&&(e=f[Math.max(0,Math.min(f.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,c)));null==b||"mxGraphModel"==b.nodeName||d&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,d){var c=mxUtils.trim(mxUtils.getTextContent(b)),
f=null;0<c.length?(c=Graph.decompress(c,null,d),null!=c&&0<c.length&&(f=mxUtils.parseXml(c).documentElement)):(c=mxUtils.getChildNodes(b),0<c.length&&(f=mxUtils.createXmlDocument(),f.appendChild(f.importNode(c[0],!0)),f=f.documentElement));return f};Editor.getDiagramNodeXml=function(b){var d=mxUtils.getTextContent(b),c=null;0<d.length?c=Graph.decompress(d):null!=b.firstChild&&(c=mxUtils.getXml(b.firstChild));return c};Editor.extractGraphModelFromPdf=function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&
-!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",f=0,e=0,g=[],l=null;e<b.length;){var k=b.charCodeAt(e),e=e+1;10!=k&&(d+=String.fromCharCode(k));k=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==
-f){var m=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(m>e){c=b.substring(e,m);break}}10==k&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],g[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(g));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<
+!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",f=0,e=0,g=[],l=null;e<b.length;){var m=b.charCodeAt(e),e=e+1;10!=m&&(d+=String.fromCharCode(m));m=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==
+f){var k=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(k>e){c=b.substring(e,k);break}}10==m&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],g[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(g));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<
d.length&&(d=b[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(b=b[d[1]],null!=b&&(b=b.join("\n"),c=b.substring(1,b.length-1))))));return c};Editor.extractGraphModelFromPng=function(b){var d=null;try{var c=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(b,c,e){b=f.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(I){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,f=null!=b?b.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(c=d||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),
0<f.length&&(c=mxUtils.getTextContent(f[0])));return null!=c?mxUtils.trim(c):c};Editor.addRetryToError=function(b,d){if(null!=b){var c=null!=b.error?b.error:b;null==c.retry&&(c.retry=d)}};Editor.configure=function(b,d){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
@@ -3172,30 +3173,30 @@ function(b,c,f,e){void 0!==c?d.push(c.replace(/\\'/g,"'")):void 0!==f?d.push(f.r
"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var d=b.convert,c=this;b.convert=function(f){if(null!=f){var e="http://"==f.substring(0,7)||"https://"==f.substring(0,8);e&&!navigator.onLine?f=Editor.svgBrokenImage.src:!e||f.substring(0,b.baseUrl.length)==b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,19)||mxClient.IS_CHROMEAPP||(f=d.apply(this,arguments)):
f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,d){try{var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){window.clearTimeout(f);c&&d(Editor.createSvgDataUri(b.getText()))}),function(){window.clearTimeout(f);
c&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(f);if(c)try{var b=document.createElement("canvas"),g=b.getContext("2d");b.height=e.height;b.width=e.width;g.drawImage(e,0,0);d(b.toDataURL())}catch(da){d(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(f);c&&d(Editor.svgBrokenImage.src)};e.src=b}}catch(ba){d(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(b,d,
-c,f){null==f&&(f=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,function(c,l){for(var k=b.getElementsByTagName(c),m=0;m<k.length;m++)mxUtils.bind(this,function(c){try{if(null!=c){var k=f.convert(c.getAttribute(l));if(null!=k&&"data:"!=k.substring(0,5)){var m=g[k];null==m?(e++,this.convertImageToDataUri(k,function(f){null!=f&&(g[k]=f,c.setAttribute(l,f));e--;0==e&&d(b)})):c.setAttribute(l,m)}else null!=k&&c.setAttribute(l,k)}}catch(V){}})(k[m])});c("image","xlink:href");c("img",
+c,f){null==f&&(f=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,function(c,l){for(var m=b.getElementsByTagName(c),k=0;k<m.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var m=f.convert(c.getAttribute(l));if(null!=m&&"data:"!=m.substring(0,5)){var k=g[m];null==k?(e++,this.convertImageToDataUri(m,function(f){null!=f&&(g[m]=f,c.setAttribute(l,f));e--;0==e&&d(b)})):c.setAttribute(l,k)}else null!=m&&c.setAttribute(l,m)}}catch(V){}})(m[k])});c("image","xlink:href");c("img",
"src");0==e&&d(b)};Editor.base64Encode=function(b){for(var d="",c=0,f=b.length,e,g,l;c<f;){e=b.charCodeAt(c++)&255;if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}g=b.charCodeAt(c++);if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<
4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);d+="=";break}l=b.charCodeAt(c++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return d};
-Editor.prototype.loadUrl=function(b,d,c,f,e,g,l,k){try{var m=!l&&(f||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=d){var f=b.getText();if(m){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
-for(var f=Array(b.length),e=0;e<b.length;e++)f[e]=String.fromCharCode(b[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+Editor.base64Encode(f)}d(f)}}else null!=c&&(0==b.getStatus()?c({message:mxResources.get("accessDenied")},b):c({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=c&&c({message:mxResources.get("error")+" "+b.getStatus()})},m,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:p})},k)});p()}catch(ia){null!=c&&c(ia)}};Editor.prototype.absoluteCssFonts=
+Editor.prototype.loadUrl=function(b,d,c,f,e,g,l,m){try{var k=!l&&(f||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var n=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=d){var f=b.getText();if(k){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
+for(var f=Array(b.length),e=0;e<b.length;e++)f[e]=String.fromCharCode(b[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+Editor.base64Encode(f)}d(f)}}else null!=c&&(0==b.getStatus()?c({message:mxResources.get("accessDenied")},b):c({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=c&&c({message:mxResources.get("error")+" "+b.getStatus()})},k,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:n})},m)});n()}catch(ia){null!=c&&c(ia)}};Editor.prototype.absoluteCssFonts=
function(b){var d=null;if(null!=b){var c=b.split("url(");if(0<c.length){d=[c[0]];b=window.location.pathname;var f=null!=b?b.lastIndexOf("/"):-1;0<=f&&(b=b.substring(0,f+1));var f=document.getElementsByTagName("base"),e=null;null!=f&&0<f.length&&(e=f[0].getAttribute("href"));for(var g=1;g<c.length;g++)if(f=c[g].indexOf(")"),0<f){var l=Editor.trimCssUrl(c[g].substring(0,f));this.graph.isRelativeUrl(l)&&(l=null!=e?e+l:window.location.protocol+"//"+window.location.hostname+("/"==l.charAt(0)?"":b)+l);
d.push('url("'+l+'"'+c[g].substring(f))}else d.push(c[g])}else d=[b]}return null!=d?d.join(""):null};Editor.prototype.embedCssFonts=function(b,d){var c=b.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==f){for(var b=[c[0]],e=1;e<c.length;e++){var g=c[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(c[e].substring(0,g))]);b.push('"'+c[e].substring(g))}d(b.join(""))}});if(0<c.length){for(var g=1;g<c.length;g++){var l=c[g].indexOf(")"),
-k=null,m=c[g].indexOf("format(",l);0<m&&(k=Editor.trimCssUrl(c[g].substring(m+7,c[g].indexOf(")",m))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;f++;var d="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(b))d="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(b))d="application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(b))d="application/font-woff2";
-else if("eot"==k||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(b))d="application/font-sfnt";var c=b;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(c,mxUtils.bind(this,function(d){this.cachedFonts[b]=d;f--;e()}),mxUtils.bind(this,function(b){f--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[g].substring(0,l)),k)}e()}else d(b)};Editor.prototype.loadFonts=
+m=null,k=c[g].indexOf("format(",l);0<k&&(m=Editor.trimCssUrl(c[g].substring(k+7,c[g].indexOf(")",k))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;f++;var d="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(b))d="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(b))d="application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(b))d="application/font-woff2";
+else if("eot"==m||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.sfnt)($|\?)/i.test(b))d="application/font-sfnt";var c=b;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(c,mxUtils.bind(this,function(d){this.cachedFonts[b]=d;f--;e()}),mxUtils.bind(this,function(b){f--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[g].substring(0,l)),m)}e()}else d(b)};Editor.prototype.loadFonts=
function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;b()})):b()};Editor.prototype.embedExtFonts=function(b){var d=this.graph.getCustomFonts();if(0<d.length){var c="",f=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==f&&this.embedCssFonts(c,b)}),g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){Graph.isCssFontUrl(d)?null==this.cachedGoogleFonts[d]?(f++,this.loadUrl(d,
mxUtils.bind(this,function(b){this.cachedGoogleFonts[d]=b;c+=b;f--;e()}),mxUtils.bind(this,function(b){f--;c+="@import url("+d+");";e()}))):c+=this.cachedGoogleFonts[d]:c+='@font-face {font-family: "'+b+'";src: url("'+d+'")}'})(d[g].name,d[g].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var d=document.getElementsByTagName("style"),c=0;c<d.length;c++)0<mxUtils.getTextContent(d[c]).indexOf("MathJax")&&b[0].appendChild(d[c].cloneNode(!0))};
Editor.prototype.addFontCss=function(b,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var c=b.getElementsByTagName("defs"),f=b.ownerDocument;0==c.length?(c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):c=c[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,d);c.appendChild(f)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,k,m,p,q,n,u,v,x,t,y,C){try{g=null!=g?g:!0;l=null!=l?l:!0;n=null!=n?n:this.graph;u=null!=u?u:0;var E=m?null:n.background;E==mxConstants.NONE&&(E=null);null==E&&(E=f);null==E&&0==m&&(E=t?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(n.getSvg(null,null,u,v,null,l,null,null,null,p,null,t,y,C),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(f,0,0);b(m,c)},0):(v.drawImage(f,0,0),b(m,c))},m=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=d&&(k=g?Math.min(1,Math.min(3*d/(4*q),d/p)):d/p);k=this.getMaxCanvasScale(p,q,k);p=
-Math.ceil(k*p);q=Math.ceil(k*q);m.setAttribute("width",p);m.setAttribute("height",q);var v=m.getContext("2d");null!=E&&(v.beginPath(),v.rect(0,0,p,q),v.fillStyle=E,v.fill());1!=k&&v.scale(k,k);if(x){var t=n.view,y=t.scale;t.scale=1;var B=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var B="data:image/svg+xml;base64,"+B,C=n.gridSize*t.gridSteps*k,F=n.getGraphBounds(),A=t.translate.x*y,N=t.translate.y*y,I=A+(F.x-A)/y-u,G=N+(F.y-N)/y-u,D=new Image;D.onload=function(){try{for(var b=
--Math.round(C-mxUtils.mod((A-I)*k,C)),d=-Math.round(C-mxUtils.mod((N-G)*k,C));b<p;b+=C)for(var c=d;c<q;c+=C)v.drawImage(D,b/k,c/k);l()}catch(Y){null!=e&&e(Y)}};D.onerror=function(b){null!=e&&e(b)};D.src=B}else l()}catch(wa){null!=e&&e(wa)}});f.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(aa){null!=
-e&&e(aa)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ja){null!=e&&e(ja)}}))}catch(aa){null!=e&&e(aa)}}),c,q)}catch(qa){null!=e&&e(qa)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var n=g,t=0;8>t;t++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[g]=n;Editor.updateCRC=function(b,d,c,f){for(var e=0;e<f;e++)b=Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>
-8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,f,e){function g(b,d){var c=m;m+=d;return b.substring(c,m)}function l(b){b=g(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function k(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var m=0;if(g(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
-10))null!=e&&e();else if(g(b,4),"IHDR"!=g(b,4))null!=e&&e();else{g(b,17);e=b.substring(0,m);do{var p=l(b);if("IDAT"==g(b,4)){e=b.substring(0,m-8);"pHYs"==d&&"dpi"==c?(c=Math.round(f/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,d,0,4);f=Editor.updateCRC(f,c,0,c.length);e+=k(c.length)+d+c+k(f^4294967295);e+=b.substring(m-8,b.length);break}e+=b.substring(m-8,m-4+p);g(b,p);g(b,4)}while(p);return"data:image/png;base64,"+
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,m,k,n,q,p,u,v,x,t,y,C){try{g=null!=g?g:!0;l=null!=l?l:!0;p=null!=p?p:this.graph;u=null!=u?u:0;var E=k?null:p.background;E==mxConstants.NONE&&(E=null);null==E&&(E=f);null==E&&0==k&&(E=t?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(p.getSvg(null,null,u,v,null,l,null,null,null,n,null,t,y,C),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(f,0,0);b(k,c)},0):(v.drawImage(f,0,0),b(k,c))},k=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=d&&(m=g?Math.min(1,Math.min(3*d/(4*q),d/n)):d/n);m=this.getMaxCanvasScale(n,q,m);n=
+Math.ceil(m*n);q=Math.ceil(m*q);k.setAttribute("width",n);k.setAttribute("height",q);var v=k.getContext("2d");null!=E&&(v.beginPath(),v.rect(0,0,n,q),v.fillStyle=E,v.fill());1!=m&&v.scale(m,m);if(x){var t=p.view,y=t.scale;t.scale=1;var B=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var B="data:image/svg+xml;base64,"+B,C=p.gridSize*t.gridSteps*m,F=p.getGraphBounds(),A=t.translate.x*y,N=t.translate.y*y,I=A+(F.x-A)/y-u,G=N+(F.y-N)/y-u,D=new Image;D.onload=function(){try{for(var b=
+-Math.round(C-mxUtils.mod((A-I)*m,C)),d=-Math.round(C-mxUtils.mod((N-G)*m,C));b<n;b+=C)for(var c=d;c<q;c+=C)v.drawImage(D,b/m,c/m);l()}catch(Y){null!=e&&e(Y)}};D.onerror=function(b){null!=e&&e(b)};D.src=B}else l()}catch(wa){null!=e&&e(wa)}});f.onerror=function(b){null!=e&&e(b)};n&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(aa){null!=
+e&&e(aa)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ja){null!=e&&e(ja)}}))}catch(aa){null!=e&&e(aa)}}),c,q)}catch(qa){null!=e&&e(qa)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var p=g,t=0;8>t;t++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[g]=p;Editor.updateCRC=function(b,d,c,f){for(var e=0;e<f;e++)b=Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>
+8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,f,e){function g(b,d){var c=k;k+=d;return b.substring(c,k)}function l(b){b=g(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function m(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var k=0;if(g(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
+10))null!=e&&e();else if(g(b,4),"IHDR"!=g(b,4))null!=e&&e();else{g(b,17);e=b.substring(0,k);do{var n=l(b);if("IDAT"==g(b,4)){e=b.substring(0,k-8);"pHYs"==d&&"dpi"==c?(c=Math.round(f/.0254),c=m(c)+m(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,d,0,4);f=Editor.updateCRC(f,c,0,c.length);e+=m(c.length)+d+c+m(f^4294967295);e+=b.substring(k-8,b.length);break}e+=b.substring(k-8,k-4+n);g(b,n);g(b,4)}while(n);return"data:image/png;base64,"+
(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
-(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),
-function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.enableShadowOption||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));b.appendChild(f)}return b};var q=DiagramFormatPanel.prototype.addOptions;
-DiagramFormatPanel.prototype.addOptions=function(b){b=q.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var f=d.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);d.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
+(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),
+function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.enableShadowOption||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));b.appendChild(f)}return b};var n=DiagramFormatPanel.prototype.addOptions;
+DiagramFormatPanel.prototype.addOptions=function(b){b=n.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var f=d.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);d.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
b.appendChild(e)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(b){d.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=function(){b(c.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var g=d.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");
g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";e.appendChild(g)}return b};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
@@ -3220,37 +3221,37 @@ 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(b,d,c){if(null!=d){var f=function(b){if(null!=b)if(c)for(var f=
0;f<b.length;f++)d[b[f].name]=b[f];else for(var e in d){for(var g=!1,f=0;f<b.length;f++)if(b[f].name==e&&b[f].type==d[e].type){g=!0;break}g||delete d[e]}},e=this.editorUi.editor.graph.view.getState(b);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)),
-f(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{f(JSON.parse(b))}catch(ba){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},c=b.vertices,f=b.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],d,0==
-e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],d,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,b))}};var u=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var d=this.format.getSelectionState(),c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",
+f(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{f(JSON.parse(b))}catch(ba){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},c=b.vertices,f=b.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],d,0==
+e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],d,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,b))}};var v=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var d=this.format.getSelectionState(),c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",
mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="104px";c.style.marginRight="2px";b.appendChild(c);0<d.cells.length?(c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("pasteStyle").funct()})),c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),c.style.marginBottom="2px",c.style.width="104px",b.appendChild(c)):
-c.style.width="210px";mxUtils.br(b);return u.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,d,c){function f(b,d,c,f){n.getModel().beginUpdate();try{var e=[],g=[];if(null!=c.index){for(var l=[],k=c.parentRow.nextSibling;k&&k.getAttribute("data-pName")==b;)l.push(k.getAttribute("data-pValue")),k=k.nextSibling;c.index<l.length?null!=f?l.splice(f,1):l[c.index]=d:l.push(d);null!=c.size&&l.length>c.size&&(l=l.slice(0,c.size));d=l.join(",");
-null!=c.countProperty&&(n.setCellStyles(c.countProperty,l.length,n.getSelectionCells()),e.push(c.countProperty),g.push(l.length))}n.setCellStyles(b,d,n.getSelectionCells());e.push(b);g.push(d);if(null!=c.dependentProps)for(b=0;b<c.dependentProps.length;b++){var m=c.dependentPropsDefVal[b],p=c.dependentPropsVals[b];if(p.length>d)p=p.slice(0,d);else for(var u=p.length;u<d;u++)p.push(m);p=p.join(",");n.setCellStyles(c.dependentProps[b],p,n.getSelectionCells());e.push(c.dependentProps[b]);g.push(p)}if("function"==
-typeof c.onChange)c.onChange(n,d);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}}function e(d,c,f){var e=mxUtils.getOffset(b,!0),g=mxUtils.getOffset(d,!0);c.style.position="absolute";c.style.left=g.x-e.x+"px";c.style.top=g.y-e.y+"px";c.style.width=d.offsetWidth+"px";c.style.height=d.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function g(b,d,c){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(q,function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;f(b,d,c)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function l(b,d,c,e,g,l,k){null!=d&&(d=d.split(","),u.push({name:b,
-values:d,type:c,defVal:e,countProperty:g,parentRow:l,isDeletable:!0,flipBkg:k}));btn=mxUtils.button("+",mxUtils.bind(q,function(d){for(var m=l,q=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==b)m=m.nextSibling,q++;else break;var n={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,countProperty:g},q=p(b,"",n,0==q%2,k);f(b,e,n);m.parentNode.insertBefore(q,m.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function k(b,d,c,f,e,g,l){if(0<e){var k=Array(e);d=null!=d?d.split(","):[];for(var m=0;m<e;m++)k[m]=null!=d[m]?d[m]:null!=f?f:"";u.push({name:b,values:k,type:c,defVal:f,parentRow:g,flipBkg:l,size:e})}return document.createElement("div")}function m(b,d,c){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){f(b,e.checked?"1":"0",c)});return e}function p(d,c,p,n,u){var v=p.dispName,x=p.type,t=document.createElement("tr");t.className="gePropRow"+
-(u?"Dark":"")+(n?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",d);t.setAttribute("data-pValue",c);n=!1;null!=p.index&&(t.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",n=!0);var y=document.createElement("td");y.className="gePropRowCell";v=mxResources.get(v,null,v);mxUtils.write(y,v);y.setAttribute("title",v);n&&(y.style.textAlign="right");t.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(g(d,c,p));else if("bool"==
-x||"boolean"==x)y.appendChild(m(d,c,p));else if("enum"==x){var C=p.enumList;for(u=0;u<C.length;u++)if(v=C[u],v.val==c){mxUtils.write(y,mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(q,function(){var g=document.createElement("select");e(y,g);for(var l=0;l<C.length;l++){var k=C[l],m=document.createElement("option");m.value=mxUtils.htmlEntities(k.val);mxUtils.write(m,mxResources.get(k.dispName,null,k.dispName));g.appendChild(m)}g.value=c;b.appendChild(g);
-mxEvent.addListener(g,"change",function(){var b=mxUtils.htmlEntities(g.value);f(d,b,p)});g.focus();mxEvent.addListener(g,"blur",function(){b.removeChild(g)})}))}else"dynamicArr"==x?y.appendChild(l(d,c,p.subType,p.subDefVal,p.countProperty,t,u)):"staticArr"==x?y.appendChild(k(d,c,p.subType,p.subDefVal,p.size,t,u)):"readOnly"==x?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=c,u.style.width="96px",u.style.borderWidth="0px",y.appendChild(u)):(y.innerHTML=c,mxEvent.addListener(y,
-"click",mxUtils.bind(q,function(){function g(){var b=l.value,b=0==b.length&&"string"!=x?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):b)+"");f(d,b,p)}var l=document.createElement("input");e(y,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||p.allowAuto||(l.type="number",l.step="int"==x?"1":"any",null!=p.min&&
-(l.min=parseFloat(p.min)),null!=p.max&&(l.max=parseFloat(p.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&g()});l.focus();mxEvent.addListener(l,"blur",function(){g()})})));p.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(b){f(d,"",p,p.index);mxEvent.consume(b)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",y.appendChild(u));t.appendChild(y);return t}var q=this,n=this.editorUi.editor.graph,u=[];b.style.position=
+c.style.width="210px";mxUtils.br(b);return v.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,d,c){function f(b,d,c,f){p.getModel().beginUpdate();try{var e=[],g=[];if(null!=c.index){for(var l=[],m=c.parentRow.nextSibling;m&&m.getAttribute("data-pName")==b;)l.push(m.getAttribute("data-pValue")),m=m.nextSibling;c.index<l.length?null!=f?l.splice(f,1):l[c.index]=d:l.push(d);null!=c.size&&l.length>c.size&&(l=l.slice(0,c.size));d=l.join(",");
+null!=c.countProperty&&(p.setCellStyles(c.countProperty,l.length,p.getSelectionCells()),e.push(c.countProperty),g.push(l.length))}p.setCellStyles(b,d,p.getSelectionCells());e.push(b);g.push(d);if(null!=c.dependentProps)for(b=0;b<c.dependentProps.length;b++){var k=c.dependentPropsDefVal[b],n=c.dependentPropsVals[b];if(n.length>d)n=n.slice(0,d);else for(var u=n.length;u<d;u++)n.push(k);n=n.join(",");p.setCellStyles(c.dependentProps[b],n,p.getSelectionCells());e.push(c.dependentProps[b]);g.push(n)}if("function"==
+typeof c.onChange)c.onChange(p,d);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}function e(d,c,f){var e=mxUtils.getOffset(b,!0),g=mxUtils.getOffset(d,!0);c.style.position="absolute";c.style.left=g.x-e.x+"px";c.style.top=g.y-e.y+"px";c.style.width=d.offsetWidth+"px";c.style.height=d.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function g(b,d,c){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(q,function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;f(b,d,c)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function l(b,d,c,e,g,l,m){null!=d&&(d=d.split(","),u.push({name:b,
+values:d,type:c,defVal:e,countProperty:g,parentRow:l,isDeletable:!0,flipBkg:m}));btn=mxUtils.button("+",mxUtils.bind(q,function(d){for(var k=l,q=0;null!=k.nextSibling;)if(k.nextSibling.getAttribute("data-pName")==b)k=k.nextSibling,q++;else break;var p={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,countProperty:g},q=n(b,"",p,0==q%2,m);f(b,e,p);k.parentNode.insertBefore(q,k.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function m(b,d,c,f,e,g,l){if(0<e){var m=Array(e);d=null!=d?d.split(","):[];for(var k=0;k<e;k++)m[k]=null!=d[k]?d[k]:null!=f?f:"";u.push({name:b,values:m,type:c,defVal:f,parentRow:g,flipBkg:l,size:e})}return document.createElement("div")}function k(b,d,c){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){f(b,e.checked?"1":"0",c)});return e}function n(d,c,n,p,u){var v=n.dispName,x=n.type,t=document.createElement("tr");t.className="gePropRow"+
+(u?"Dark":"")+(p?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",d);t.setAttribute("data-pValue",c);p=!1;null!=n.index&&(t.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",p=!0);var y=document.createElement("td");y.className="gePropRowCell";v=mxResources.get(v,null,v);mxUtils.write(y,v);y.setAttribute("title",v);p&&(y.style.textAlign="right");t.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(g(d,c,n));else if("bool"==
+x||"boolean"==x)y.appendChild(k(d,c,n));else if("enum"==x){var C=n.enumList;for(u=0;u<C.length;u++)if(v=C[u],v.val==c){mxUtils.write(y,mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(q,function(){var g=document.createElement("select");e(y,g);for(var l=0;l<C.length;l++){var m=C[l],k=document.createElement("option");k.value=mxUtils.htmlEntities(m.val);mxUtils.write(k,mxResources.get(m.dispName,null,m.dispName));g.appendChild(k)}g.value=c;b.appendChild(g);
+mxEvent.addListener(g,"change",function(){var b=mxUtils.htmlEntities(g.value);f(d,b,n)});g.focus();mxEvent.addListener(g,"blur",function(){b.removeChild(g)})}))}else"dynamicArr"==x?y.appendChild(l(d,c,n.subType,n.subDefVal,n.countProperty,t,u)):"staticArr"==x?y.appendChild(m(d,c,n.subType,n.subDefVal,n.size,t,u)):"readOnly"==x?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=c,u.style.width="96px",u.style.borderWidth="0px",y.appendChild(u)):(y.innerHTML=c,mxEvent.addListener(y,
+"click",mxUtils.bind(q,function(){function g(){var b=l.value,b=0==b.length&&"string"!=x?0:b;n.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=n.min&&b<n.min?b=n.min:null!=n.max&&b>n.max&&(b=n.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):b)+"");f(d,b,n)}var l=document.createElement("input");e(y,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||n.allowAuto||(l.type="number",l.step="int"==x?"1":"any",null!=n.min&&
+(l.min=parseFloat(n.min)),null!=n.max&&(l.max=parseFloat(n.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&g()});l.focus();mxEvent.addListener(l,"blur",function(){g()})})));n.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(b){f(d,"",n,n.index);mxEvent.consume(b)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",y.appendChild(u));t.appendChild(y);return t}var q=this,p=this.editorUi.editor.graph,u=[];b.style.position=
"relative";b.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;y.style.verticalAlign="middle";t.appendChild(y);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var C=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),
c;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-1;0<=f;f--)try{var e=b.childNodes[f],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||b.removeChild(e)}catch(xa){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;C()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";
-t.innerHTML=mxResources.get("value");x.appendChild(t);v.appendChild(x);var E=!1,B=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&v.appendChild(p("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(x=d[A],"function"!=typeof x.isVisible||x.isVisible(c,this)){var F=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==
-x.type)B=!B;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var N=x.dependentProps,G=[],D=[],t=0;t<N.length;t++){var Q=c.style[N[t]];D.push(d[N[t]].subDefVal);G.push(null!=Q?Q.split(","):[])}x.dependentPropsDefVal=D;x.dependentPropsVals=G}v.appendChild(p(A,F,x,E,B));E=!E}}for(t=0;t<u.length;t++)for(x=u[t],d=x.parentRow,c=0;c<x.values.length;c++)A=p(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,
+t.innerHTML=mxResources.get("value");x.appendChild(t);v.appendChild(x);var E=!1,B=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&v.appendChild(n("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(x=d[A],"function"!=typeof x.isVisible||x.isVisible(c,this)){var F=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==
+x.type)B=!B;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var N=x.dependentProps,G=[],D=[],t=0;t<N.length;t++){var Q=c.style[N[t]];D.push(d[N[t]].subDefVal);G.push(null!=Q?Q.split(","):[])}x.dependentPropsDefVal=D;x.dependentPropsVals=G}v.appendChild(n(A,F,x,E,B));E=!E}}for(t=0;t<u.length;t++)for(x=u[t],d=x.parentRow,c=0;c<x.values.length;c++)A=n(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,
index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),d.parentNode.insertBefore(A,d.nextSibling),d=A;b.appendChild(v);C();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi,f=c.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight=
-"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.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(" "),l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";l.style.width="210px";for(var k=[],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(b){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){q(b)}))})(m);k.push(p);l.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(k[this.format.currentScheme].style.background="transparent");
-this.format.currentScheme=b;n(this.defaultColorSchemes[this.format.currentScheme]);k[this.format.currentScheme].style.background="#84d7ff"}),n=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){f.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,l=0;l<e.length;l++){for(var k=f.getModel().getStyle(e[l]),m=0;m<g.length;m++)k=mxUtils.removeStylename(k,g[m]);var p=f.getModel().isVertex(e[l])?c.initialDefaultVertexStyle:
-c.initialdefaultEdgeStyle;null!=b?(k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(d)||(k=""==b.fill?mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(d)||(k=""==b.stroke?mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,
-b.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||!f.getModel().isVertex(e[l])||(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),k=mxUtils.setStyle(k,
-mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(e[l])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(e[l],k)}}finally{f.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!=b){var l="1"==urlParams.sketch?"2px solid":"1px solid";
+"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.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(" "),l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";l.style.width="210px";for(var m=[],k=0;k<this.defaultColorSchemes.length;k++){var n=document.createElement("div");
+n.style.display="inline-block";n.style.width="6px";n.style.height="6px";n.style.marginLeft="4px";n.style.marginRight="3px";n.style.borderRadius="3px";n.style.cursor="pointer";n.style.background="transparent";n.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(b)}))})(k);m.push(n);l.appendChild(n)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(m[this.format.currentScheme].style.background="transparent");
+this.format.currentScheme=b;p(this.defaultColorSchemes[this.format.currentScheme]);m[this.format.currentScheme].style.background="#84d7ff"}),p=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){f.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,l=0;l<e.length;l++){for(var m=f.getModel().getStyle(e[l]),k=0;k<g.length;k++)m=mxUtils.removeStylename(m,g[k]);var n=f.getModel().isVertex(e[l])?c.initialDefaultVertexStyle:
+c.initialdefaultEdgeStyle;null!=b?(m=mxUtils.setStyle(m,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(d)||(m=""==b.fill?mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(d)||(m=""==b.stroke?mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,
+b.stroke||mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||!f.getModel().isVertex(e[l])||(m=mxUtils.setStyle(m,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null)))):(m=mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),m=mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000000")),m=mxUtils.setStyle(m,
+mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(e[l])&&(m=mxUtils.setStyle(m,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(e[l],m)}}finally{f.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!=b){var l="1"==urlParams.sketch?"2px solid":"1px solid";
null!=b.gradient?mxClient.IS_IE&&10>document.documentMode?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?d.style.background="url('"+Dialog.prototype.noColorImage+"')":d.style.backgroundColor=""==b.fill?mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff"):
b.fill||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");d.style.border=b.stroke==mxConstants.NONE?l+" transparent":""==b.stroke?l+" "+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):l+" "+(b.stroke||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=b.title&&d.setAttribute("title",b.title)}else{var l=
-mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),k=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=l;d.style.border="1px solid "+k}d.style.borderRadius="0";e.appendChild(d)});e.innerHTML="";for(var l=0;l<b.length;l++)0<l&&0==mxUtils.mod(l,4)&&mxUtils.br(e),d(b[l])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var m=10>=this.defaultColorSchemes.length?
-28:8,u=document.createElement("div");u.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(u,
-"click",mxUtils.bind(this,function(){q(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&&(b.appendChild(u),b.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));d(u);d(v);n(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(l);return b};StyleFormatPanel.prototype.addEditOps=function(b){var d=this.format.getSelectionState(),c=null;1==d.cells.length&&(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,
+mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),m=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=l;d.style.border="1px solid "+m}d.style.borderRadius="0";e.appendChild(d)});e.innerHTML="";for(var l=0;l<b.length;l++)0<l&&0==mxUtils.mod(l,4)&&mxUtils.br(e),d(b[l])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var k=10>=this.defaultColorSchemes.length?
+28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+k+"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(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+k+"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&&(b.appendChild(u),b.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));d(u);d(v);p(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(l);return b};StyleFormatPanel.prototype.addEditOps=function(b){var d=this.format.getSelectionState(),c=null;1==d.cells.length&&(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,
function(b){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="210px",c.style.marginBottom="2px",b.appendChild(c));var f=this.editorUi.editor.graph,f=1==d.cells.length?f.view.getState(d.cells[0]):null;null!=f&&null!=f.shape&&null!=f.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",
mxResources.get("editShape")),d.style.marginBottom="2px",null==c?d.style.width="210px":(c.style.width="104px",d.style.width="104px",d.style.marginLeft="2px"),b.appendChild(d)):d.image&&0<d.cells.length&&(d=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(b){this.editorUi.actions.get("image").funct()})),d.setAttribute("title",mxResources.get("editImage")),d.style.marginBottom="2px",null==c?d.style.width="210px":(c.style.width="104px",d.style.width="104px",d.style.marginLeft="2px"),
b.appendChild(d));return b}}Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(b){return b.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(b){return Graph.isGoogleFontUrl(b)};Graph.createFontElement=function(b,d){var c;Graph.isCssFontUrl(d)?(c=document.createElement("link"),c.setAttribute("rel","stylesheet"),c.setAttribute("type","text/css"),c.setAttribute("charset","UTF-8"),c.setAttribute("href",d)):(c=document.createElement("style"),
@@ -3261,41 +3262,41 @@ b[d].getAttribute("face"):b[d].style.fontFamily;null!=f&&Graph.addFont(f,c)}}};G
"mouseenter",b);mxEvent.addListener(this.container,"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){d=null});this.isMouseInsertPoint=function(){return null!=d};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):c.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(b){var d=this.graph.getCellStyle(b);if(null!=d){if("rack"==d.childLayout){var c=new mxStackLayout(this.graph,!1);c.gridSize=
null!=d.rackUnitSize?parseFloat(d.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;c.marginLeft=d.marginLeft||0;c.marginRight=d.marginRight||0;c.marginTop=d.marginTop||0;c.marginBottom=d.marginBottom||0;c.allowGaps=d.allowGaps||0;c.horizontal="1"==mxUtils.getValue(d,"horizontalRack","0");c.resizeParent=!1;c.fill=!0;return c}if("undefined"!==typeof mxTableLayout&&"tableLayout"==d.childLayout)return c=new mxTableLayout(this.graph),c.rows=d.tableRows||2,c.columns=d.tableColumns||
2,c.colPercentages=d.colPercentages,c.rowPercentages=d.rowPercentages,c.equalColumns="1"==mxUtils.getValue(d,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(d,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),c.border=d.tableBorder||c.border,c.marginLeft=d.marginLeft||0,c.marginRight=d.marginRight||0,c.marginTop=d.marginTop||0,c.marginBottom=d.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(d,"autoAddCol","0"),c.autoAddRow=
-"1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,p,q){D.apply(this,arguments);Graph.processFontAttributes(q)};
-var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,d,c){function f(){for(var b=l.getSelectionCells(),d=[],c=0;c<b.length;c++)l.isCellVisible(b[c])&&d.push(b[c]);l.setSelectionCells(d)}function e(b){l.hiddenTags=b?[]:k.slice();f();l.refresh()}function g(b,c){p.innerHTML="";if(0<b.length){var g=document.createElement("table");g.setAttribute("cellpadding",
-"2");g.style.boxSizing="border-box";g.style.tableLayout="fixed";g.style.width="100%";var m=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){var g=0>mxUtils.indexOf(l.hiddenTags,b),p=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var n=document.createElement("img");n.setAttribute("src",g?Editor.visibleImage:Editor.hiddenImage);n.setAttribute("title",mxResources.get(g?"hideIt":"show",[b]));mxUtils.setOpacity(n,
-g?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";if(d||Editor.isDarkMode())n.style.filter="invert(100%)";q.appendChild(n);mxEvent.addListener(n,"click",function(d){var c=mxUtils.indexOf(l.hiddenTags,b);mxEvent.isShiftDown(d)?e(0<=mxUtils.indexOf(l.hiddenTags,b)):(0>c?l.hiddenTags.push(b):0<=c&&l.hiddenTags.splice(c,1),f(),l.refresh());mxEvent.consume(d)});p.appendChild(q);q=document.createElement("td");q.style.overflow="hidden";q.style.whiteSpace="nowrap";q.style.textOverflow=
-"ellipsis";q.style.verticalAlign="middle";q.style.cursor="pointer";q.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,g?100:40);q.appendChild(a);mxEvent.addListener(q,"click",function(d){if(mxEvent.isShiftDown(d)){e(!0);var c=l.getCellsForTags([b],null,null,!0);l.isEnabled()?l.setSelectionCells(c):l.highlightCells(c)}else if(g&&0<l.hiddenTags.length)e(!0);else{var c=k.slice(),m=mxUtils.indexOf(c,
-b);c.splice(m,1);l.hiddenTags=c;f();l.refresh()}mxEvent.consume(d)});p.appendChild(q);if(l.isEnabled()){q=document.createElement("td");q.style.verticalAlign="middle";q.style.textAlign="center";q.style.width="18px";if(null==c){q.style.align="center";q.style.width="16px";n=document.createElement("img");n.setAttribute("src",Editor.crossImage);n.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(n,g?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";
-if(d||Editor.isDarkMode())n.style.filter="invert(100%)";mxEvent.addListener(n,"click",function(d){var c=mxUtils.indexOf(k,b);0<=c&&k.splice(c,1);l.removeTagsForCells(l.model.getDescendants(l.model.getRoot()),[b]);l.refresh();mxEvent.consume(d)});q.appendChild(n)}else{var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.margin="0px";u.defaultChecked=null!=c&&0<=mxUtils.indexOf(c,b);u.checked=u.defaultChecked;u.style.background="transparent";u.setAttribute("title",mxResources.get(u.defaultChecked?
-"removeIt":"add",[b]));mxEvent.addListener(u,"change",function(d){u.checked?l.addTagsForCells(l.getSelectionCells(),[b]):l.removeTagsForCells(l.getSelectionCells(),[b]);mxEvent.consume(d)});q.appendChild(u)}p.appendChild(q)}m.appendChild(p)})(b[q]);g.appendChild(m);p.appendChild(g)}}var l=this,k=l.hiddenTags.slice(),m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var p=document.createElement("div");p.style.boxSizing=
-"border-box";p.style.borderRadius="4px";p.style.userSelect="none";p.style.overflow="auto";p.style.position="absolute";p.style.left="10px";p.style.right="10px";p.style.top="10px";p.style.border=l.isEnabled()?"1px solid #808080":"none";p.style.bottom=l.isEnabled()?"48px":"10px";m.appendChild(p);var q=mxUtils.button(mxResources.get("reset"),function(b){l.hiddenTags=[];mxEvent.isShiftDown(b)||(k=l.hiddenTags.slice());f();l.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";
-q.style.margin="0 4px 0 0";var n=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(k,function(b){k=b;u()})});n.setAttribute("title",mxResources.get("add"));n.className="geBtn";n.style.margin="0";l.addListener(mxEvent.ROOT,function(){k=l.hiddenTags.slice()});var u=mxUtils.bind(this,function(d,c){if(b()){for(var f=l.getAllTags(),e=0;e<f.length;e++)0>mxUtils.indexOf(k,f[e])&&k.push(f[e]);k.sort();l.isSelectionEmpty()?g(k):g(k,l.getCommonTagsForCells(l.getSelectionCells()))}});l.selectionModel.addListener(mxEvent.CHANGE,
-u);l.model.addListener(mxEvent.CHANGE,u);l.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";v.style.right="10px";v.style.left="10px";l.isEnabled()&&(v.appendChild(q),v.appendChild(n),m.appendChild(v));return{div:m,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=
+"1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,m,k,n,q){D.apply(this,arguments);Graph.processFontAttributes(q)};
+var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,d,c){function f(){for(var b=l.getSelectionCells(),d=[],c=0;c<b.length;c++)l.isCellVisible(b[c])&&d.push(b[c]);l.setSelectionCells(d)}function e(b){l.hiddenTags=b?[]:m.slice();f();l.refresh()}function g(b,c){n.innerHTML="";if(0<b.length){var g=document.createElement("table");g.setAttribute("cellpadding",
+"2");g.style.boxSizing="border-box";g.style.tableLayout="fixed";g.style.width="100%";var k=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){var g=0>mxUtils.indexOf(l.hiddenTags,b),n=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var p=document.createElement("img");p.setAttribute("src",g?Editor.visibleImage:Editor.hiddenImage);p.setAttribute("title",mxResources.get(g?"hideIt":"show",[b]));mxUtils.setOpacity(p,
+g?75:25);p.style.verticalAlign="middle";p.style.cursor="pointer";p.style.width="16px";if(d||Editor.isDarkMode())p.style.filter="invert(100%)";q.appendChild(p);mxEvent.addListener(p,"click",function(d){var c=mxUtils.indexOf(l.hiddenTags,b);mxEvent.isShiftDown(d)?e(0<=mxUtils.indexOf(l.hiddenTags,b)):(0>c?l.hiddenTags.push(b):0<=c&&l.hiddenTags.splice(c,1),f(),l.refresh());mxEvent.consume(d)});n.appendChild(q);q=document.createElement("td");q.style.overflow="hidden";q.style.whiteSpace="nowrap";q.style.textOverflow=
+"ellipsis";q.style.verticalAlign="middle";q.style.cursor="pointer";q.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,g?100:40);q.appendChild(a);mxEvent.addListener(q,"click",function(d){if(mxEvent.isShiftDown(d)){e(!0);var c=l.getCellsForTags([b],null,null,!0);l.isEnabled()?l.setSelectionCells(c):l.highlightCells(c)}else if(g&&0<l.hiddenTags.length)e(!0);else{var c=m.slice(),k=mxUtils.indexOf(c,
+b);c.splice(k,1);l.hiddenTags=c;f();l.refresh()}mxEvent.consume(d)});n.appendChild(q);if(l.isEnabled()){q=document.createElement("td");q.style.verticalAlign="middle";q.style.textAlign="center";q.style.width="18px";if(null==c){q.style.align="center";q.style.width="16px";p=document.createElement("img");p.setAttribute("src",Editor.crossImage);p.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(p,g?75:25);p.style.verticalAlign="middle";p.style.cursor="pointer";p.style.width="16px";
+if(d||Editor.isDarkMode())p.style.filter="invert(100%)";mxEvent.addListener(p,"click",function(d){var c=mxUtils.indexOf(m,b);0<=c&&m.splice(c,1);l.removeTagsForCells(l.model.getDescendants(l.model.getRoot()),[b]);l.refresh();mxEvent.consume(d)});q.appendChild(p)}else{var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.margin="0px";u.defaultChecked=null!=c&&0<=mxUtils.indexOf(c,b);u.checked=u.defaultChecked;u.style.background="transparent";u.setAttribute("title",mxResources.get(u.defaultChecked?
+"removeIt":"add",[b]));mxEvent.addListener(u,"change",function(d){u.checked?l.addTagsForCells(l.getSelectionCells(),[b]):l.removeTagsForCells(l.getSelectionCells(),[b]);mxEvent.consume(d)});q.appendChild(u)}n.appendChild(q)}k.appendChild(n)})(b[q]);g.appendChild(k);n.appendChild(g)}}var l=this,m=l.hiddenTags.slice(),k=document.createElement("div");k.style.userSelect="none";k.style.overflow="hidden";k.style.padding="10px";k.style.height="100%";var n=document.createElement("div");n.style.boxSizing=
+"border-box";n.style.borderRadius="4px";n.style.userSelect="none";n.style.overflow="auto";n.style.position="absolute";n.style.left="10px";n.style.right="10px";n.style.top="10px";n.style.border=l.isEnabled()?"1px solid #808080":"none";n.style.bottom=l.isEnabled()?"48px":"10px";k.appendChild(n);var q=mxUtils.button(mxResources.get("reset"),function(b){l.hiddenTags=[];mxEvent.isShiftDown(b)||(m=l.hiddenTags.slice());f();l.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";
+q.style.margin="0 4px 0 0";var p=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(m,function(b){m=b;u()})});p.setAttribute("title",mxResources.get("add"));p.className="geBtn";p.style.margin="0";l.addListener(mxEvent.ROOT,function(){m=l.hiddenTags.slice()});var u=mxUtils.bind(this,function(d,c){if(b()){for(var f=l.getAllTags(),e=0;e<f.length;e++)0>mxUtils.indexOf(m,f[e])&&m.push(f[e]);m.sort();l.isSelectionEmpty()?g(m):g(m,l.getCommonTagsForCells(l.getSelectionCells()))}});l.selectionModel.addListener(mxEvent.CHANGE,
+u);l.model.addListener(mxEvent.CHANGE,u);l.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";v.style.right="10px";v.style.left="10px";l.isEnabled()&&(v.appendChild(q),v.appendChild(p),k.appendChild(v));return{div:k,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=
Graph.customFontElements[d];b.push({name:c.name,url:c.url})}return b};Graph.prototype.setFont=function(b,d){Graph.addFont(b,d);document.execCommand("fontname",!1,b);if(null!=d){var c=this.cellEditor.textarea.getElementsByTagName("font");d=Graph.getFontUrl(b,d);for(var f=0;f<c.length;f++)c[f].getAttribute("face")==b&&c[f].getAttribute("data-font-src")!=d&&c[f].setAttribute("data-font-src",d)}};var G=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return G.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 b=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var d in b)this.globalVars[d]=b[d]}catch(F){null!=window.console&&console.log("Error in vars URL parameter: "+F)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):
{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=J.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[b]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=
-function(b,d,c,f,e,g,l,k,m,p,q,n,u,v){var x=null,t=null;n||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),C=this.getCustomFonts();if(q&&0<C.length){var A=y.ownerDocument,E=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"style"):A.createElement("style");
+function(b,d,c,f,e,g,l,m,k,n,q,p,u,v){var x=null,t=null;p||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),C=this.getCustomFonts();if(q&&0<C.length){var A=y.ownerDocument,E=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"style"):A.createElement("style");
null!=A.setAttributeNS?E.setAttributeNS("type","text/css"):E.setAttribute("type","text/css");for(var N="",B="",G=0;G<C.length;G++){var F=C[G].name,D=C[G].url;Graph.isCssFontUrl(D)?N+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+F+'";\nsrc: url("'+D+'");\n}\n'}E.appendChild(A.createTextNode(N+B));y.getElementsByTagName("defs")[0].appendChild(E)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return y};var H=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
function(){var b=H.apply(this,arguments);if(this.mathEnabled){var d=b.drawText;b.drawText=function(b,c){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var f=b.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var e=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=f.innerHTML&&(e=b.text.value,b.text.value=
f.innerHTML,d.apply(this,arguments),b.text.value=e)}}else d.apply(this,arguments)}}return b};var K=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){K.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=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;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};
var A=Graph.prototype.refresh;Graph.prototype.refresh=function(){A.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var M=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){M.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==
b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=function(b,d){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var c=!1,f=0,e=0,g=mxUtils.bind(this,function(){c||
-(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),k=mxUtils.bind(this,function(){0<f&&f--;0==f&&m()}),m=mxUtils.bind(this,function(){if(e<b.length){var c=this.stoppingCustomActions,p=b[e++],q=[];if(null!=p.open)if(l(),this.isCustomLink(p.open)){if(!this.customLinkClicked(p.open))return}else this.openLink(p.open);null==p.wait||c||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;k()}),
-f++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=p.wait?parseInt(p.wait):1E3),l());null!=p.opacity&&null!=p.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(p.opacity,!0)),p.opacity.value);null!=p.fadeIn&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeIn,!0)),0,1,k,c?0:p.fadeIn.delay));null!=p.fadeOut&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeOut,!0)),1,0,k,c?0:p.fadeOut.delay));
-null!=p.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeIn,!0),!0)));null!=p.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeOut,!0),!1)));null!=p.toggle&&(g(),this.toggleCells(this.getCellsForAction(p.toggle,!0)));if(null!=p.show){g();var n=this.getCellsForAction(p.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(n),1);this.setCellsVisible(n,!0)}null!=p.hide&&(g(),n=this.getCellsForAction(p.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(n),
-0),this.setCellsVisible(n,!1));null!=p.toggleStyle&&null!=p.toggleStyle.key&&(g(),this.toggleCellStyles(p.toggleStyle.key,null!=p.toggleStyle.defaultValue?p.toggleStyle.defaultValue:"0",this.getCellsForAction(p.toggleStyle,!0)));null!=p.style&&null!=p.style.key&&(g(),this.setCellStyles(p.style.key,p.style.value,this.getCellsForAction(p.style,!0)));n=[];null!=p.select&&this.isEnabled()&&(n=this.getCellsForAction(p.select),this.setSelectionCells(n));null!=p.highlight&&(n=this.getCellsForAction(p.highlight),
-this.highlightCells(n,p.highlight.color,p.highlight.duration,p.highlight.opacity));null!=p.scroll&&(n=this.getCellsForAction(p.scroll));null!=p.viewbox&&this.fitWindow(p.viewbox,p.viewbox.border);0<n.length&&this.scrollCellToVisible(n[0]);if(null!=p.tags){n=[];null!=p.tags.hidden&&(n=n.concat(p.tags.hidden));if(null!=p.tags.visible)for(var u=this.getAllTags(),v=0;v<u.length;v++)0>mxUtils.indexOf(p.tags.visible,u[v])&&0>mxUtils.indexOf(n,u[v])&&n.push(u[v]);this.hiddenTags=n;this.refresh()}0<q.length&&
-(f++,this.executeAnimations(q,k,c?1:p.steps,c?0:p.delay));0==f?m():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=d&&d()});m()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){var c=this.getLinkForCell(d);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(b,c));if(this.isHtmlLabel(d)){var f=document.createElement("div");f.innerHTML=this.sanitizeHtml(this.getLabel(d));for(var e=f.getElementsByTagName("a"),g=!1,l=0;l<
+(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),m=mxUtils.bind(this,function(){0<f&&f--;0==f&&k()}),k=mxUtils.bind(this,function(){if(e<b.length){var c=this.stoppingCustomActions,n=b[e++],q=[];if(null!=n.open)if(l(),this.isCustomLink(n.open)){if(!this.customLinkClicked(n.open))return}else this.openLink(n.open);null==n.wait||c||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;m()}),
+f++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=n.wait?parseInt(n.wait):1E3),l());null!=n.opacity&&null!=n.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(n.opacity,!0)),n.opacity.value);null!=n.fadeIn&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeIn,!0)),0,1,m,c?0:n.fadeIn.delay));null!=n.fadeOut&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeOut,!0)),1,0,m,c?0:n.fadeOut.delay));
+null!=n.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeIn,!0),!0)));null!=n.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeOut,!0),!1)));null!=n.toggle&&(g(),this.toggleCells(this.getCellsForAction(n.toggle,!0)));if(null!=n.show){g();var p=this.getCellsForAction(n.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(p),1);this.setCellsVisible(p,!0)}null!=n.hide&&(g(),p=this.getCellsForAction(n.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(p),
+0),this.setCellsVisible(p,!1));null!=n.toggleStyle&&null!=n.toggleStyle.key&&(g(),this.toggleCellStyles(n.toggleStyle.key,null!=n.toggleStyle.defaultValue?n.toggleStyle.defaultValue:"0",this.getCellsForAction(n.toggleStyle,!0)));null!=n.style&&null!=n.style.key&&(g(),this.setCellStyles(n.style.key,n.style.value,this.getCellsForAction(n.style,!0)));p=[];null!=n.select&&this.isEnabled()&&(p=this.getCellsForAction(n.select),this.setSelectionCells(p));null!=n.highlight&&(p=this.getCellsForAction(n.highlight),
+this.highlightCells(p,n.highlight.color,n.highlight.duration,n.highlight.opacity));null!=n.scroll&&(p=this.getCellsForAction(n.scroll));null!=n.viewbox&&this.fitWindow(n.viewbox,n.viewbox.border);0<p.length&&this.scrollCellToVisible(p[0]);if(null!=n.tags){p=[];null!=n.tags.hidden&&(p=p.concat(n.tags.hidden));if(null!=n.tags.visible)for(var u=this.getAllTags(),v=0;v<u.length;v++)0>mxUtils.indexOf(n.tags.visible,u[v])&&0>mxUtils.indexOf(p,u[v])&&p.push(u[v]);this.hiddenTags=p;this.refresh()}0<q.length&&
+(f++,this.executeAnimations(q,m,c?1:n.steps,c?0:n.delay));0==f?k():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=d&&d()});k()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){var c=this.getLinkForCell(d);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(b,c));if(this.isHtmlLabel(d)){var f=document.createElement("div");f.innerHTML=this.sanitizeHtml(this.getLabel(d));for(var e=f.getElementsByTagName("a"),g=!1,l=0;l<
e.length;l++)c=e[l].getAttribute("href"),null!=c&&"data:action/json,"==c.substring(0,17)&&(e[l].setAttribute("href",this.updateCustomLink(b,c)),g=!0);g&&this.labelChanged(d,f.innerHTML)}};Graph.prototype.updateCustomLink=function(b,d){if("data:action/json,"==d.substring(0,17))try{var c=JSON.parse(d.substring(17));null!=c.actions&&(this.updateCustomLinkActions(b,c.actions),d="data:action/json,"+JSON.stringify(c))}catch(Z){}return d};Graph.prototype.updateCustomLinkActions=function(b,d){for(var c=0;c<
d.length;c++){var f=d[c],e;for(e in f)this.updateCustomLinkAction(b,f[e],"cells"),this.updateCustomLinkAction(b,f[e],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(b,d,c){if(null!=d&&null!=d[c]){for(var f=[],e=0;e<d[c].length;e++)if("*"==d[c][e])f.push(d[c][e]);else{var g=b[d[c][e]];null!=g?""!=g&&f.push(g):f.push(d[c][e])}d[c]=f}};Graph.prototype.getCellsForAction=function(b,d){var c=this.getCellsById(b.cells).concat(this.getCellsForTags(b.tags,null,d));if(null!=b.excludeCells){for(var f=
[],e=0;e<c.length;e++)0>b.excludeCells.indexOf(c[e].id)&&f.push(c[e]);c=f}return c};Graph.prototype.getCellsById=function(b){var d=[];if(null!=b)for(var c=0;c<b.length;c++)if("*"==b[c])var f=this.model.getRoot(),d=d.concat(this.model.filterDescendants(function(b){return b!=f},f));else{var e=this.model.getCell(b[c]);null!=e&&d.push(e)}return d};var Q=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return Q.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};
-Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var d=0;d<b.length;d++)if(0>mxUtils.indexOf(this.hiddenTags,b[d]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,d,c,f){var e=[];if(null!=b){d=null!=d?d:this.model.getDescendants(this.model.getRoot());for(var g=0,l={},k=0;k<b.length;k++)0<b[k].length&&(l[b[k]]=!0,g++);for(k=0;k<d.length;k++)if(c&&this.model.getParent(d[k])==
-this.model.root||this.model.isVertex(d[k])||this.model.isEdge(d[k])){var m=this.getTagsForCell(d[k]),p=!1;if(0<m.length&&(m=m.split(" "),m.length>=b.length)){for(var q=p=0;q<m.length&&p<g;q++)null!=l[m[q]]&&p++;p=p==g}p&&(1!=f||this.isCellVisible(d[k]))&&e.push(d[k])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var d=null,c=[],f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]),
+Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var d=0;d<b.length;d++)if(0>mxUtils.indexOf(this.hiddenTags,b[d]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,d,c,f){var e=[];if(null!=b){d=null!=d?d:this.model.getDescendants(this.model.getRoot());for(var g=0,l={},m=0;m<b.length;m++)0<b[m].length&&(l[b[m]]=!0,g++);for(m=0;m<d.length;m++)if(c&&this.model.getParent(d[m])==
+this.model.root||this.model.isVertex(d[m])||this.model.isEdge(d[m])){var k=this.getTagsForCell(d[m]),n=!1;if(0<k.length&&(k=k.split(" "),k.length>=b.length)){for(var q=n=0;q<k.length&&n<g;q++)null!=l[k[q]]&&n++;n=n==g}n&&(1!=f||this.isCellVisible(d[m]))&&e.push(d[m])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var d=null,c=[],f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]),
c=[];if(0<e.length){for(var e=e.split(" "),g={},l=0;l<e.length;l++)if(null==d||null!=d[e[l]])g[e[l]]=!0,c.push(e[l]);d=g}else return[]}return c};Graph.prototype.getTagsForCells=function(b){for(var d=[],c={},f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]);if(0<e.length)for(var e=e.split(" "),g=0;g<e.length;g++)null==c[e[g]]&&(c[e[g]]=!0,d.push(e[g]))}return d};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,d){if(0<
-b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){for(var f=this.getTagsForCell(b[c]),e=f.split(" "),g=!1,l=0;l<d.length;l++){var k=mxUtils.trim(d[l]);""!=k&&0>mxUtils.indexOf(e,k)&&(f=0<f.length?f+" "+k:k,g=!0)}g&&this.setAttributeForCell(b[c],"tags",f)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,d){if(0<b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var f=this.getTagsForCell(b[c]);if(0<f.length){for(var e=
-f.split(" "),g=!1,l=0;l<d.length;l++){var k=mxUtils.indexOf(e,d[l]);0<=k&&(e.splice(k,1),g=!0)}g&&this.setAttributeForCell(b[c],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!this.model.isVisible(b[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,d){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],d)}finally{this.model.endUpdate()}};
+b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){for(var f=this.getTagsForCell(b[c]),e=f.split(" "),g=!1,l=0;l<d.length;l++){var m=mxUtils.trim(d[l]);""!=m&&0>mxUtils.indexOf(e,m)&&(f=0<f.length?f+" "+m:m,g=!0)}g&&this.setAttributeForCell(b[c],"tags",f)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,d){if(0<b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var f=this.getTagsForCell(b[c]);if(0<f.length){for(var e=
+f.split(" "),g=!1,l=0;l<d.length;l++){var m=mxUtils.indexOf(e,d[l]);0<=m&&(e.splice(m,1),g=!0)}g&&this.setAttributeForCell(b[c],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!this.model.isVisible(b[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,d){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],d)}finally{this.model.endUpdate()}};
Graph.prototype.highlightCells=function(b,d,c,f){for(var e=0;e<b.length;e++)this.highlightCell(b[e],d,c,f)};Graph.prototype.highlightCell=function(b,d,c,f){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;b=this.view.getState(b);if(null!=b){var e=Math.max(5,mxUtils.getValue(b.style,mxConstants.STYLE_STROKEWIDTH,1)+4),g=new mxCellHighlight(this,d,e,!1);null!=f&&(g.opacity=f);g.highlight(b);window.setTimeout(function(){null!=g.shape&&(mxUtils.setPrefixedStyle(g.shape.node.style,"transition",
"all 1200ms ease-in-out"),g.shape.node.style.opacity=0);window.setTimeout(function(){g.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(b,d,c){c=null!=c?c:!1;var f=b.ownerDocument,e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");e.setAttribute("id",this.shadowId);var g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");g.setAttribute("in","SourceAlpha");g.setAttribute("stdDeviation",
this.svgShadowBlur);g.setAttribute("result","blur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");g.setAttribute("in","blur");g.setAttribute("dx",this.svgShadowSize);g.setAttribute("dy",this.svgShadowSize);g.setAttribute("result","offsetBlur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");g.setAttribute("flood-color",this.svgShadowColor);g.setAttribute("flood-opacity",
@@ -3313,123 +3314,123 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",
STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];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(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var T=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,f,e,g,l,k,m,p){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&
-mxStencilRegistry.getStencil(q)}return T.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,Math.min(k,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,g){var l=d.useCssTransforms,k=d.currentTranslate,m=d.currentScale,p=d.view.translate,q=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 n=d.getGraphBounds(),u=0,v=0,x=K.get(),t=1/d.pageScale,A=C.checked;if(A)var t=parseInt(M.value),N=parseInt(O.value),t=Math.min(x.height*N/(n.height/d.view.scale),x.width*t/(n.width/d.view.scale));else t=parseInt(y.value)/(100*d.pageScale),isNaN(t)&&(f=1/d.pageScale,y.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*f);x.height=Math.ceil(x.height*f);t*=f;!A&&d.pageVisible?(n=d.getPageLayout(),u-=n.x*x.width,v-=n.y*x.height):
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var T=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,f,e,g,l,m,k,n){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&
+mxStencilRegistry.getStencil(q)}return T.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,Math.min(m,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(m,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,g){var l=d.useCssTransforms,m=d.currentTranslate,k=d.currentScale,n=d.view.translate,q=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 p=d.getGraphBounds(),u=0,v=0,x=K.get(),t=1/d.pageScale,A=C.checked;if(A)var t=parseInt(M.value),N=parseInt(O.value),t=Math.min(x.height*N/(p.height/d.view.scale),x.width*t/(p.width/d.view.scale));else t=parseInt(y.value)/(100*d.pageScale),isNaN(t)&&(f=1/d.pageScale,y.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*f);x.height=Math.ceil(x.height*f);t*=f;!A&&d.pageVisible?(p=d.getPageLayout(),u-=p.x*x.width,v-=p.y*x.height):
A=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,A);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());var G=c.writeHead;c.writeHead=function(c){G.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),
c.writeln("</style>"));null!=b.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(b.editor.fontCss),c.writeln("</style>"));for(var f=d.getCustomFonts(),e=0;e<f.length;e++){var g=f[e].name,l=f[e].url;Graph.isCssFontUrl(l)?c.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(c.writeln('<style type="text/css">'),c.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(g)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),c.writeln("</style>"))}};
-if("undefined"!==typeof MathJax){var D=c.renderPage;c.renderPage=function(d,c,f,e,g,l){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var m=D.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
+if("undefined"!==typeof MathJax){var D=c.renderPage;c.renderPage=function(d,c,f,e,g,l){var m=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var k=D.apply(this,arguments);mxClient.NO_FO=m;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:k.className="geDisableMathJax";return k}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
e.refresh());c.open(null,null,g,!0);e.enableFlowAnimation=v;null!=u&&(e.stylesheet=u,e.refresh())}else{x=d.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=A;c.appendGraph(d,t,u,v,g,!0);g=d.getCustomFonts();if(null!=c.wnd)for(u=0;u<g.length;u++)v=g[u].name,A=g[u].url,Graph.isCssFontUrl(A)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(A)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),
-c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(A)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=k,d.currentScale=m,d.view.translate=p,d.view.scale=q);return c}var f=parseInt(H.value)/100;isNaN(f)&&(f=1,H.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,k=v.value,p=!q.checked,
-n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,C.checked,M.value,O.value,parseInt(y.value)/100,parseInt(H.value)/100,K.get());else{p&&(p=l==m&&k==m);if(!p&&null!=b.pages&&b.pages.length){var x=0,p=b.pages.length-1;q.checked||(x=parseInt(l)-1,p=parseInt(k)-1);for(var t=x;t<=p;t++){var A=b.pages[t],l=A==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=!1,N=null,G=null;null==A.viewState&&null==A.root&&b.updatePageRoot(A);null!=A.viewState&&
-(k=A.viewState.pageVisible,x=A.viewState.mathEnabled,N=A.viewState.background,G=A.viewState.backgroundImage,l.extFonts=A.viewState.extFonts);l.background=N;l.backgroundImage=null!=G?new mxImage(G.src,G.width,G.height):null;l.pageVisible=k;l.mathEnabled=x;var D=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?A.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:D.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(A);l.model.setRoot(A.root)}n=
-c(l,n,t!=p);l!=e&&l.container.parentNode.removeChild(l.container)}}else n=c(e);null==n?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(n.mathEnabled&&(p=n.wnd.document,d&&(n.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),n.closeDocument(),!n.mathEnabled&&d&&PrintDialog.printPreview(n));null!=g&&(e.stylesheet=g,e.refresh())}}var e=b.editor.graph,g=document.createElement("div"),l=document.createElement("h3");
-l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));g.appendChild(l);var k=1,m=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("printAllPages"));p.appendChild(l);mxUtils.br(p);var n=q.cloneNode(!0);q.setAttribute("checked","checked");n.setAttribute("value","range");p.appendChild(n);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");p.appendChild(l);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);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("to"));p.appendChild(l);var v=u.cloneNode(!0);p.appendChild(v);mxEvent.addListener(u,"focus",function(){n.checked=!0});mxEvent.addListener(v,"focus",function(){n.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(k=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){m=l+1;u.value=m;v.value=m;break}u.setAttribute("max",k);v.setAttribute("max",k);b.isPagesEnabled()?1<k&&(g.appendChild(p),
-n.checked=!0):n.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");x.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));x.appendChild(l);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";x.appendChild(y);
-mxEvent.addListener(y,"focus",function(){t.checked=!0});g.appendChild(x);var p=p.cloneNode(!1),C=t.cloneNode(!0);C.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(C);p.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var A=document.createElement("tbody"),N=document.createElement("tr"),G=N.cloneNode(!0),D=document.createElement("td"),
+c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(A)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=m,d.currentScale=k,d.view.translate=n,d.view.scale=q);return c}var f=parseInt(H.value)/100;isNaN(f)&&(f=1,H.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,m=v.value,n=!q.checked,
+p=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,m,C.checked,M.value,O.value,parseInt(y.value)/100,parseInt(H.value)/100,K.get());else{n&&(n=l==k&&m==k);if(!n&&null!=b.pages&&b.pages.length){var x=0,n=b.pages.length-1;q.checked||(x=parseInt(l)-1,n=parseInt(m)-1);for(var t=x;t<=n;t++){var A=b.pages[t],l=A==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),m=!0,x=!1,N=null,G=null;null==A.viewState&&null==A.root&&b.updatePageRoot(A);null!=A.viewState&&
+(m=A.viewState.pageVisible,x=A.viewState.mathEnabled,N=A.viewState.background,G=A.viewState.backgroundImage,l.extFonts=A.viewState.extFonts);l.background=N;l.backgroundImage=null!=G?new mxImage(G.src,G.width,G.height):null;l.pageVisible=m;l.mathEnabled=x;var D=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?A.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:D.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(A);l.model.setRoot(A.root)}p=
+c(l,p,t!=n);l!=e&&l.container.parentNode.removeChild(l.container)}}else p=c(e);null==p?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(p.mathEnabled&&(n=p.wnd.document,d&&(p.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),p.closeDocument(),!p.mathEnabled&&d&&PrintDialog.printPreview(p));null!=g&&(e.stylesheet=g,e.refresh())}}var e=b.editor.graph,g=document.createElement("div"),l=document.createElement("h3");
+l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));g.appendChild(l);var m=1,k=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");n.appendChild(q);l=document.createElement("span");
+mxUtils.write(l,mxResources.get("printAllPages"));n.appendChild(l);mxUtils.br(n);var p=q.cloneNode(!0);q.setAttribute("checked","checked");p.setAttribute("value","range");n.appendChild(p);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");n.appendChild(l);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";n.appendChild(u);l=document.createElement("span");
+mxUtils.write(l,mxResources.get("to"));n.appendChild(l);var v=u.cloneNode(!0);n.appendChild(v);mxEvent.addListener(u,"focus",function(){p.checked=!0});mxEvent.addListener(v,"focus",function(){p.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(m=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){k=l+1;u.value=k;v.value=k;break}u.setAttribute("max",m);v.setAttribute("max",m);b.isPagesEnabled()?1<m&&(g.appendChild(n),
+p.checked=!0):p.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");x.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));x.appendChild(l);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";x.appendChild(y);
+mxEvent.addListener(y,"focus",function(){t.checked=!0});g.appendChild(x);var n=n.cloneNode(!1),C=t.cloneNode(!0);C.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(C);n.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var A=document.createElement("tbody"),N=document.createElement("tr"),G=N.cloneNode(!0),D=document.createElement("td"),
Q=D.cloneNode(!0),E=D.cloneNode(!0),J=D.cloneNode(!0),B=D.cloneNode(!0),T=D.cloneNode(!0);D.style.textAlign="right";J.style.textAlign="right";mxUtils.write(D,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";Q.appendChild(M);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));E.appendChild(l);mxUtils.write(J,
-mxResources.get("fitToBy"));var O=M.cloneNode(!0);B.appendChild(O);mxEvent.addListener(M,"focus",function(){C.checked=!0});mxEvent.addListener(O,"focus",function(){C.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));T.appendChild(l);N.appendChild(D);N.appendChild(Q);N.appendChild(E);G.appendChild(J);G.appendChild(B);G.appendChild(T);A.appendChild(N);A.appendChild(G);x.appendChild(A);p.appendChild(x);g.appendChild(p);p=document.createElement("div");l=
-document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));p.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var K=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));p.appendChild(l);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";
-H.setAttribute("value","100 %");H.style.width="60px";p.appendChild(H);g.appendChild(p);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&l.appendChild(p);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=
-mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)}),x.className="geBtn",l.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";l.appendChild(x);b.editor.cancelFirst||l.appendChild(p);g.appendChild(l);this.container=g};var N=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
+mxResources.get("fitToBy"));var O=M.cloneNode(!0);B.appendChild(O);mxEvent.addListener(M,"focus",function(){C.checked=!0});mxEvent.addListener(O,"focus",function(){C.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));T.appendChild(l);N.appendChild(D);N.appendChild(Q);N.appendChild(E);G.appendChild(J);G.appendChild(B);G.appendChild(T);A.appendChild(N);A.appendChild(G);x.appendChild(A);n.appendChild(x);g.appendChild(n);n=document.createElement("div");l=
+document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));n.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var K=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));n.appendChild(l);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";
+H.setAttribute("value","100 %");H.style.width="60px";n.appendChild(H);g.appendChild(n);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst&&l.appendChild(n);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=
+mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)}),x.className="geBtn",l.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";l.appendChild(x);b.editor.cancelFirst||l.appendChild(n);g.appendChild(l);this.container=g};var N=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}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)}}else N.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 O=document.createElement("canvas"),ha=new Image;ha.onload=function(){try{O.getContext("2d").drawImage(ha,0,0);var b=O.toDataURL("image/png");Editor.prototype.useCanvasForExport=
null!=b&&6<b.length}catch(B){}};ha.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(E){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);null!=k.mathEnabled&&(k.mathEnabled=!k.mathEnabled);null!=k.shadowVisible&&(k.shadowVisible=!k.shadowVisible);return k};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.4.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.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=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.4.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.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.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";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(b,c,e,g,k,q,n){q=null!=q?q:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
-"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";k=null!=k?k:Error(b);(new Image).src=d+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
-encodeURIComponent(e)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(y){}try{n||null==window.console||console.error(q,b,c,e,g,k)}catch(y){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);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!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
+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(b,c,e,g,m,k,p){k=null!=k?k:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
+"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(b);(new Image).src=d+"/log?severity="+k+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
+encodeURIComponent(e)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(y){}try{p||null==window.console||console.error(k,b,c,e,g,m)}catch(y){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);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!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
"")}catch(l){}};EditorUi.sendReport=function(b,c){if("1"==urlParams.dev)EditorUi.debug("sendReport",b);else if(EditorUi.enableLogging)try{c=null!=c?c:5E4,b.length>c&&(b=b.substring(0,c)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(b))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var b=[(new Date).toISOString()],c=0;c<arguments.length;c++)null!=
arguments[c]&&b.push(arguments[c]);console.log.apply(console,b)}}catch(l){}};EditorUi.parsePng=function(b,c,e){function d(b,d){var c=g;g+=d;return b.substring(c,g)}function f(b){b=d(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var g=0;if(d(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(d(b,4),"IHDR"!=d(b,4))null!=e&&e();else{d(b,17);do{e=f(b);var l=d(b,4);if(null!=c&&c(g-8,l,e))break;value=d(b,e);d(b,4);if("IEND"==
l)break}while(e)}};EditorUi.removeChildNodes=function(b){for(;null!=b.firstChild;)b.removeChild(b.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 b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(p){}try{var c=document.createElement("canvas"),e=new Image;e.onload=function(){try{c.getContext("2d").drawImage(e,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(q){}};e.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{c=
-document.createElement("canvas");c.width=c.height=1;var g=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==g.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(b,c,e){return this.editor.graph.openLink(b,c,e)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,e){localStorage.setItem(b,c);null!=e&&e()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(m){}try{var c=document.createElement("canvas"),e=new Image;e.onload=function(){try{c.getContext("2d").drawImage(e,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(n){}};e.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}try{c=
+document.createElement("canvas");c.width=c.height=1;var g=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==g.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(b,c,e){return this.editor.graph.openLink(b,c,e)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,e){localStorage.setItem(b,c);null!=e&&e()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
c()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(b){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(b){return this.isOfflineApp()||!navigator.onLine||!b&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};
-EditorUi.prototype.createSpinner=function(b,c,e){var d=null==b||null==c;e=null!=e?e:24;var f=new Spinner({lines:12,length:e,width:Math.round(e/3),radius:Math.round(e/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=f.spin;f.spin=function(e,l){var k=!1;this.active||(g.call(this,e),this.active=!0,null!=l&&(d&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),k=document.createElement("div"),
-k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily=Editor.defaultHtmlFont,k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,b)+"px",k.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(k.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&(l+="..."),k.innerHTML=l,e.appendChild(k),f.status=k),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(e,l)}));this.stop();return b}),k=!0);return k};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&null!=f.status.parentNode&&f.status.parentNode.removeChild(f.status);f.status=null};f.pause=function(){return function(){}};
-return f};EditorUi.prototype.isCompatibleString=function(b){try{var d=mxUtils.parseXml(b),c=this.editor.extractGraphModel(d.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
+EditorUi.prototype.createSpinner=function(b,c,e){var d=null==b||null==c;e=null!=e?e:24;var f=new Spinner({lines:12,length:e,width:Math.round(e/3),radius:Math.round(e/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=f.spin;f.spin=function(e,l){var m=!1;this.active||(g.call(this,e),this.active=!0,null!=l&&(d&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),m=document.createElement("div"),
+m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.background="#4B4243",m.style.color="white",m.style.fontFamily=Editor.defaultHtmlFont,m.style.fontSize="9pt",m.style.padding="6px",m.style.paddingLeft="10px",m.style.paddingRight="10px",m.style.zIndex=2E9,m.style.left=Math.max(0,b)+"px",m.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(m.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(m.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&(l+="..."),m.innerHTML=l,e.appendChild(m),f.status=m),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(e,l)}));this.stop();return b}),m=!0);return m};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&null!=f.status.parentNode&&f.status.parentNode.removeChild(f.status);f.status=null};f.pause=function(){return function(){}};
+return f};EditorUi.prototype.isCompatibleString=function(b){try{var d=mxUtils.parseXml(b),c=this.editor.extractGraphModel(d.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
3==b.charCodeAt(2)&&4==b.charCodeAt(3)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&3==b.charCodeAt(2)&&6==b.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||60==b.charCodeAt(0)&&63==b.charCodeAt(1)&&120==b.charCodeAt(2)&&109==b.charCodeAt(3)&&108==b.charCodeAt(3))};EditorUi.prototype.isPngData=
-function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var c=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var e=c.getFunction,g=this.editor.graph,k=this;c.getFunction=function(b){if(g.isSelectionEmpty()&&null!=k.pages&&0<k.pages.length){var d=
-k.getSelectedPageIndex();if(mxEvent.isShiftDown(b)){if(37==b.keyCode)return function(){0<d&&k.movePage(d,d-1)};if(38==b.keyCode)return function(){0<d&&k.movePage(d,0)};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.movePage(d,d+1)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.movePage(d,k.pages.length-1)}}else if(mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)){if(37==b.keyCode)return function(){0<d&&k.selectNextPage(!1)};if(38==b.keyCode)return function(){0<
-d&&k.selectPage(k.pages[0])};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.selectNextPage(!0)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.selectPage(k.pages[k.pages.length-1])}}}return e.apply(this,arguments)}}return c};var c=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=c.apply(this,arguments);if(null==d)try{var e=b.indexOf("&lt;mxfile ");if(0<=e){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>e&&(d=b.substring(e,g+
-15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var k=mxUtils.parseXml(b),q=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=q?mxUtils.getXml(q):""}catch(v){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
+function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var c=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var e=c.getFunction,g=this.editor.graph,m=this;c.getFunction=function(b){if(g.isSelectionEmpty()&&null!=m.pages&&0<m.pages.length){var d=
+m.getSelectedPageIndex();if(mxEvent.isShiftDown(b)){if(37==b.keyCode)return function(){0<d&&m.movePage(d,d-1)};if(38==b.keyCode)return function(){0<d&&m.movePage(d,0)};if(39==b.keyCode)return function(){d<m.pages.length-1&&m.movePage(d,d+1)};if(40==b.keyCode)return function(){d<m.pages.length-1&&m.movePage(d,m.pages.length-1)}}else if(mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)){if(37==b.keyCode)return function(){0<d&&m.selectNextPage(!1)};if(38==b.keyCode)return function(){0<
+d&&m.selectPage(m.pages[0])};if(39==b.keyCode)return function(){d<m.pages.length-1&&m.selectNextPage(!0)};if(40==b.keyCode)return function(){d<m.pages.length-1&&m.selectPage(m.pages[m.pages.length-1])}}}return e.apply(this,arguments)}}return c};var c=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=c.apply(this,arguments);if(null==d)try{var e=b.indexOf("&lt;mxfile ");if(0<=e){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>e&&(d=b.substring(e,g+
+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(b),k=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=k?mxUtils.getXml(k):""}catch(u){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b){d=this.editor.graph;d.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,e=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var g=e.length-
1;0<=g;g--){var k=this.updatePageRoot(new DiagramPage(e[g]));null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[g+1]));d.model.execute(new ChangePage(this,k,0==g?k:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
-this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,k,q,n,u,t,x,D){c=null!=c?c:this.editor.graph;k=null!=k?k:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(D){var m=
-b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());m.appendChild(b)}else{m=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(m);if(Graph.decompress(l)!=m)return m;m=b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());mxUtils.setTextContent(m,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(m)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
+this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,m,k,p,v,t,x,D){c=null!=c?c:this.editor.graph;m=null!=m?m:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(D){var n=
+b.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());n.appendChild(b)}else{n=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(n);if(Graph.decompress(l)!=n)return n;n=b.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());mxUtils.setTextContent(n,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(n)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type")):(l.removeAttribute("userAgent"),l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("pages"),l.removeAttribute("type"),mxClient.IS_CHROMEAPP?l.setAttribute("host","Chrome"):EditorUi.isElectronApp?l.setAttribute("host","Electron"):l.setAttribute("host",window.location.hostname),l.setAttribute("modified",(new Date).toISOString()),l.setAttribute("agent",navigator.appVersion),l.setAttribute("version",
-EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));D=D?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!q&&!k&&(n||null!=e&&/(\.html)$/i.test(e.getTitle())))D=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(q||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
-App.MODE_BROWSER||(g=null),D=this.getEmbeddedSvg(D,c,g,null,u,t,f);return D};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
+EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));D=D?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!k&&!m&&(p||null!=e&&/(\.html)$/i.test(e.getTitle())))D=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(k||!m&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
+App.MODE_BROWSER||(g=null),D=this.getEmbeddedSvg(D,c,g,null,v,t,f);return D};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
null==c||e?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));d.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var f=this.pages[c],l=f.node;if(f!=this.currentPage)if(f.needsUpdate){var k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root));this.editor.graph.saveViewState(f.viewState,
k,null,g);EditorUi.removeChildNodes(l);mxUtils.setTextContent(l,Graph.compressNode(k));delete f.needsUpdate}else g&&(this.updatePageRoot(f),null!=f.viewState.backgroundImage&&(null!=f.viewState.backgroundImage.originalSrc?f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.originalSrc,f):Graph.isPageLink(f.viewState.backgroundImage.src)&&(f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.src,f))),null!=f.viewState.backgroundImage&&
null!=f.viewState.backgroundImage.originalSrc&&(k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root)),this.editor.graph.saveViewState(f.viewState,k,null,g),l=l.cloneNode(!1),mxUtils.setTextContent(l,Graph.compressNode(k))));b(l)}return d};EditorUi.prototype.anonymizeString=function(b,c){for(var d=[],f=0;f<b.length;f++){var e=b.charAt(f);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(c?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(b){if(null!=b[EditorUi.DIFF_INSERT])for(var d=0;d<b[EditorUi.DIFF_INSERT].length;d++)try{var c=mxUtils.parseXml(b[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));
-b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(q){b[EditorUi.DIFF_INSERT][d].data=q.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var e in b[EditorUi.DIFF_UPDATE]){var g=b[EditorUi.DIFF_UPDATE][e];null!=g.name&&(g.name=this.anonymizeString(g.name));null!=g.cells&&(d=mxUtils.bind(this,function(b){var d=g.cells[b];if(null!=d){for(var c in d)null!=d[c].value&&(d[c].value="["+d[c].value.length+"]"),null!=d[c].xmlValue&&(d[c].xmlValue="["+d[c].xmlValue.length+"]"),null!=d[c].style&&(d[c].style=
+b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(n){b[EditorUi.DIFF_INSERT][d].data=n.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var e in b[EditorUi.DIFF_UPDATE]){var g=b[EditorUi.DIFF_UPDATE][e];null!=g.name&&(g.name=this.anonymizeString(g.name));null!=g.cells&&(d=mxUtils.bind(this,function(b){var d=g.cells[b];if(null!=d){for(var c in d)null!=d[c].value&&(d[c].value="["+d[c].value.length+"]"),null!=d[c].xmlValue&&(d[c].xmlValue="["+d[c].xmlValue.length+"]"),null!=d[c].style&&(d[c].style=
"["+d[c].style.length+"]"),0==Object.keys(d[c]).length&&delete d[c];0==Object.keys(d).length&&delete g.cells[b]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(g.cells).length&&delete g.cells);0==Object.keys(g).length&&delete b[EditorUi.DIFF_UPDATE][e]}0==Object.keys(b[EditorUi.DIFF_UPDATE]).length&&delete b[EditorUi.DIFF_UPDATE]}return b};EditorUi.prototype.anonymizeAttributes=function(b,c){if(null!=b.attributes)for(var d=0;d<b.attributes.length;d++)"as"!=b.attributes[d].name&&
b.setAttribute(b.attributes[d].name,this.anonymizeString(b.attributes[d].value,c));if(null!=b.childNodes)for(d=0;d<b.childNodes.length;d++)this.anonymizeAttributes(b.childNodes[d],c)};EditorUi.prototype.anonymizeNode=function(b,c){for(var d=b.getElementsByTagName("mxCell"),f=0;f<d.length;f++)null!=d[f].getAttribute("value")&&d[f].setAttribute("value","["+d[f].getAttribute("value").length+"]"),null!=d[f].getAttribute("xmlValue")&&d[f].setAttribute("xmlValue","["+d[f].getAttribute("xmlValue").length+
"]"),null!=d[f].getAttribute("style")&&d[f].setAttribute("style","["+d[f].getAttribute("style").length+"]"),null!=d[f].parentNode&&"root"!=d[f].parentNode.nodeName&&null!=d[f].parentNode.parentNode&&(d[f].setAttribute("id",d[f].parentNode.getAttribute("id")),d[f].parentNode.parentNode.replaceChild(d[f],d[f].parentNode));return b};EditorUi.prototype.synchronizeCurrentFile=function(b){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!b&&d.invalidChecksum?
-d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,g,k,q,n,
-u,t,x,D){k=null!=k?k:!0;q=null!=q?q:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet());d.setBackgroundImage=this.editor.graph.setBackgroundImage;var m=this.pages[0];this.currentPage==m?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=m.viewState&&
-null!=m.viewState&&d.setBackgroundImage(m.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?m.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}}n=null!=n?n:this.getXmlFileData(k,q,x,D);t=null!=t?t:this.getCurrentFile();b=this.createFileData(n,d,t,window.location.href,b,c,e,g,k,u,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,k,
-q){q=null!=q?q:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=q?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;q=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==k&&(c=this.getBasenames().join(";"),0<c.length&&(f=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",q);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit",
-"0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=g&&b.setAttribute("edit",g));null!=k&&(k=k.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";g=Graph.compress(b);Graph.decompress(g)!=b&&(g=encodeURIComponent(b));return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+
-"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+"</head>\n<body"+(null==k&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+g+"</div>\n</div>\n"+(null==k?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,g,k){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(b),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage));
+d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,g,m,k,p,
+v,t,x,D){m=null!=m?m:!0;k=null!=k?k:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet());d.setBackgroundImage=this.editor.graph.setBackgroundImage;var n=this.pages[0];this.currentPage==n?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=n.viewState&&
+null!=n.viewState&&d.setBackgroundImage(n.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?n.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(n.root)}}p=null!=p?p:this.getXmlFileData(m,k,x,D);t=null!=t?t:this.getCurrentFile();b=this.createFileData(p,d,t,window.location.href,b,c,e,g,m,v,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,m,
+k){k=null!=k?k:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=k?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;k=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==m&&(c=this.getBasenames().join(";"),0<c.length&&(f=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",k);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit",
+"0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=g&&b.setAttribute("edit",g));null!=m&&(m=m.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";g=Graph.compress(b);Graph.decompress(g)!=b&&(g=encodeURIComponent(b));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=e?"<title>"+mxUtils.htmlEntities(e)+
+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+g+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,g,k){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(b),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage));
return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
mxUtils.htmlEntities(JSON.stringify(b))+'"></div>\n'+(null==k?'<script type="text/javascript" src="'+c+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(b){b=this.validateFileData(b);this.pages=this.fileNode=this.currentPage=null;b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:
null;var d=Editor.extractParserError(b,mxResources.get("invalidOrMissingFile"));if(d)throw Error(mxResources.get("notADiagramFile")+" ("+d+")");d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b&&"mxfile"==b.nodeName&&(d=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){var c=null;this.fileNode=b;this.pages=[];for(var e=0;e<d.length;e++)null==d[e].getAttribute("id")&&d[e].setAttribute("id",e),b=new DiagramPage(d[e]),
null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[e+1])),this.pages.push(b),null!=urlParams["page-id"]&&b.getId()==urlParams["page-id"]&&(c=b);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var g=urlParams["layer-ids"].split(" ");b={};for(e=0;e<g.length;e++)b[g[e]]=!0;for(var k=this.editor.graph.getModel(),n=k.getChildren(k.root),e=0;e<n.length;e++){var u=n[e];k.setVisible(u,b[u.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(b){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))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&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(b,c,e,g,k,q,n,u,t,x,D,C){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();
+[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var g=urlParams["layer-ids"].split(" ");b={};for(e=0;e<g.length;e++)b[g[e]]=!0;for(var k=this.editor.graph.getModel(),p=k.getChildren(k.root),e=0;e<p.length;e++){var v=p[e];k.setVisible(v,b[v.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(b){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))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&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(b,c,e,g,k,n,p,v,t,x,D,C){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();
var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&D?".drawio":"")+"."+b;if("xml"==b){var l=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,g,k,null,null,null,c);this.saveData(f,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,b,l,"text/html");else if("svg"!=b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?f=d+".png":"jpeg"==b&&(f=d+".jpg"),this.saveRequest(f,b,mxUtils.bind(this,function(d,
-c){try{var f=this.editor.graph.pageVisible;null!=q&&(this.editor.graph.pageVisible=q);var e=this.createDownloadRequest(d,b,g,c,n,k,u,t,x,D,C);this.editor.graph.pageVisible=f;return e}catch(ha){this.handleError(ha)}}));else{var m=null,p=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var v=this.editor.graph.background;
-if(n||v==mxConstants.NONE)v=null;var y=this.editor.graph.getSvg(v,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();p(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();p(b)}),g)}}catch(Q){this.handleError(Q)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,q,n,u,t,
-x,D){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==q?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==c&&(null!=D?m="&from="+D.from+"&to="+D.to:0==q&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){l="&from="+q;break}q=
-d.background;"png"!=c&&"pdf"!=c||!k?k||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+g+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+
-(null!=n?"&scale="+n:"")+(null!=u?"&border="+u:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,f=mxUtils.bind(this,function(f){var e=null!=b.data?b.data:"";null!=f&&0<f.length&&(0<e.length&&(e+="\n"),e+=f);f=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return d};this.fileLoaded(f);"csv"==
+c){try{var f=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var e=this.createDownloadRequest(d,b,g,c,p,k,v,t,x,D,C);this.editor.graph.pageVisible=f;return e}catch(ha){this.handleError(ha)}}));else{var m=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var u=this.editor.graph.background;
+if(p||u==mxConstants.NONE)u=null;var y=this.editor.graph.getSvg(u,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),g)}}catch(Q){this.handleError(Q)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,n,p,v,t,
+x,D){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==n?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==c&&(null!=D?m="&from="+D.from+"&to="+D.to:0==n&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){l="&from="+n;break}n=
+d.background;"png"!=c&&"pdf"!=c||!k?k||null!=n&&n!=mxConstants.NONE||(n="#ffffff"):n=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+g+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+
+(null!=p?"&scale="+p:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,f=mxUtils.bind(this,function(f){var e=null!=b.data?b.data:"";null!=f&&0<f.length&&(0<e.length&&(e+="\n"),e+=f);f=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return d};this.fileLoaded(f);"csv"==
b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var g=null!=b.interval?parseInt(b.interval):6E4,l=null,k=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){d===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),m()):this.handleError({message:mxResources.get("error")+
" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(k,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();k()}));m();k()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){f(b)}),mxUtils.bind(this,function(b){null!=e&&e(b)})):f("")};EditorUi.prototype.updateDiagram=function(b){function d(b){var d=new mxCellOverlay(b.image||g.warningImage,
-b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==b.nodeName)){var g=this.editor.graph,k=g.getModel();k.beginUpdate();var n=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var u=k.getCell(b.getAttribute("id"));if(null!=u){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;
-if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(u,x);else for(var D=x.attributes,C=0;C<D.length;C++)g.setAttributeForCell(u,D[C].nodeName,0<D[C].nodeValue.length?D[C].nodeValue:null)}}catch(Q){null!=window.console&&console.log("Error in value for "+u.id+": "+Q)}try{var G=b.getAttribute("style");null!=G&&g.model.setStyle(u,G)}catch(Q){null!=window.console&&console.log("Error in style for "+u.id+": "+Q)}try{var J=b.getAttribute("icon");if(null!=J){var L=0<J.length?JSON.parse(J):null;null!=
-L&&L.append||g.removeCellOverlays(u);null!=L&&g.addCellOverlay(u,d(L))}}catch(Q){null!=window.console&&console.log("Error in icon for "+u.id+": "+Q)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),K=g.getCellGeometry(u);if(null!=K){K=K.clone();for(key in H){var A=parseFloat(H[key]);"dx"==key?K.x+=A:"dy"==key?K.y+=A:"dw"==key?K.width+=A:"dh"==key?K.height+=A:K[key]=parseFloat(H[key])}g.model.setGeometry(u,K)}}}catch(Q){null!=window.console&&console.log("Error in icon for "+u.id+
-": "+Q)}}}else if("model"==b.nodeName){for(var M=b.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(b.firstChild)).decode(M,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(g.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))g.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(n=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):
-1);b=b.nextSibling}}finally{k.endUpdate()}null!=n&&this.chromelessResize&&this.chromelessResize(!0,n)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,f="",e=d.lastIndexOf(".");0<=e&&(f=d.substring(e),d=d.substring(0,e));if(c)var g=new Date,e=g.getFullYear(),k=g.getMonth()+1,n=g.getDate(),t=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+k+"-"+n+"-"+t+"-"+x+"-"+g));return d=mxResources.get("copyOf",[d])+f};
+b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==b.nodeName)){var g=this.editor.graph,k=g.getModel();k.beginUpdate();var p=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var v=k.getCell(b.getAttribute("id"));if(null!=v){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;
+if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(v,x);else for(var D=x.attributes,C=0;C<D.length;C++)g.setAttributeForCell(v,D[C].nodeName,0<D[C].nodeValue.length?D[C].nodeValue:null)}}catch(Q){null!=window.console&&console.log("Error in value for "+v.id+": "+Q)}try{var G=b.getAttribute("style");null!=G&&g.model.setStyle(v,G)}catch(Q){null!=window.console&&console.log("Error in style for "+v.id+": "+Q)}try{var J=b.getAttribute("icon");if(null!=J){var L=0<J.length?JSON.parse(J):null;null!=
+L&&L.append||g.removeCellOverlays(v);null!=L&&g.addCellOverlay(v,d(L))}}catch(Q){null!=window.console&&console.log("Error in icon for "+v.id+": "+Q)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),K=g.getCellGeometry(v);if(null!=K){K=K.clone();for(key in H){var A=parseFloat(H[key]);"dx"==key?K.x+=A:"dy"==key?K.y+=A:"dw"==key?K.width+=A:"dh"==key?K.height+=A:K[key]=parseFloat(H[key])}g.model.setGeometry(v,K)}}}catch(Q){null!=window.console&&console.log("Error in icon for "+v.id+
+": "+Q)}}}else if("model"==b.nodeName){for(var M=b.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(b.firstChild)).decode(M,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(g.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))g.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(p=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):
+1);b=b.nextSibling}}finally{k.endUpdate()}null!=p&&this.chromelessResize&&this.chromelessResize(!0,p)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,f="",e=d.lastIndexOf(".");0<=e&&(f=d.substring(e),d=d.substring(0,e));if(c)var g=new Date,e=g.getFullYear(),k=g.getMonth()+1,p=g.getDate(),t=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+k+"-"+p+"-"+t+"-"+x+"-"+g));return d=mxResources.get("copyOf",[d])+f};
EditorUi.prototype.fileLoaded=function(b,c){var d=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var f=!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);!c&&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();c||this.showSplash()});if(null!=b)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);
b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();b.isEditable()?b.isModified()?(b.addUnsavedStatus(),null!=b.backupPatch&&b.patch([b.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");
!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==b.getMode()||EditorUi.logEvent({category:b.getMode().toUpperCase()+"-OPEN-FILE-"+b.getHash(),action:"size_"+b.getSize(),label:"autosave_"+
-(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[b]);if(this.editor.editable&&this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.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!=b?b.getHash():"none"),action:"message_"+
-v.message,label:"stack_"+v.stack})}catch(u){}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()});c?g():this.handleError(v,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else e();return f};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,f=new mxGraphModel,e=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=
-0);for(var g=0;g<b.length;g++){this.updatePageRoot(b[g]);var k=b[g].node.cloneNode(!1);k.removeAttribute("name");f.root=b[g].root;var n=e.encode(f);this.editor.graph.saveViewState(b[g].viewState,n,!0);n.removeAttribute("pageWidth");n.removeAttribute("pageHeight");k.appendChild(n);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,f){return!f||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=
+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[b]);if(this.editor.editable&&this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.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!=b?b.getHash():"none"),action:"message_"+
+u.message,label:"stack_"+u.stack})}catch(v){}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()});c?g():this.handleError(u,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else e();return f};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,f=new mxGraphModel,e=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=
+0);for(var g=0;g<b.length;g++){this.updatePageRoot(b[g]);var k=b[g].node.cloneNode(!1);k.removeAttribute("name");f.root=b[g].root;var p=e.encode(f);this.editor.graph.saveViewState(b[g].viewState,p,!0);p.removeAttribute("pageWidth");p.removeAttribute("pageHeight");k.appendChild(p);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,f){return!f||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=
d&&"y"!=d&&"width"!=d&&"height"!=d?f&&"mxCell"==b.nodeName&&"previous"==d?null:c:Math.round(c)},c)<<0}return d};EditorUi.prototype.hashValue=function(b,c,e){var d=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(d^=this.hashValue(b.nodeName,c,e));if(null!=b.attributes){null!=e&&(e.attrCount+=b.attributes.length);for(var f=0;f<b.attributes.length;f++){var g=b.attributes[f].name,l=null!=c?c(b,g,b.attributes[f].value,
-!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,g,k,q,n){};
+!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,g,k,n,p){};
EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var d=mxUtils.createXmlDocument(),c=d.createElement("mxlibrary");
mxUtils.setTextContent(c,JSON.stringify(b));d.appendChild(c);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var d=this.sidebar.palettes[b];if(null!=d){for(var c=0;c<d.length;c++)d[c].parentNode.removeChild(d[c]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=
function(b){var d=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=b?b:d.firstChild.nextSibling.nextSibling;var c=d.lastChild,e=c.previousSibling;d.insertBefore(c,b);d.insertBefore(e,c)};EditorUi.prototype.loadLibrary=function(b,c){var d=mxUtils.parseXml(b.getData());if("mxlibrary"==d.documentElement.nodeName){var e=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(b,
e,d.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,c,e,g){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var d=this.sidebar.palettes[b.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var f=null,l=mxUtils.bind(this,
-function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var m=k.parentNode.previousSibling;g=m.getAttribute("title");null!=g&&0<
-g.length&&".scratchpad"!=b.title&&m.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";n.style.backgroundColor="inherit";m.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Editor.crossImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.position="relative";t.style.top=
-"2px";t.style.width="14px";t.style.cursor="pointer";t.style.margin="0 3px";Editor.isDarkMode()&&(t.style.filter="invert(100%)");var C=null;if(".scratchpad"!=b.title||this.closableScratchpad)n.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=C?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
-if(b.isEditable()){var G=this.editor.graph,J=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=J&&null!=J.parentNode&&J.parentNode.removeChild(J),J=t.cloneNode(!1),J.setAttribute("src",Editor.spinImage),J.setAttribute("title",mxResources.get("saving")),J.style.cursor="default",J.style.marginRight="2px",J.style.marginTop="-2px",n.insertBefore(J,n.firstChild),m.style.paddingRight=
-18*n.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=J&&null!=J.parentNode&&(J.parentNode.removeChild(J),m.style.paddingRight=18*n.childNodes.length+"px")})):null==C&&(C=t.cloneNode(!1),C.setAttribute("src",Editor.saveImage),C.setAttribute("title",mxResources.get("save")),n.insertBefore(C,n.firstChild),mxEvent.addListener(C,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
-C||b.isModified()||(m.style.paddingRight=18*n.childNodes.length+"px",C.parentNode.removeChild(C),C=null)});mxEvent.consume(d)})),m.style.paddingRight=18*n.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,g){b=G.cloneCells(mxUtils.sortCells(G.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=G.getCellGeometry(b[l]);null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
+function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var q=k.parentNode.previousSibling;g=q.getAttribute("title");null!=g&&0<
+g.length&&".scratchpad"!=b.title&&q.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.style.backgroundColor="inherit";q.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Editor.crossImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.position="relative";t.style.top=
+"2px";t.style.width="14px";t.style.cursor="pointer";t.style.margin="0 3px";Editor.isDarkMode()&&(t.style.filter="invert(100%)");var C=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=C?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
+if(b.isEditable()){var G=this.editor.graph,J=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=J&&null!=J.parentNode&&J.parentNode.removeChild(J),J=t.cloneNode(!1),J.setAttribute("src",Editor.spinImage),J.setAttribute("title",mxResources.get("saving")),J.style.cursor="default",J.style.marginRight="2px",J.style.marginTop="-2px",p.insertBefore(J,p.firstChild),q.style.paddingRight=
+18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=J&&null!=J.parentNode&&(J.parentNode.removeChild(J),q.style.paddingRight=18*p.childNodes.length+"px")})):null==C&&(C=t.cloneNode(!1),C.setAttribute("src",Editor.saveImage),C.setAttribute("title",mxResources.get("save")),p.insertBefore(C,p.firstChild),mxEvent.addListener(C,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
+C||b.isModified()||(q.style.paddingRight=18*p.childNodes.length+"px",C.parentNode.removeChild(C),C=null)});mxEvent.consume(d)})),q.style.paddingRight=18*p.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,g){b=G.cloneCells(mxUtils.sortCells(G.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=G.getCellGeometry(b[l]);null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
w:d.width,h:d.height};null!=g&&(b.title=g);c.push(b);H(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),A=mxUtils.bind(this,function(b){if(G.isSelectionEmpty())G.getRubberband().isActive()?(G.getRubberband().execute(b),G.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=G.getSelectionCells(),c=G.view.getBounds(d),e=G.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=G.view.translate.x;
c.y-=G.view.translate.y;K(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){G.isMouseDown&&null!=G.panningManager&&null!=G.graphHandler.first&&(G.graphHandler.suspend(),null!=G.graphHandler.hint&&(G.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",G.panningManager.stop(),G.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){G.isMouseDown&&null!=G.panningManager&&null!=G.graphHandler&&
(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,G.panningManager.stop(),G.graphHandler.reset(),G.isMouseDown=!1,G.autoScroll=!0,A(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){G.isMouseDown&&null!=G.graphHandler.first&&(G.graphHandler.resume(),null!=G.graphHandler.hint&&(G.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",G.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,
-"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,p,q,n,u,t){if(null!=d&&"image/"==e.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,p,q),d)],d[0].vertex=!0,K(d,new mxRectangle(0,0,p,q),b,mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,x=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=
-JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();v=!0}catch(V){}else if("mxfile"==g.documentElement.nodeName)try{for(var p=g.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(p[m])),n=this.editor.graph.getBoundingBoxFromGeometry(q);K(q,new mxRectangle(0,0,n.width,n.height),b)}v=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=t&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?this.importVisio(t,function(b){x(b,"text/xml")},null,n):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,n)&&null!=t?this.parseFile(t,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?x(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));n.insertBefore(t,n.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
-k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));n.insertBefore(g,n.firstChild);mxEvent.addListener(g,"click",A);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(b)})),n.insertBefore(g,n.firstChild))}m.appendChild(n);m.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),
+"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,n,q,p,u,v){if(null!=d&&"image/"==e.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,q),d)],d[0].vertex=!0,K(d,new mxRectangle(0,0,n,q),b,mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null);else{var t=!1,x=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=
+JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();t=!0}catch(V){}else if("mxfile"==g.documentElement.nodeName)try{for(var n=g.documentElement.getElementsByTagName("diagram"),m=0;m<n.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[m])),p=this.editor.graph.getBoundingBoxFromGeometry(q);K(q,new mxRectangle(0,0,p.width,p.height),b)}t=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(v,function(b){x(b,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,p)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?x(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));p.insertBefore(t,p.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
+k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));p.insertBefore(g,p.firstChild);mxEvent.addListener(g,"click",A);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(b)})),p.insertBefore(g,p.firstChild))}q.appendChild(p);q.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),
0<f.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(f,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.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="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):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
"#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",
@@ -3437,28 +3438,28 @@ endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPer
480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,d){if(!d){var c=new ChangePageSetup(this,null,b);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var d=new BackgroundImageDialog(this,b,c);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(b,c,e,g,k){b=new LibraryDialog(this,b,c,e,g,k);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,
function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var d=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var b=this.createDiv("geSidebarContainer geSidebarFooter");b.style.position="absolute";b.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>+</span>";var e=c.getElementsByTagName("span")[0];e.style.fontSize="18px";e.style.marginRight="5px";mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
-function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,q,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{n?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(J){}if(null!=
-f||null!=c){n=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),m=null;c=null!=c?c:mxResources.get("error");if(null!=f){null!=f.retry&&(l=mxResources.get("cancel"),m=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){n=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
-this.drive.user.displayName+", "+this.drive.user.email+")":""));var p=null!=k?null:null!=q?q:window.location.hash;if(null!=p&&("#G"==p.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==p.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){p="#U"==p.substring(0,2)?p.substring(45,p.lastIndexOf("%26ex")):
-p.substring(2);this.showError(c,n,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+p);this.handleError(b,c,e,g,k)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+d[b].email+
+function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,n,p){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{p?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(J){}if(null!=
+f||null!=c){p=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),m=null;c=null!=c?c:mxResources.get("error");if(null!=f){null!=f.retry&&(l=mxResources.get("cancel"),m=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){p=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=k?null:null!=n?n:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){q="#U"==q.substring(0,2)?q.substring(45,q.lastIndexOf("%26ex")):
+q.substring(2);this.showError(c,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,e,g,k)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+d[b].email+
">");c.setAttribute("disabled","disabled");f.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;f.appendChild(c)}var d=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 f=document.createElement("select");f.style.width="200px";b();mxEvent.addListener(f,"change",mxUtils.bind(this,function(){var c=f.value,
-e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=f.message?n=""==f.message&&null!=
-f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?n=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?n=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?n=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(n=mxUtils.htmlEntities(f)))}var t=q=null;null!=f&&null!=f.helpLink&&(q=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));
-this.showError(c,n,l,e,m,null,null,q,t,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,q){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();null!=c&&c()},function(){d();null!=e&&e()},g,k,null,
-null,null,null,f);this.showDialog(b.container,340,46+f,!0,q);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.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(f.style,
+e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=f.message?p=""==f.message&&null!=
+f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?p=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?p=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?p=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(p=mxUtils.htmlEntities(f)))}var u=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),u=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));
+this.showError(c,p,l,e,m,null,null,n,u,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();null!=c&&c()},function(){d();null!=e&&e()},g,k,null,
+null,null,null,f);this.showDialog(b.container,340,46+f,!0,n);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.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(f.style,
"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.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;";f.appendChild(d);d=document.createElement("img");d.setAttribute("src",
Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get(g?"doNotShowAgain":"close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";f.appendChild(d);mxUtils.write(f,c);document.body.appendChild(f);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var l=document.createElement("input");l.setAttribute("type","checkbox");
-l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);f.style.paddingBottom="30px";f.appendChild(c)}var m=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
-b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),m(),mxEvent.consume(b)):n()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,
-"transform","translate(-50%,0%)")}),500);window.setTimeout(n,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,g){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(c))),
+l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);f.style.paddingBottom="30px";f.appendChild(c)}var q=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);q()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){q()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),q(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,
+"transform","translate(-50%,0%)")}),500);window.setTimeout(p,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,g){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(c))),
0<g&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",g));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,e,g,k){var d="jpeg"==e?"jpg":e;g=this.getBaseFilename(g)+(null!=c?".drawio":"")+"."+d;b=this.createImageDataUri(b,c,e,k);this.saveData(g,d,b.substring(b.lastIndexOf(",")+1),"image/"+e,!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||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,g,k,q){"text/xml"!=e||/(\.drawio)$/i.test(c)||
-/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=q?q:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+
-":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");q=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);q=65==(f?parseInt(f[2],10):!1)?!1:q}if(q||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));q?d.download=c:d.setAttribute("target","_blank");document.body.appendChild(d);
-try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,q){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=q?"&base64="+q:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(b,c){c=
-c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var n=1024*k,t=Math.min(n+1024,e),x=Array(t-n),D=0;n<t;++D,++n)x[D]=d[n].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,q,n,u){q=null!=q?q:!1;n=null!=n?n:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(q);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
-c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,g);else if(null!=e&&"text/html"==e.substring(0,9)){var f=new EmbedDialog(this,b);this.showDialog(f.container,440,240,!0,!0);f.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,g,null,u):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,
-d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(J){this.handleError(J)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,n,null,1<k,d,b,e,g);q=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,400,q,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
+9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,g,k,n){"text/xml"!=e||/(\.drawio)$/i.test(c)||
+/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=n?n:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+
+":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");n=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);n=65==(f?parseInt(f[2],10):!1)?!1:n}if(n||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));n?d.download=c:d.setAttribute("target","_blank");document.body.appendChild(d);
+try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,n){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=n?"&base64="+n:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(b,c){c=
+c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var p=1024*k,t=Math.min(p+1024,e),x=Array(t-p),D=0;p<t;++D,++p)x[D]=d[p].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,n,p,t){n=null!=n?n:!1;p=null!=p?p:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(n);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
+c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,g);else if(null!=e&&"text/html"==e.substring(0,9)){var f=new EmbedDialog(this,b);this.showDialog(f.container,440,240,!0,!0);f.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,g,null,t):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,
+d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(J){this.handleError(J)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,p,null,1<k,d,b,e,g);n=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,400,n,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
b+"</html>"):(b=e?b:btoa(unescape(encodeURIComponent(b))),d.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),d.document.close())};var k=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};
EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var d=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",
this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color=
@@ -3471,87 +3472,87 @@ this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExp
this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(b){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(b,
null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",c);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,
function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,e,g,k){this.isLocalFileSave()?this.saveLocalFile(e,b,g,k,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,d){return this.createEchoRequest(e,b,g,k,c,d)}),e,k,g)};EditorUi.prototype.saveRequest=
-function(b,c,e,g,k,q,n){n=null!=n?n:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){q=null!=q?q:"pdf"==c?"application/pdf":
-"image/"+c;if(null!=g)try{this.exportFile(g,b,q,!0,d,e)}catch(J){this.handleError(J)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,q,!0,d,e)}catch(J){this.handleError(J)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),
-mxResources.get("saveAs"),mxResources.get("download"),!1,!1,n,null,1<d,f,g,q,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,380,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,q){};EditorUi.prototype.pickFolder=function(b,c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,q,n,u,t,x,D,C){if(this.spinner.spin(document.body,
-mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=D?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,n,u,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,D,C);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg",p=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",
-this.getFileData(!0,null,null,null,e,t,null,null,null,!1));var d=Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(l);this.editor.graph.mathEnabled&&this.editor.addMathCss(l);q?(null==this.thumbImageCache&&
-(this.thumbImageCache={}),this.editor.convertImages(l,p,this.thumbImageCache)):p(l)}catch(A){this.handleError(A)}};EditorUi.prototype.addRadiobox=function(b,c,e,g,k,q,n){return this.addCheckbox(b,e,g,k,q,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,q,n,u){q=null!=q?q:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",n?"radio":"checkbox");n="geCheckbox-"+Editor.guid();d.id=n;null!=u&&d.setAttribute("name",u);e&&(d.setAttribute("checked",
-"checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");q&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",n),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),f="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");
+function(b,c,e,g,k,n,p){p=null!=p?p:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){n=null!=n?n:"pdf"==c?"application/pdf":
+"image/"+c;if(null!=g)try{this.exportFile(g,b,n,!0,d,e)}catch(J){this.handleError(J)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,n,!0,d,e)}catch(J){this.handleError(J)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),
+mxResources.get("saveAs"),mxResources.get("download"),!1,!1,p,null,1<d,f,g,n,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,380,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,n){};EditorUi.prototype.pickFolder=function(b,c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,n,p,t,y,x,D,C){if(this.spinner.spin(document.body,
+mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=D?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,p,t,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,D,C);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",
+this.getFileData(!0,null,null,null,e,y,null,null,null,!1));var d=Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(l);this.editor.graph.mathEnabled&&this.editor.addMathCss(l);n?(null==this.thumbImageCache&&
+(this.thumbImageCache={}),this.editor.convertImages(l,q,this.thumbImageCache)):q(l)}catch(A){this.handleError(A)}};EditorUi.prototype.addRadiobox=function(b,c,e,g,k,n,p){return this.addCheckbox(b,e,g,k,n,p,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",p?"radio":"checkbox");p="geCheckbox-"+Editor.guid();d.id=p;null!=t&&d.setAttribute("name",t);e&&(d.setAttribute("checked",
+"checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");n&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",p),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),f="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");
g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));g.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");g.appendChild(e);b.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var b=new FilenameDialog(this,f,mxResources.get("ok"),
function(b){null!=b?f=b:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==c||c.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return d.checked?"blank"===g.value?"_blank":f:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=
function(b,c){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var e=document.createElement("select");e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var f=document.createElement("option");
f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));e.appendChild(f);c&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+
")"),e.appendChild(f));b.appendChild(e);mxUtils.write(b,mxResources.get("borderColor")+":");var g="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(g||"none",function(b){g=b;d()});mxEvent.consume(b)}));d();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";b.appendChild(k);
-mxUtils.br(b);return{getColor:function(){return g},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,e,g,k,q,n){n=null!=n?n:[];g&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||n.push("lightbox=1"),"auto"!=b&&n.push("target="+b),null!=c&&c!=mxConstants.NONE&&n.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&n.push("edit="+encodeURIComponent(k)),q&&n.push("layers=1"),this.editor.graph.foldingEnabled&&
-n.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&n.push("page-id="+this.currentPage.getId());return n};EditorUi.prototype.createLink=function(b,c,e,g,k,q,n,u,t,x){t=this.createUrlParameters(b,c,e,g,k,q,t);b=this.getCurrentFile();c=!0;null!=n?e="#U"+encodeURIComponent(n):(b=this.getCurrentFile(),u||null==b||b.constructor!=window.DriveFile?e="#R"+encodeURIComponent(e?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(e="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&t.push("title="+encodeURIComponent(b.getTitle()));x&&1<e.length&&(t.push("open="+e.substring(1)),e="");return(g&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<t.length?"?"+t.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,q,n,t,y,x,D,C){this.getBasenames();
-var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];n&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),d.resize=!0);t&&e.push("layers");y&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=D&&0<D.length&&(d.edit=D);null!=b?d.url=b:d.xml=this.getFileData(!0,
-null,null,null,null,!n);c='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";C(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+
+mxUtils.br(b);return{getColor:function(){return g},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,e,g,k,n,p){p=null!=p?p:[];g&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||p.push("lightbox=1"),"auto"!=b&&p.push("target="+b),null!=c&&c!=mxConstants.NONE&&p.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&p.push("edit="+encodeURIComponent(k)),n&&p.push("layers=1"),this.editor.graph.foldingEnabled&&
+p.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&p.push("page-id="+this.currentPage.getId());return p};EditorUi.prototype.createLink=function(b,c,e,g,k,n,p,t,y,x){y=this.createUrlParameters(b,c,e,g,k,n,y);b=this.getCurrentFile();c=!0;null!=p?e="#U"+encodeURIComponent(p):(b=this.getCurrentFile(),t||null==b||b.constructor!=window.DriveFile?e="#R"+encodeURIComponent(e?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(e="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(b.getTitle()));x&&1<e.length&&(y.push("open="+e.substring(1)),e="");return(g&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,n,p,t,y,x,D,C){this.getBasenames();
+var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];p&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),d.resize=!0);t&&e.push("layers");y&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=D&&0<D.length&&(d.edit=D);null!=b?d.url=b:d.xml=this.getFileData(!0,
+null,null,null,null,!p);c='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";C(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+
"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,c,e,g){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");
-k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");l.appendChild(f);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(m);mxUtils.br(l);l.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));l.appendChild(m);var n=this.getCurrentFile();
-null==e&&null!=n&&n.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.style.cursor="pointer",mxUtils.write(m,mxResources.get("share")),l.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));f.setAttribute("checked","checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),C=this.addCheckbox(d,mxResources.get("zoom"),
+k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");l.appendChild(f);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(q);mxUtils.br(l);l.appendChild(k);q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));l.appendChild(q);var p=this.getCurrentFile();
+null==e&&null!=p&&p.constructor==window.DriveFile&&(q=document.createElement("a"),q.style.paddingLeft="12px",q.style.color="gray",q.style.cursor="pointer",mxUtils.write(q,mxResources.get("share")),l.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));f.setAttribute("checked","checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),C=this.addCheckbox(d,mxResources.get("zoom"),
!0,null,!0);mxUtils.write(d,":");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="100%";d.appendChild(G);var J=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),l,!l),H=this.addCheckbox(d,mxResources.get("layers"),!0),K=this.addCheckbox(d,mxResources.get("tags"),!0),A=this.addCheckbox(d,
mxResources.get("lightbox"),!0),M=this.addEditButton(d,A),Q=M.getEditInput();Q.style.marginBottom="16px";mxEvent.addListener(A,"change",function(){A.checked?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");Q.checked&&A.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){g(k.checked?e:null,C.checked,G.value,t.getTarget(),t.getColor(),J.checked,L.checked,H.checked,K.checked,
-A.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,q){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=this.getCurrentFile(),f="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==
-window.DriveFile&&!c){b=80;var f="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",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 p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));m.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));
-p.style.marginTop="12px";p.className="geBtn";m.appendChild(p);d.appendChild(m);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"));m.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(b){this.spinner.stop();b=new ErrorDialog(this,null,
-mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var n=null,t=null;if(null!=e||null!=g)b+=30,mxUtils.write(d,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%",d.appendChild(n),mxUtils.write(d,mxResources.get("height")+":"),
-t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var J=this.addLinkSection(d,q);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,mxResources.get("lightbox"),!0,null,null,!q),K=this.addEditButton(d,H),A=K.getEditInput();q&&(A.style.marginLeft=
+A.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,n){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=this.getCurrentFile(),f="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==
+window.DriveFile&&!c){b=80;var f="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",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 q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));m.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));
+q.style.marginTop="12px";q.className="geBtn";m.appendChild(q);d.appendChild(m);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("check"));m.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,
+mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var p=null,t=null;if(null!=e||null!=g)b+=30,mxUtils.write(d,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%",d.appendChild(p),mxUtils.write(d,mxResources.get("height")+":"),
+t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var J=this.addLinkSection(d,n);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,mxResources.get("lightbox"),!0,null,null,!n),K=this.addEditButton(d,H),A=K.getEditInput();n&&(A.style.marginLeft=
H.style.marginLeft,H.style.display="none",b-=20);var M=this.addCheckbox(d,mxResources.get("layers"),!0);M.style.marginLeft=A.style.marginLeft;M.style.marginTop="8px";var Q=this.addCheckbox(d,mxResources.get("tags"),!0);Q.style.marginLeft=A.style.marginLeft;Q.style.marginBottom="16px";Q.style.marginTop="16px";mxEvent.addListener(H,"change",function(){H.checked?(M.removeAttribute("disabled"),A.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));
-A.checked&&H.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(J.getTarget(),J.getColor(),null==L?!0:L.checked,H.checked,K.getLink(),M.checked,null!=n?n.value:null,null!=t?t.value:null,Q.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",
+A.checked&&H.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(J.getTarget(),J.getColor(),null==L?!0:L.checked,H.checked,K.getLink(),M.checked,null!=p?p.value:null,null!=t?t.value:null,Q.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);null!=p?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",
!1,null)):J.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(k?"10":"4")+"px";d.appendChild(f);if(k){mxUtils.write(d,mxResources.get("zoom")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";
-l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";d.appendChild(m);mxUtils.br(d)}var p=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=g?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram),f=this.editor.graph,t=g?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/100||1,d=parseInt(m.value)||0;e(!p.checked,null!=n?n.checked:!1,null!=t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(g?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,
-e,g,k,q,n,t,y){n=null!=n?n:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,l="jpeg"==t?220:300,m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(m);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 v=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),K=document.createElement("input");K.style.marginTop="16px";K.style.marginRight="8px";K.style.marginLeft=
+l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";d.appendChild(m);mxUtils.br(d)}var q=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),p=g?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
+Editor.defaultIncludeDiagram),f=this.editor.graph,t=g?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/100||1,d=parseInt(m.value)||0;e(!q.checked,null!=p?p.checked:!1,null!=t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(g?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,
+e,g,k,n,p,t,y){p=null!=p?p:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,l="jpeg"==t?220:300,m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(m);mxUtils.write(d,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight=
+"12px";q.value=this.lastExportZoom||"100%";d.appendChild(q);mxUtils.write(d,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||"0";d.appendChild(v);mxUtils.br(d);var u=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),K=document.createElement("input");K.style.marginTop="16px";K.style.marginRight="8px";K.style.marginLeft=
"24px";K.setAttribute("disabled","disabled");K.setAttribute("type","checkbox");var A=document.createElement("select");A.style.marginTop="16px";A.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(b[m]));M.setAttribute("value",b[m]);A.appendChild(M)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(A),mxUtils.br(d),l+=26,mxEvent.addListener(A,
-"change",function(){"selectionOnly"==A.value&&(v.checked=!0)})):q&&(d.appendChild(K),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=30,mxEvent.addListener(v,"change",function(){v.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(v.style.display="none",v.nextSibling.style.display="none",v.nextSibling.nextSibling.style.display="none",l-=30):(A.value="diagram",K.setAttribute("checked","checked"),K.defaultChecked=!0,mxEvent.addListener(v,
-"change",function(){A.value=v.checked?"selectionOnly":"diagram"}));var Q=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),O=document.createElement("input");O.style.marginTop="16px";O.style.marginRight="8px";O.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||O.setAttribute("disabled","disabled");
-c&&(d.appendChild(O),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),l+=30);var ha=null;if("png"==t||"jpeg"==t)ha=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=30;var E=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=t);E.style.marginBottom="16px";var B=document.createElement("select");B.style.maxWidth="260px";B.style.marginLeft="8px";B.style.marginRight="10px";B.className="geBtn";c=document.createElement("option");
+"change",function(){"selectionOnly"==A.value&&(u.checked=!0)})):n&&(d.appendChild(K),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=30,mxEvent.addListener(u,"change",function(){u.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",l-=30):(A.value="diagram",K.setAttribute("checked","checked"),K.defaultChecked=!0,mxEvent.addListener(u,
+"change",function(){A.value=u.checked?"selectionOnly":"diagram"}));var Q=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),O=document.createElement("input");O.style.marginTop="16px";O.style.marginRight="8px";O.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||O.setAttribute("disabled","disabled");
+c&&(d.appendChild(O),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),l+=30);var ha=null;if("png"==t||"jpeg"==t)ha=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=30;var E=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);E.style.marginBottom="16px";var B=document.createElement("select");B.style.maxWidth="260px";B.style.marginLeft="8px";B.style.marginRight="10px";B.className="geBtn";c=document.createElement("option");
c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));B.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));B.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));B.appendChild(c);"svg"==t&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(B),mxUtils.br(d),mxUtils.br(d),l+=50);e=new CustomDialog(this,d,
-mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=p.value;k(p.value,Q.checked,!v.checked,N.checked,E.checked,O.checked,u.value,K.checked,!1,B.value,null!=ha?ha.checked:null,null!=T?T.checked:null,A.value)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,g,k){var d=document.createElement("div");
-d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(l)}var m=this.addCheckbox(d,mxResources.get("fit"),!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&g,!g),n=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),G=this.addEditButton(d,t),J=G.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),
+mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=q.value;k(q.value,Q.checked,!u.checked,N.checked,E.checked,O.checked,v.value,K.checked,!1,B.value,null!=ha?ha.checked:null,null!=T?T.checked:null,A.value)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,g,k){var d=document.createElement("div");
+d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(l)}var m=this.addCheckbox(d,mxResources.get("fit"),!0),q=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&g,!g),p=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),G=this.addEditButton(d,t),J=G.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),
H=this.addCheckbox(d,mxResources.get("layers"),L,!L);H.style.marginLeft=J.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(L&&H.removeAttribute("disabled"),J.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&t.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,
-function(){b(m.checked,p.checked,n.checked,t.checked,G.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,e,g,k,q,n,t){function d(d){var c=" ",m="";g&&(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"+(null!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");b&&(m+="max-width:100%;");var p="";e&&(p=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');n('<img src="'+d+'"'+p+(""!=m?' style="'+m+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=g?this.getFileData(!0):null;b=
-this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),f.width*f.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var m="";e&&(m="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(g?"1":"0")+m+"&xml="+encodeURIComponent(c));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&
-299>=p.getStatus()?d("data:image/png;base64,"+p.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(b,c,e,g,k,q,n){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),f=d.getElementsByTagName("a");if(null!=f)for(var l=0;l<f.length;l++){var m=f[l].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[l].getAttribute("target")&&f[l].removeAttribute("target")}g&&
-d.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(d);if(e){var p=" ",t="";g&&(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"+(k?"&edit=_blank":"")+(q?"&layers=1":
-"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(b){n('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+p+"/>")}))}else t="",g&&(c=this.getSelectedPageIndex(),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"+(null!=c?"&page="+c:"")+(k?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+b+" "+k),t+="max-width:100%;max-height:"+k+"px;",d.removeAttribute("height")),""!=t&&d.setAttribute("style",t),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),n(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(b){b=
+function(){b(m.checked,q.checked,p.checked,t.checked,G.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,e,g,k,n,p,t){function d(d){var c=" ",m="";g&&(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"+(null!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");b&&(m+="max-width:100%;");var q="";e&&(q=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');p('<img src="'+d+'"'+q+(""!=m?' style="'+m+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=g?this.getFileData(!0):null;b=
+this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),f.width*f.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var m="";e&&(m="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(g?"1":"0")+m+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&
+299>=q.getStatus()?d("data:image/png;base64,"+q.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(b,c,e,g,k,n,p){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),f=d.getElementsByTagName("a");if(null!=f)for(var l=0;l<f.length;l++){var m=f[l].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[l].getAttribute("target")&&f[l].removeAttribute("target")}g&&
+d.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(d);if(e){var q=" ",t="";g&&(q="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(k?"&edit=_blank":"")+(n?"&layers=1":
+"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(b){p('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+q+"/>")}))}else t="",g&&(c=this.getSelectedPageIndex(),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"+(null!=c?"&page="+c:"")+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+b+" "+k),t+="max-width:100%;max-height:"+k+"px;",d.removeAttribute("height")),""!=t&&d.setAttribute("style",t),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),p(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(b){b=
Math.floor((new Date-b)/1E3);var d=Math.floor(b/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(b/2592E3);if(1<d)return d+" "+mxResources.get("months");d=Math.floor(b/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(b/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(b/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(b,c){if(null!=b){var d=null;if("diagram"==b.nodeName)d=
-b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],f=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:f.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(q){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
+b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],f=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:f.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(n){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
b){if(b.hasAttribute("scale")){var e=parseFloat(b.getAttribute("scale"));!isNaN(e)&&0<e&&(d=e)}b.hasAttribute("border")&&(e=parseInt(b.getAttribute("border")),!isNaN(e)&&0<e&&(c=e))}return{scale:d,border:c}};EditorUi.prototype.getEmbeddedPng=function(b,c,e,g,k){try{var d=this.editor.graph,f=null!=d.themes&&"darkTheme"==d.defaultThemeName,l=null;if(null!=e&&0<e.length)d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(e).documentElement,
-!0),d),l=e;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet()),m=d.getGlobalVariable;d.setBackgroundImage=this.editor.graph.setBackgroundImage;var p=this.pages[0];this.currentPage==p?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=p.viewState&&null!=p.viewState&&d.setBackgroundImage(p.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,
-arguments)};document.body.appendChild(d.container);d.model.setRoot(p.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=e.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(G){null!=c&&c(G)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&
-c(b)}),null,null,g,null,d.shadowVisible,null,d,k,null,null,null,"diagram",null)}catch(D){null!=c&&c(D)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,q,n,t,y,x,D,C,G){t=null!=t?t:!0;n=null!=y?y:c.background;n==mxConstants.NONE&&(n=null);q=c.getSvg(n,x,D,null,null,q,null,null,null,c.shadowVisible||C,null,G,"diagram");(c.shadowVisible||C)&&c.addSvgShadow(q);null!=b&&q.setAttribute("content",b);null!=e&&q.setAttribute("resource",e);var d=(g?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+
-Graph.svgDoctype+"\n")+mxUtils.getXml(q);if(null!=k)this.embedFonts(q,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){k(d)})):k(d)}));else return d};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(m){c(b)}}))}catch(l){c(b)}}))};
-EditorUi.prototype.exportImage=function(b,c,e,g,k,n,t,u,y,x,D,C,G){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,u):null,y,null==this.pages||0==this.pages.length,D)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,n,t,x,C,G)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,n,t){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,
-null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var p=m.getElementsByTagName("diagram");if(1==p.length&&!n){if(m=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(b[p[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var q=p[0].getAttribute("name");null!=q&&""!=q&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,q))}}else if(0<
-p.length){n=[];var v=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[p[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(p[0]),g=!1,v=1);for(;v<p.length;v++){var L=p[v].getAttribute("id");p[v].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(p[v]));b[L]=p[v].getAttribute("id");var K=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[K+1]));f.model.execute(new ChangePage(this,H,H,K,!0));n.push(H)}this.updatePageLinks(b,
-n)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(v=0;v<d.length;v++)this.updatePageLinksForCell(b,d[v]);t&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(A){if(k)throw A;this.handleError(A)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
-c){var d=document.createElement("div"),e=this.editor.graph,f=e.getLinkForCell(c);null!=f&&e.setLinkForCell(c,this.updatePageLink(b,f));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var g=d.getElementsByTagName("a"),k=!1,n=0;n<g.length;n++)f=g[n].getAttribute("href"),null!=f&&(g[n].setAttribute("href",this.updatePageLink(b,f)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(n=0;n<e.model.getChildCount(c);n++)this.updatePageLinksForCell(b,e.model.getChildAt(c,n))};EditorUi.prototype.updatePageLink=
-function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var f=0;f<e.actions.length;f++){var g=e.actions[f];if(null!=g.open&&Graph.isPageLink(g.open)){var k=g.open.substring(g.open.indexOf(",")+1),d=b[k];null!=d?g.open="data:page/id,"+d:null==this.getPageById(k)&&delete g.open}}c="data:action/json,"+JSON.stringify(e)}}catch(u){}return c};
+!0),d),l=e;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet()),m=d.getGlobalVariable;d.setBackgroundImage=this.editor.graph.setBackgroundImage;var q=this.pages[0];this.currentPage==q?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=q.viewState&&null!=q.viewState&&d.setBackgroundImage(q.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?q.getName():"pagenumber"==b?1:m.apply(this,
+arguments)};document.body.appendChild(d.container);d.model.setRoot(q.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=e.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(G){null!=c&&c(G)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&
+c(b)}),null,null,g,null,d.shadowVisible,null,d,k,null,null,null,"diagram",null)}catch(D){null!=c&&c(D)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,n,p,t,y,x,D,C,G){t=null!=t?t:!0;p=null!=y?y:c.background;p==mxConstants.NONE&&(p=null);n=c.getSvg(p,x,D,null,null,n,null,null,null,c.shadowVisible||C,null,G,"diagram");(c.shadowVisible||C)&&c.addSvgShadow(n);null!=b&&n.setAttribute("content",b);null!=e&&n.setAttribute("resource",e);var d=(g?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+
+Graph.svgDoctype+"\n")+mxUtils.getXml(n);if(null!=k)this.embedFonts(n,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){k(d)})):k(d)}));else return d};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(q){c(b)}}))}catch(l){c(b)}}))};
+EditorUi.prototype.exportImage=function(b,c,e,g,k,n,p,t,y,x,D,C,G){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):null,y,null==this.pages||0==this.pages.length,D)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,
+null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,n,p,x,C,G)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,n,p){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,
+null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var q=m.getElementsByTagName("diagram");if(1==q.length&&!n){if(m=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<
+q.length){n=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(q[0]),g=!1,u=1);for(;u<q.length;u++){var L=q[u].getAttribute("id");q[u].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(q[u]));b[L]=q[u].getAttribute("id");var K=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[K+1]));f.model.execute(new ChangePage(this,H,H,K,!0));n.push(H)}this.updatePageLinks(b,
+n)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(u=0;u<d.length;u++)this.updatePageLinksForCell(b,d[u]);p&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(A){if(k)throw A;this.handleError(A)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
+c){var d=document.createElement("div"),e=this.editor.graph,f=e.getLinkForCell(c);null!=f&&e.setLinkForCell(c,this.updatePageLink(b,f));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var g=d.getElementsByTagName("a"),k=!1,p=0;p<g.length;p++)f=g[p].getAttribute("href"),null!=f&&(g[p].setAttribute("href",this.updatePageLink(b,f)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(p=0;p<e.model.getChildCount(c);p++)this.updatePageLinksForCell(b,e.model.getChildAt(c,p))};EditorUi.prototype.updatePageLink=
+function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var f=0;f<e.actions.length;f++){var g=e.actions[f];if(null!=g.open&&Graph.isPageLink(g.open)){var k=g.open.substring(g.open.indexOf(",")+1),d=b[k];null!=d?g.open="data:page/id,"+d:null==this.getPageById(k)&&delete g.open}}c="data:action/json,"+JSON.stringify(e)}}catch(v){}return c};
EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,e,g,k){g=null!=g?g:b.name;e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(g);try{var f="UNKNOWN-VISIO",l=g.lastIndexOf(".");if(0<=l&&l<g.length)f=g.substring(l+1).toUpperCase();else{var m=g.lastIndexOf("/");0<=
-m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(C){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,g);var p=new XMLHttpRequest;p.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));p.responseType="blob";this.addRemoteServiceSecurityCheck(p);
-null!=k&&p.setRequestHeader("x-convert-custom",k);p.onreadystatechange=mxUtils.bind(this,function(){if(4==p.readyState)if(200<=p.status&&299>=p.status)try{var b=p.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(J){e(J)}else try{""==p.responseType||"text"==p.responseType?e({message:p.responseText}):(d=new FileReader,d.onload=
-function(){e({message:JSON.parse(d.result).Message})},d.readAsText(p.response))}catch(J){e({})}});p.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(C){e(C)}}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(b,c,e){e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});
-var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(p){e(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||
+m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(C){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,g);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);
+null!=k&&n.setRequestHeader("x-convert-custom",k);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(J){e(J)}else try{""==n.responseType||"text"==n.responseType?e({message:n.responseText}):(d=new FileReader,d.onload=
+function(){e({message:JSON.parse(d.result).Message})},d.readAsText(n.response))}catch(J){e({})}});n.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(C){e(C)}}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(b,c,e){e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});
+var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(m){e(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||
this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.convertLucidChart=function(b,c,e){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
-action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(p){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(p){null!=window.console&&console.error(p),e(p)}}else e({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",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
+action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(m){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(m){null!=window.console&&console.error(m),e(m)}}else e({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",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",d)})})})}):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(b,c,e,g){var d=this,f=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(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=
-b.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(b).getElementsByTagName("svg");if(0<c.length){var f=parseFloat(c[0].getAttribute("width")),l=parseFloat(c[0].getAttribute("height"));if(isNaN(f)||isNaN(l))try{var k=c[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(k[2]),l=parseFloat(k[3])}catch(C){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(C){g(C)}})}catch(v){g(v)}};
+b.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(b).getElementsByTagName("svg");if(0<c.length){var f=parseFloat(c[0].getAttribute("width")),l=parseFloat(c[0].getAttribute("height"));if(isNaN(f)||isNaN(l))try{var k=c[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(k[2]),l=parseFloat(k[3])}catch(C){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(C){g(C)}})}catch(u){g(u)}};
"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(b,c,e,g){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+
b);b-=26;return 0==b?"-":1==b?"_":"?"}var l=new XMLHttpRequest;l.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+d(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+d(b.charCodeAt(i),0,0):r+d(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(l.responseType="blob");l.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==
-c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,f=c.height;if(0==b&&0==f){var l=d.result,k=l.indexOf(","),m=decodeURIComponent(escape(atob(l.substring(k+1)))),p=mxUtils.parseXml(m).getElementsByTagName("svg");0<p.length&&(b=parseFloat(p[0].getAttribute("width")),f=parseFloat(p[0].getAttribute("height")))}e(d.result,b,f)}catch(A){g(A)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};l.onerror=
-function(b){g(b)};l.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(b,c,e,g,k,n,t,u){n=null!=n?n:!0;t=null!=t?t:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,n,!0,u)}if("data:image/png;base64,"==
-b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,n,!0,u);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,n,!0,u);if(0<l.length)return l}catch(G){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,
-5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),t,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),l=Math.round(f.width*g);f=Math.round(f.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),
+c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,f=c.height;if(0==b&&0==f){var l=d.result,k=l.indexOf(","),m=decodeURIComponent(escape(atob(l.substring(k+1)))),n=mxUtils.parseXml(m).getElementsByTagName("svg");0<n.length&&(b=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}e(d.result,b,f)}catch(A){g(A)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};l.onerror=
+function(b){g(b)};l.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;p=null!=p?p:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
+" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,n,!0,t)}if("data:image/png;base64,"==
+b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,n,!0,t);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,n,!0,t);if(0<l.length)return l}catch(G){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,
+5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),p,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),l=Math.round(f.width*g);f=Math.round(f.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),
l,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,b,d.snap(c),d.snap(e),1,1,"text;"+(g?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,
-c,e,n,null,u);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,n,null,u))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(g?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==
+c,e,n,null,t);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,n,null,t))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(g?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==
b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");k.value=b;d.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var m=d.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=m.width;k.geometry.height=m.height}Graph.isLink(k.value)&&d.setLinkForCell(k,k.value);k.geometry.width+=d.gridSize;k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=
function(b){var d=-1;do b/=1024,d++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var d=b.indexOf(";");0<d&&(b=b.substring(0,d)+b.substring(b.indexOf(",",d+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&('{"state":"{\\"Properties\\":'==
b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.importLocalFile=function(b,c){if(b&&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=
@@ -3559,53 +3560,53 @@ b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.impo
function(b,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var c=new Blob([b],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var f=this.dialog,g=f.close;this.dialog.close=mxUtils.bind(this,
function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,e){var d=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(f){if(0==Object.keys(f.files).length)e();else{var g=0,l,k=!1;f.forEach(function(b,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(k=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?
c(b):e()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>g&&(g=f,l=d))});0<g?l.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(f,b.name)?d.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):k||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=
-!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,n,t,u,y,x,D,C){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,t)):d=this.importXml(b,e,g,x,null,null!=C?mxEvent.isControlDown(C):null);null!=u&&u(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=D?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,
-null,null!=C?mxEvent.isControlDown(C):null),y=!0)),y||(c=this.editor.graph,D=b.indexOf(";"),0<D&&(b=b.substring(0,D)+b.substring(b.indexOf(",",D+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,null,"",e,g,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?
-(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,t)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=u&&u(null))}),t)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);u(f)}))):/(\.v(sd|dx))($|\?)/i.test(t)||/(\.vs(s|x))($|\?)/i.test(t)||
-(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=C?mxEvent.isControlDown(C):null));d||null==u||u(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,t,u,y,x,D,C,G){g=null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var m=D||this.resampleThreshold,p=0;p<b.length;p++)if("image/"==b[p].type.substring(0,6)&&b[p].size>m){l=!0;break}var q=mxUtils.bind(this,
-function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,l,k,m,p){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,e,f,g,l,k,m,p,d,C,G)}catch(W){return this.handleError(W),null}});n=null!=n?n:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=b.length,q=p,v=[],A=mxUtils.bind(this,function(b,
-d){v[b]=d;if(0==--q){this.spinner.stop();if(null!=u)u(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var f=v[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}n(c)}}),y=0;y<p;y++)mxUtils.bind(this,function(d){var p=b[d];if(null!=p){var n=new FileReader;n.onload=mxUtils.bind(this,function(b){if(null==t||t(p))if("image/"==p.type.substring(0,6))if("image/svg"==p.type.substring(0,9)){var n=Graph.clipSvgDataUri(b.target.result),q=n.indexOf(","),u=decodeURIComponent(escape(atob(n.substring(q+
-1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=C?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?A(d,mxUtils.bind(this,function(){try{if(n.substring(0,q+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],t=f.getAttribute("width"),
-u=f.getAttribute("height"),t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,u=null!=u&&"%"!=u.charAt(u.length-1)?parseFloat(u):NaN,x=f.getAttribute("viewBox");if(null==x||0==x.length)f.setAttribute("viewBox","0 0 "+t+" "+u);else if(isNaN(t)||isNaN(u)){var A=x.split(" ");3<A.length&&(t=parseFloat(A[2]),u=parseFloat(A[3]))}n=Editor.createSvgDataUri(mxUtils.getXml(f));var N=Math.min(1,Math.min(g/Math.max(1,t)),g/Math.max(1,u)),C=k(n,p.type,c+d*m,e+d*m,Math.max(1,Math.round(t*N)),Math.max(1,Math.round(u*
-N)),p.name);if(isNaN(t)||isNaN(u)){var y=new Image;y.onload=mxUtils.bind(this,function(){t=Math.max(1,y.width);u=Math.max(1,y.height);C[0].geometry.width=t;C[0].geometry.height=u;f.setAttribute("viewBox","0 0 "+t+" "+u);n=Editor.createSvgDataUri(mxUtils.getXml(f));var b=n.indexOf(";");0<b&&(n=n.substring(0,b)+n.substring(n.indexOf(",",b+1)));l.setCellStyles("image",n,[C[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return C}}}catch(aa){}return null})):A(d,mxUtils.bind(this,function(){return k(N,
-"text/xml",c+d*m,e+d*m,0,0,p.name)}))}else A(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==p.type){var y=C?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var E=new Image;E.src=b.target.result;A(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,E.width,E.height,p.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,n){A(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(p.size,D)?Math.min(1,Math.min(g/l,g/n)):1;return k(b,p.type,c+d*m,e+d*m,Math.round(l*q),Math.round(n*q),p.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),f,g,D,p.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else n=b.target.result,k(n,p.type,c+d*m,e+d*m,240,160,p.name,function(b){A(d,function(){return b})},p)});/(\.v(dx|sdx?))($|\?)/i.test(p.name)||/(\.vs(x|sx?))($|\?)/i.test(p.name)?k(null,p.type,c+d*m,e+d*m,240,160,p.name,function(b){A(d,function(){return b})},p):"image"==p.type.substring(0,5)||"application/pdf"==p.type?n.readAsDataURL(p):n.readAsText(p)}})(y)});if(l){l=
-[];for(p=0;p<b.length;p++)l.push(b[p]);b=l;this.confirmImageResize(function(b){f=b;q()},y)}else q()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?f:null),mxSettings.save();d();b(f)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,n,p,t,y,x,D,C){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,p)):d=this.importXml(b,e,g,x,null,null!=C?mxEvent.isControlDown(C):null);null!=t&&t(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=D?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,
+null,null!=C?mxEvent.isControlDown(C):null),y=!0)),y||(c=this.editor.graph,D=b.indexOf(";"),0<D&&(b=b.substring(0,D)+b.substring(b.indexOf(",",D+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,null,"",e,g,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?
+(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,p)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=t&&t(null))}),p)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||
+(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=C?mxEvent.isControlDown(C):null));d||null==t||t(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,p,t,y,x,D,C,G){g=null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var m=D||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>m){l=!0;break}var u=mxUtils.bind(this,
+function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,l,k,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,e,f,g,l,k,m,n,d,C,G)}catch(W){return this.handleError(W),null}});n=null!=n?n:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,u=q,v=[],A=mxUtils.bind(this,function(b,
+d){v[b]=d;if(0==--u){this.spinner.stop();if(null!=t)t(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var f=v[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}n(c)}}),y=0;y<q;y++)mxUtils.bind(this,function(d){var n=b[d];if(null!=n){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==p||p(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+
+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=C?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?A(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],p=f.getAttribute("width"),
+u=f.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,u=null!=u&&"%"!=u.charAt(u.length-1)?parseFloat(u):NaN,x=f.getAttribute("viewBox");if(null==x||0==x.length)f.setAttribute("viewBox","0 0 "+p+" "+u);else if(isNaN(p)||isNaN(u)){var A=x.split(" ");3<A.length&&(p=parseFloat(A[2]),u=parseFloat(A[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(f));var N=Math.min(1,Math.min(g/Math.max(1,p)),g/Math.max(1,u)),C=k(q,n.type,c+d*m,e+d*m,Math.max(1,Math.round(p*N)),Math.max(1,Math.round(u*
+N)),n.name);if(isNaN(p)||isNaN(u)){var y=new Image;y.onload=mxUtils.bind(this,function(){p=Math.max(1,y.width);u=Math.max(1,y.height);C[0].geometry.width=p;C[0].geometry.height=u;f.setAttribute("viewBox","0 0 "+p+" "+u);q=Editor.createSvgDataUri(mxUtils.getXml(f));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));l.setCellStyles("image",q,[C[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return C}}}catch(aa){}return null})):A(d,mxUtils.bind(this,function(){return k(N,
+"text/xml",c+d*m,e+d*m,0,0,n.name)}))}else A(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==n.type){var y=C?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var E=new Image;E.src=b.target.result;A(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,E.width,E.height,n.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,p){A(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(n.size,D)?Math.min(1,Math.min(g/l,g/p)):1;return k(b,n.type,c+d*m,e+d*m,Math.round(l*q),Math.round(p*q),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),f,g,D,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,k(q,n.type,c+d*m,e+d*m,240,160,n.name,function(b){A(d,function(){return b})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?k(null,n.type,c+d*m,e+d*m,240,160,n.name,function(b){A(d,function(){return b})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?q.readAsDataURL(n):q.readAsText(n)}})(y)});if(l){l=
+[];for(q=0;q<b.length;q++)l.push(b[q]);b=l;this.confirmImageResize(function(b){f=b;u()},y)}else u()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?f:null),mxSettings.save();d();b(f)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
function(b){f(b,!0)},function(b){f(b,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,e)};EditorUi.prototype.parseFile=function(b,c,e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var f=new XMLHttpRequest;f.open("POST",
-OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,n,t){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);if(g&&this.isResampleImageSize(null!=t?t:c.length,n))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),p=Math.round(f/
-l),q=document.createElement("canvas");q.width=m;q.height=p;q.getContext("2d").drawImage(b,0,0,m,p);var v=q.toDataURL();if(v.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=p;var H=L.toDataURL();v!==H&&(c=v,d=m,f=p)}}}catch(K){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:
-120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(p){if(null!=e)e(p);else throw p;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:"0"!=urlParams.rough),this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&
-(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,k,l){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),
-[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=k,m.height=l,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&
-b.generateMermaidImage(e,g.config,function(f,k,l){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,k),m.height=Math.max(m.height,l),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;
-c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var k=c.getCellStyle(d);"1"==mxUtils.getValue(k,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(T){b.handleError(T)}};c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};
-var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var p=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,b.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,
+OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(n){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,n,p){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);if(g&&this.isResampleImageSize(null!=p?p:c.length,n))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),q=Math.round(f/
+l),t=document.createElement("canvas");t.width=m;t.height=q;t.getContext("2d").drawImage(b,0,0,m,q);var u=t.toDataURL();if(u.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=q;var H=L.toDataURL();u!==H&&(c=u,d=m,f=q)}}}catch(K){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:
+120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(m){if(null!=e)e(m);else throw m;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:"0"!=urlParams.rough),this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&
+(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),
+[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=l,m.height=k,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&
+b.generateMermaidImage(e,g.config,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,l),m.height=Math.max(m.height,k),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;
+c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var l=c.getCellStyle(d);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(T){b.handleError(T)}};c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};
+var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var m=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,b.currentPage,this));m.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,
function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(b,d){var e=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=e){var f=e.indexOf(",");if(0<f)for(var e=e.substring(f+1),f=d.getProperty("patches"),g=0;g<f.length;g++)if(null!=f[g][EditorUi.DIFF_UPDATE]&&null!=f[g][EditorUi.DIFF_UPDATE][e]){c.refreshBackgroundImage();break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,d){var c=n.apply(this,arguments);
-null==c||null==c.originalSrc||d||(c={src:c.originalSrc});return c};var t=this.clearDefaultStyle;this.clearDefaultStyle=function(){t.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var u=b.editor.getEditBlankUrl;
-this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return u.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=f&&f(b,d)};y.call(this,b,d,e)};g.apply(this,arguments);
+null==c||null==c.originalSrc||d||(c={src:c.originalSrc});return c};var p=this.clearDefaultStyle;this.clearDefaultStyle=function(){p.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var t=b.editor.getEditBlankUrl;
+this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return t.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=f&&f(b,d)};y.call(this,b,d,e)};g.apply(this,arguments);
mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(d,c,e){b.editor.graph.isSelectionEmpty()?x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=
mxResources.get("untitledDiagram");var D=c.getExportVariables;c.getExportVariables=function(){var d=D.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return d};var C=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():
"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:C.apply(this,arguments)};var G=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isCustomLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))G.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(f),c.getRubberband().reset();
mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var d=b.defaultFilename,c=b.getCurrentFile();null!=c&&(d=null!=c.getTitle()?c.getTitle():d);return d};var J=this.actions.get("print");J.setEnabled(!mxClient.IS_IOS||!navigator.standalone);J.visible=J.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),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),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&c.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(b){var d=c.cellEditor.text2,e=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(b){null!=
-e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,k){c.insertImage(b,
-g,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,e)),f/Math.max(1,b));c.insertImage(decodeURIComponent(d),
+e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,l){c.insertImage(b,
+g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,e)),f/Math.max(1,b));c.insertImage(decodeURIComponent(d),
e*f,b*f)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));this.isSettingsEnabled()&&(J=this.editor.graph.view,J.setUnit(mxSettings.getUnit()),J.addListener("unitChanged",
function(b,d){mxSettings.setUnit(d.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,J.unit),this.refresh());if("1"==urlParams.styledev){J=document.getElementById("geFooter");null!=J&&(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)})),J.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,d){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 L=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:L.apply(this,arguments)}}J=document.getElementById("geInfo");null!=J&&J.parentNode.removeChild(J);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var H=null;mxEvent.addListener(c.container,
"dragleave",function(b){c.isEnabled()&&(null!=H&&(H.parentNode.removeChild(H),H=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=H&&(H.parentNode.removeChild(H),H=null);if(c.isEnabled()){var d=
-mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,k=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(k=g=null),this.importFiles(b.dataTransfer.files,g,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(k=g=0);var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
-b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,k,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var p=null,e=d.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)||(p=
-!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var n=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,k,!0,p,null,n,mxEvent.isControlDown(b)))});p&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){n=b;q()},mxEvent.isControlDown(b)):q()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),
-mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,k,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(l,g,k,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),
-g,k,!0))}}b.stopPropagation();b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=
-c.items;for(index in g){var k=g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,k){b.insertImage(d,g,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var n=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],n.x,n.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML=
+mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,l=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,g,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(l=g=0);var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var n=null,e=d.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)||(n=
+!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,l,!0,n,null,p,mxEvent.isControlDown(b)))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),
+mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,l,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(k,g,l,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),
+g,l,!0))}}b.stopPropagation();b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=
+c.items;for(index in g){var k=g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,l){b.insertImage(d,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var p=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],p.x,p.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML=
"&nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,e=document.createElement("div");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck","false");e.style.textRendering="optimizeSpeed";e.style.fontFamily="monospace";e.style.wordBreak="break-all";e.style.background="transparent";e.style.color="transparent";e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow=
"hidden";e.style.display="block";e.style.fontSize="1";e.style.zIndex="-1";e.style.resize="none";e.style.outline="none";e.style.width="1px";e.style.height="1px";mxUtils.setOpacity(e,0);e.contentEditable=!0;e.innerHTML="&nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||
c.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||g||(e.style.left=c.container.scrollLeft+10+"px",e.style.top=c.container.scrollTop+10+"px",c.container.appendChild(e),g=!0,e.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var d=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!g||224!=d&&17!=
-d&&91!=d&&93!=d||(g=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e),b()}catch(v){this.handleError(v)}}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(v){this.handleError(v)}}));mxEvent.addListener(e,
+d&&91!=d&&93!=d||(g=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,
"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(e.innerHTML="&nbsp;",e.focus(),null!=b.clipboardData&&this.pasteCells(b,e,!0,!0),mxEvent.isConsumed(b)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==e?!0:k.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+
"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(b);mxSettings.settings.sketchMode=b;mxSettings.save();this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=function(b){Editor.pagesVisible!=b&&(Editor.pagesVisible=b,mxSettings.settings.pagesVisible=b,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.doSetSketchMode=function(b){if(Editor.sketchMode!=b){var d=this.editor.graph;
Editor.sketchMode=b;this.menus.defaultFonts=Menus.prototype.defaultFonts;this.menus.defaultFontSize=20;d.defaultVertexStyle={pointerEvents:"0",fontSize:"20"};d.defaultEdgeStyle={fontSize:"16",edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",endSize:"14",startSize:"14"};b&&(d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultEdgeStyle.fontFamily=
@@ -3618,13 +3619,13 @@ mxUtils.bind(this,function(b,c){mxSettings.setCreateTarget(this.editor.graph.con
mxUtils.bind(this,function(b,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(b,c){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(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.copyImage=function(b,c,e){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var e=this.createImageDataUri(b,c,"png"),f=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(e,f,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!1,null,0<b.length?b:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=
+null,null,null,10,null,null,!1,null,0<b.length?b:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=
mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),f=mxUtils.getXml(d.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(f));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=f,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),
-c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var k=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,k,k),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){k=d.getStartEditingCell(d.getSelectionCell(),g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,
-b,[k]);else{d.model.beginUpdate();try{d.labelChanged(k,b),Graph.isLink(b)&&d.setLinkForCell(k,b)}finally{d.model.endUpdate()}}d.setSelectionCell(k)}else f=d.getInsertPoint(),d.isMouseInsertPoint()&&(k=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+k,f.y+k,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=
-function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(l=!0,k=m)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(d=this.parseHtmlData(l),f="text/plain"!=d.getAttribute("data-type")):null!=k&&0<k.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,
-l))}k=d.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))e=k[0].getAttribute("data-lucid-content"),null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),
-mxEvent.consume(b));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);l=!1;try{var n=f.lastIndexOf("%3E");0<=n&&n<f.length-3&&(f=f.substring(0,n+3))}catch(C){}try{k=d.getElementsByTagName("span"),m=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(f),this.isCompatibleString(m)&&(l=!0,f=m)}catch(C){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,l,b);try{mxEvent.consume(b)}catch(C){}}else if(!e){var t=this.editor.graph;
+c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var l=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,l,l),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){l=d.getStartEditingCell(d.getSelectionCell(),g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(l)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,
+b,[l]);else{d.model.beginUpdate();try{d.labelChanged(l,b),Graph.isLink(b)&&d.setLinkForCell(l,b)}finally{d.model.endUpdate()}}d.setSelectionCell(l)}else f=d.getInsertPoint(),d.isMouseInsertPoint()&&(l=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+l,f.y+l,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=
+function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var l=b.clipboardData.getData("text/plain"),k=!1;if(null!=l&&0<l.length&&"%3CmxGraphModel%3E"==l.substring(0,18)){var p=decodeURIComponent(l);this.isCompatibleString(p)&&(k=!0,l=p)}k=k?null:b.clipboardData.getData("text/html");null!=k&&0<k.length?(d=this.parseHtmlData(k),f="text/plain"!=d.getAttribute("data-type")):null!=l&&0<l.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,
+k))}l=d.getElementsByTagName("span");if(null!=l&&0<l.length&&"application/vnd.lucid.chart.objects"===l[0].getAttribute("data-lucid-type"))e=l[0].getAttribute("data-lucid-content"),null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),
+mxEvent.consume(b));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);k=!1;try{var q=f.lastIndexOf("%3E");0<=q&&q<f.length-3&&(f=f.substring(0,q+3))}catch(C){}try{l=d.getElementsByTagName("span"),p=null!=l&&0<l.length?mxUtils.trim(decodeURIComponent(l[0].textContent)):decodeURIComponent(f),this.isCompatibleString(p)&&(k=!0,f=p)}catch(C){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,k,b);try{mxEvent.consume(b)}catch(C){}}else if(!e){var t=this.editor.graph;
t.lastPasteXml=null;t.pasteCounter=0}}catch(C){this.handleError(C)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&
12>document.documentMode)&&(d=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);
else{var c=this.extractGraphModelFromEvent(b);if(null==c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.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&&
@@ -3634,9 +3635,9 @@ else{var c=this.extractGraphModelFromEvent(b);if(null==c){var e=null!=b.dataTran
function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,g,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 d=
mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,g)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,
function(b){this.spinner.stop();d(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(e,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?d(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
-else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(u){this.handleError(u,
+else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(v){this.handleError(v,
mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,g)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var f=Editor.extractGraphModelFromPdf(b);null!=f&&(k=null,g=!0,b=f)}this.spinner.stop();this.openLocalFile(b,c,g,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,
-c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(v){this.handleError(v)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};
+c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};
EditorUi.prototype.openLocalFile=function(b,c,e,g,k){var d=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,g,k))});if(null!=b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)?f():(mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp||null!=g)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));
};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,f=e.getCellStyle(b);
@@ -3648,46 +3649,46 @@ this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.e
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var d=this.editor.graph;return{event:b,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var d=null,c=!1,
e=!1,g=null,k=mxUtils.bind(this,function(b,d){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,l=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==
b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(ra){}return b});if("json"==urlParams.proto){var m=!1;try{k=JSON.parse(k)}catch(R){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?
-mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var p=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?n.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),
-"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),
-"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{p.init()}catch(R){n.postMessage(JSON.stringify({event:"draft",error:R.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();
-var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var A=this.getCurrentUser(),y=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=A?A.id:
-null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=
-new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=d||this.emptyDiagramXml;null!=k.callback?n.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,
-"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){n.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();
-b&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==k.action){var Q=this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:Q,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var T=null!=k.messageKey?mxResources.get(k.messageKey):
+mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var n=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?p.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):p.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),
+"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),
+"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{n.init()}catch(R){p.postMessage(JSON.stringify({event:"draft",error:R.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();
+var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var A=this.getCurrentUser(),y=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;p.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=A?A.id:
+null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}n=
+new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=d||this.emptyDiagramXml;null!=k.callback?p.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,
+"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){p.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(n.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();
+b&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==k.action){var Q=this.getDiagramTextContent();p.postMessage(JSON.stringify({event:"textContent",data:Q,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var T=null!=k.messageKey?mxResources.get(k.messageKey):
k.message;null==k.show||k.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var N=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var O=this.editor.graph,ha=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var d=this.createLoadMessage("export");
-d.format=k.format;d.message=k;d.data=b;d.xml=N;n.postMessage(JSON.stringify(d),"*")}),E=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(N)));O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);ha(b)}),B=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(N),c=
+d.format=k.format;d.message=k;d.data=b;d.xml=N;p.postMessage(JSON.stringify(d),"*")}),E=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(N)));O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);ha(b)}),B=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(N),c=
!1);if(null!=this.pages&&this.currentPage.getId()!=B){for(var F=O.getGlobalVariable,O=this.createTemporaryGraph(O.getStylesheet()),Z,I=0;I<this.pages.length;I++)if(this.pages[I].getId()==B){Z=this.updatePageRoot(this.pages[I]);break}null==Z&&(Z=this.currentPage);O.getGlobalVariable=function(b){return"page"==b?Z.getName():"pagenumber"==b?1:F.apply(this,arguments)};document.body.appendChild(O.container);O.model.setRoot(Z.root)}if(null!=k.layerIds){for(var ba=O.model,ca=ba.getChildCells(ba.getRoot()),
-p={},I=0;I<k.layerIds.length;I++)p[k.layerIds[I]]=!0;for(I=0;I<ca.length;I++)ba.setVisible(ca[I],p[ca[I].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){E(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){E(null)}),null,null,k.scale,k.transparent,k.shadow,null,O,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=B?"&pageId="+B:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+
+n={},I=0;I<k.layerIds.length;I++)n[k.layerIds[I]]=!0;for(I=0;I<ca.length;I++)ba.setVisible(ca[I],n[ca[I].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){E(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){E(null)}),null,null,k.scale,k.transparent,k.shadow,null,O,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=B?"&pageId="+B:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+
encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?ha("data:image/png;base64,"+b.getText()):E(null)}),mxUtils.bind(this,function(){E(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);T=this.createLoadMessage("export");T.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&
1<this.pages.length)){var da=this.getXmlFileData();T.xml=mxUtils.getXml(da);T.data=this.getFileData(null,null,!0,null,null,null,da);T.format=k.format}else if("html"==k.format)N=this.editor.getGraphXml(),T.data=this.getHtml(N,this.editor.graph),T.xml=mxUtils.getXml(N),T.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ka=null!=k.background?k.background:this.editor.graph.background;ka==mxConstants.NONE&&(ka=null);T.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);T.format=
-"svg";var ma=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();T.data=Editor.createSvgDataUri(b);n.postMessage(JSON.stringify(T),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(T.xml,this.editor.graph,null,!0,ma,null,null,k.embedImages,ka,k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=
-k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var ia=this.editor.graph.getSvg(ka,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(ia);this.embedFonts(ia,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){ma(mxUtils.getXml(b))})):ma(mxUtils.getXml(b))}))}return}n.postMessage(JSON.stringify(T),
+"svg";var ma=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();T.data=Editor.createSvgDataUri(b);p.postMessage(JSON.stringify(T),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(T.xml,this.editor.graph,null,!0,ma,null,null,k.embedImages,ka,k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=
+k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var ia=this.editor.graph.getSvg(ka,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(ia);this.embedFonts(ia,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){ma(mxUtils.getXml(b))})):ma(mxUtils.getXml(b))}))}return}p.postMessage(JSON.stringify(T),
"*")}return}if("load"==k.action){m=k.toSketch;e=1==k.autosave;this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);null!=k.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,k.title),
"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"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(q),this.embedFilenameSpan=q);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(R){}k=
-null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var W=this.getCurrentFile();null!=W&&(q=l(k.xml),null!=q&&""!=q&&W.mergeFile(new LocalFile(this,q),function(){n.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){n.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(n):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):
-"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(R){this.handleError(R)}}var na=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),V=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,m)}catch(fa){this.handleError(fa)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");
+null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var W=this.getCurrentFile();null!=W&&(q=l(k.xml),null!=q&&""!=q&&W.mergeFile(new LocalFile(this,q),function(){p.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){p.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(p):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):
+"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):p.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(R){this.handleError(R)}}var na=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),V=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,m)}catch(fa){this.handleError(fa)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");
g=na();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=na();if(e!=g&&!c){var f=this.createLoadMessage("autosave");f.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(f),"*")}g=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",
-d),this.addListener("foldingEnabledChanged",d),this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;n.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",
+d),this.addListener("foldingEnabledChanged",d),this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;p.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",
this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(b){V(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&V(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&
-this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){V(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),V(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){V(na(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var n=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";
-n.postMessage(k,"*");if("json"==urlParams.proto){var t=this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);n.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";
+this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){V(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),V(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){V(na(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var p=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";
+p.postMessage(k,"*");if("json"==urlParams.proto){var t=this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);p.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";
var c=document.createElement("button");c.className="geBigButton";var e=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,g);c.setAttribute("title",g);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else 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()})),b.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()})),b.appendChild(c),e=c);"1"!=urlParams.noExitBtn&&
(c=document.createElement("a"),e="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,e),c.setAttribute("title",e),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),e=c);e.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.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(b){this.importCsv(b)}),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(b,c){for(var d=this.editor.graph,
-e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);if(null!=b[f].config)for(var k in b[f].config)g[k]=b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g={};if(0<d.length){var k={},n=null,t=null,x=null,D=null,C=null,G=null,J=null,L=null,H=null,K="",A="auto",M="auto",Q=null,T=null,N=40,O=40,ha=100,E=0,B=this.editor.graph;B.getGraphBounds();
+e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);if(null!=b[f].config)for(var k in b[f].config)g[k]=b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g={};if(0<d.length){var k={},p=null,t=null,x=null,D=null,C=null,G=null,J=null,L=null,H=null,K="",A="auto",M="auto",Q=null,T=null,N=40,O=40,ha=100,E=0,B=this.editor.graph;B.getGraphBounds();
for(var F=function(){null!=c?c(la):(B.setSelectionCells(la),B.scrollCellToVisible(B.getSelectionCell()))},Z=B.getFreeInsertPoint(),I=Z.x,ba=Z.y,Z=ba,ca=null,da="auto",H=null,ka=[],ma=null,ia=null,W=0;W<d.length&&"#"==d[W].charAt(0);){b=d[W];for(W++;W<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[W].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[W].substring(1)),W++;if("#"!=b.charAt(1)){var na=b.indexOf(":");if(0<na){var V=mxUtils.trim(b.substring(1,na)),R=mxUtils.trim(b.substring(na+1));"label"==
-V?ca=B.sanitizeHtml(R):"labelname"==V&&0<R.length&&"-"!=R?C=R:"labels"==V&&0<R.length&&"-"!=R?G=JSON.parse(R):"style"==V?t=R:"parentstyle"==V?J=R:"stylename"==V&&0<R.length&&"-"!=R?D=R:"styles"==V&&0<R.length&&"-"!=R?x=JSON.parse(R):"vars"==V&&0<R.length&&"-"!=R?n=JSON.parse(R):"identity"==V&&0<R.length&&"-"!=R?L=R:"parent"==V&&0<R.length&&"-"!=R?H=R:"namespace"==V&&0<R.length&&"-"!=R?K=R:"width"==V?A=R:"height"==V?M=R:"left"==V&&0<R.length?Q=R:"top"==V&&0<R.length?T=R:"ignore"==V?ia=R.split(","):
+V?ca=B.sanitizeHtml(R):"labelname"==V&&0<R.length&&"-"!=R?C=R:"labels"==V&&0<R.length&&"-"!=R?G=JSON.parse(R):"style"==V?t=R:"parentstyle"==V?J=R:"stylename"==V&&0<R.length&&"-"!=R?D=R:"styles"==V&&0<R.length&&"-"!=R?x=JSON.parse(R):"vars"==V&&0<R.length&&"-"!=R?p=JSON.parse(R):"identity"==V&&0<R.length&&"-"!=R?L=R:"parent"==V&&0<R.length&&"-"!=R?H=R:"namespace"==V&&0<R.length&&"-"!=R?K=R:"width"==V?A=R:"height"==V?M=R:"left"==V&&0<R.length?Q=R:"top"==V&&0<R.length?T=R:"ignore"==V?ia=R.split(","):
"connect"==V?ka.push(JSON.parse(R)):"link"==V?ma=R:"padding"==V?E=parseFloat(R):"edgespacing"==V?N=parseFloat(R):"nodespacing"==V?O=parseFloat(R):"levelspacing"==V?ha=parseFloat(R):"layout"==V&&(da=R)}}}if(null==d[W])throw Error(mxResources.get("invalidOrMissingFile"));for(var ra=this.editor.csvToArray(d[W]),V=na=null,R=[],S=0;S<ra.length;S++)L==ra[S]&&(na=S),H==ra[S]&&(V=S),R.push(mxUtils.trim(ra[S]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ca&&(ca="%"+R[0]+"%");if(null!=
ka)for(var fa=0;fa<ka.length;fa++)null==k[ka[fa].to]&&(k[ka[fa].to]={});L=[];for(S=W+1;S<d.length;S++){var ga=this.editor.csvToArray(d[S]);if(null==ga){var qa=40<d[S].length?d[S].substring(0,40)+"...":d[S];throw Error(qa+" ("+S+"):\n"+mxResources.get("containsValidationErrors"));}0<ga.length&&L.push(ga)}B.model.beginUpdate();try{for(S=0;S<L.length;S++){var ga=L[S],U=null,pa=null!=na?K+ga[na]:null;null!=pa&&(U=B.model.getCell(pa));var d=null!=U,aa=new mxCell(ca,new mxGeometry(I,Z,0,0),t||"whiteSpace=wrap;html=1;");
-aa.vertex=!0;aa.id=pa;for(var ja=0;ja<ga.length;ja++)B.setAttributeForCell(aa,R[ja],ga[ja]);if(null!=C&&null!=G){var P=G[aa.getAttribute(C)];null!=P&&B.labelChanged(aa,P)}if(null!=D&&null!=x){var X=x[aa.getAttribute(D)];null!=X&&(aa.style=X)}B.setAttributeForCell(aa,"placeholders","1");aa.style=B.replacePlaceholders(aa,aa.style,n);d&&(B.model.setGeometry(U,aa.geometry),B.model.setStyle(U,aa.style),0>mxUtils.indexOf(f,U)&&f.push(U));U=aa;if(!d)for(fa=0;fa<ka.length;fa++)k[ka[fa].to][U.getAttribute(ka[fa].to)]=
+aa.vertex=!0;aa.id=pa;for(var ja=0;ja<ga.length;ja++)B.setAttributeForCell(aa,R[ja],ga[ja]);if(null!=C&&null!=G){var P=G[aa.getAttribute(C)];null!=P&&B.labelChanged(aa,P)}if(null!=D&&null!=x){var X=x[aa.getAttribute(D)];null!=X&&(aa.style=X)}B.setAttributeForCell(aa,"placeholders","1");aa.style=B.replacePlaceholders(aa,aa.style,p);d&&(B.model.setGeometry(U,aa.geometry),B.model.setStyle(U,aa.style),0>mxUtils.indexOf(f,U)&&f.push(U));U=aa;if(!d)for(fa=0;fa<ka.length;fa++)k[ka[fa].to][U.getAttribute(ka[fa].to)]=
U;null!=ma&&"link"!=ma&&(B.setLinkForCell(U,U.getAttribute(ma)),B.setAttributeForCell(U,ma,null));B.fireEvent(new mxEventObject("cellsInserted","cells",[U]));var ta=this.editor.graph.getPreferredSizeForCell(U);U.vertex&&(null!=Q&&null!=U.getAttribute(Q)&&(U.geometry.x=I+parseFloat(U.getAttribute(Q))),null!=T&&null!=U.getAttribute(T)&&(U.geometry.y=ba+parseFloat(U.getAttribute(T))),"@"==A.charAt(0)&&null!=U.getAttribute(A.substring(1))?U.geometry.width=parseFloat(U.getAttribute(A.substring(1))):U.geometry.width=
-"auto"==A?ta.width+E:parseFloat(A),"@"==M.charAt(0)&&null!=U.getAttribute(M.substring(1))?U.geometry.height=parseFloat(U.getAttribute(M.substring(1))):U.geometry.height="auto"==M?ta.height+E:parseFloat(M),Z+=U.geometry.height+O);d?(null==g[pa]&&(g[pa]=[]),g[pa].push(U)):(H=null!=V?B.model.getCell(K+ga[V]):null,e.push(U),null!=H?(H.style=B.replacePlaceholders(H,J,n),B.addCell(U,H)):f.push(B.addCell(U)))}for(var sa=f.slice(),la=f.slice(),fa=0;fa<ka.length;fa++)for(var Ba=ka[fa],S=0;S<e.length;S++){var U=
-e[S],Ea=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&(B.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=k[c.to][e[f]];if(null!=g){var l=c.label;null!=c.fromlabel&&(l=(d.getAttribute(c.fromlabel)||"")+(l||""));null!=c.sourcelabel&&(l=B.replacePlaceholders(d,c.sourcelabel,n)+(l||""));null!=c.tolabel&&(l=(l||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(l=(l||"")+B.replacePlaceholders(g,c.targetlabel,n));var m="target"==
-c.placeholders==!c.invert?g:b,m=null!=c.style?B.replacePlaceholders(m,c.style,n):B.createCurrentEdgeStyle(),l=B.insertEdge(null,null,l||"",c.invert?g:b,c.invert?b:g,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var p=c.labels[m],q=new mxCell(p.label||m,new mxGeometry(null!=p.x?p.x:0,null!=p.y?p.y:0,0,0),"resizable=0;html=1;");q.vertex=!0;q.connectable=!1;q.geometry.relative=!0;null!=p.placeholders&&(q.value=B.replacePlaceholders("target"==p.placeholders==!c.invert?g:b,q.value,n));if(null!=p.dx||
-null!=p.dy)q.geometry.offset=new mxPoint(null!=p.dx?p.dx:0,null!=p.dy?p.dy:0);l.insert(q)}la.push(l);mxUtils.remove(c.invert?b:g,sa)}}});Ea(U,U,Ba);if(null!=g[U.id])for(ja=0;ja<g[U.id].length;ja++)Ea(U,g[U.id][ja],Ba)}if(null!=ia)for(S=0;S<e.length;S++)for(U=e[S],ja=0;ja<ia.length;ja++)B.setAttributeForCell(U,mxUtils.trim(ia[ja]),null);if(0<f.length){var xa=new mxParallelEdgeLayout(B);xa.spacing=N;xa.checkOverlap=!0;var Fa=function(){0<xa.spacing&&xa.execute(B.getDefaultParent());for(var b=0;b<f.length;b++){var d=
+"auto"==A?ta.width+E:parseFloat(A),"@"==M.charAt(0)&&null!=U.getAttribute(M.substring(1))?U.geometry.height=parseFloat(U.getAttribute(M.substring(1))):U.geometry.height="auto"==M?ta.height+E:parseFloat(M),Z+=U.geometry.height+O);d?(null==g[pa]&&(g[pa]=[]),g[pa].push(U)):(H=null!=V?B.model.getCell(K+ga[V]):null,e.push(U),null!=H?(H.style=B.replacePlaceholders(H,J,p),B.addCell(U,H)):f.push(B.addCell(U)))}for(var sa=f.slice(),la=f.slice(),fa=0;fa<ka.length;fa++)for(var Ba=ka[fa],S=0;S<e.length;S++){var U=
+e[S],Ea=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&(B.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=k[c.to][e[f]];if(null!=g){var l=c.label;null!=c.fromlabel&&(l=(d.getAttribute(c.fromlabel)||"")+(l||""));null!=c.sourcelabel&&(l=B.replacePlaceholders(d,c.sourcelabel,p)+(l||""));null!=c.tolabel&&(l=(l||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(l=(l||"")+B.replacePlaceholders(g,c.targetlabel,p));var m="target"==
+c.placeholders==!c.invert?g:b,m=null!=c.style?B.replacePlaceholders(m,c.style,p):B.createCurrentEdgeStyle(),l=B.insertEdge(null,null,l||"",c.invert?g:b,c.invert?b:g,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var n=c.labels[m],q=new mxCell(n.label||m,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");q.vertex=!0;q.connectable=!1;q.geometry.relative=!0;null!=n.placeholders&&(q.value=B.replacePlaceholders("target"==n.placeholders==!c.invert?g:b,q.value,p));if(null!=n.dx||
+null!=n.dy)q.geometry.offset=new mxPoint(null!=n.dx?n.dx:0,null!=n.dy?n.dy:0);l.insert(q)}la.push(l);mxUtils.remove(c.invert?b:g,sa)}}});Ea(U,U,Ba);if(null!=g[U.id])for(ja=0;ja<g[U.id].length;ja++)Ea(U,g[U.id][ja],Ba)}if(null!=ia)for(S=0;S<e.length;S++)for(U=e[S],ja=0;ja<ia.length;ja++)B.setAttributeForCell(U,mxUtils.trim(ia[ja]),null);if(0<f.length){var xa=new mxParallelEdgeLayout(B);xa.spacing=N;xa.checkOverlap=!0;var Fa=function(){0<xa.spacing&&xa.execute(B.getDefaultParent());for(var b=0;b<f.length;b++){var d=
B.getCellGeometry(f[b]);d.x=Math.round(B.snap(d.x));d.y=Math.round(B.snap(d.y));"auto"==A&&(d.width=Math.round(B.snap(d.width)));"auto"==M&&(d.height=Math.round(B.snap(d.height)))}};if("["==da.charAt(0)){var Ja=F;B.view.validate();this.executeLayoutList(JSON.parse(da),function(){Fa();Ja()});F=null}else if("circle"==da){var ya=new mxCircleLayout(B);ya.disableEdgeStyle=!1;ya.resetEdges=!1;var Ia=ya.isVertexIgnored;ya.isVertexIgnored=function(b){return Ia.apply(this,arguments)||0>mxUtils.indexOf(f,b)};
this.executeLayout(function(){ya.execute(B.getDefaultParent());Fa()},!0,F);F=null}else if("horizontaltree"==da||"verticaltree"==da||"auto"==da&&la.length==2*f.length-1&&1==sa.length){B.view.validate();var za=new mxCompactTreeLayout(B,"horizontaltree"==da);za.levelDistance=O;za.edgeRouting=!1;za.resetEdges=!1;this.executeLayout(function(){za.execute(B.getDefaultParent(),0<sa.length?sa[0]:null)},!0,F);F=null}else if("horizontalflow"==da||"verticalflow"==da||"auto"==da&&1==sa.length){B.view.validate();
var wa=new mxHierarchicalLayout(B,"horizontalflow"==da?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=O;wa.parallelEdgeSpacing=N;wa.interRankCellSpacing=ha;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(B.getDefaultParent(),la);B.moveCells(la,I,ba)},!0,F);F=null}else if("organic"==da||"auto"==da&&la.length>f.length){B.view.validate();var va=new mxFastOrganicLayout(B);va.forceConstant=3*O;va.disableEdgeStyle=!1;va.resetEdges=!1;var Ca=va.isVertexIgnored;
@@ -3697,66 +3698,66 @@ b,c,e,!0,g,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prot
this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var e=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!e);this.actions.get("print").setEnabled(!e);this.menus.get("exportAs").setEnabled(!e);this.menus.get("embed").setEnabled(!e);e="1"!=urlParams.embed||this.editor.graph.isEnabled();
this.menus.get("extras").setEnabled(e);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(e),this.menus.get("newLibrary").setEnabled(e));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.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()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&
b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=
-function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=
+function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=
c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<g.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(e&&0<g.length);this.actions.get("editGeometry").setEnabled(0<g.length&&b.getModel().isVertex(g[0]));
this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(e&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);
this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());
-this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,n,t,u){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",
-mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,k,n)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),p=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*p<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};u&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,
-color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+p+"&border="+n+"&xml="+encodeURIComponent(f))})}else"png"==e?b.exportImage(k,null==g||"none"==g,!0,!1,!1,n,!0,!1,null,u,t):b.exportImage(k,!1,!0,!1,!1,n,!0,!1,"jpeg",u);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});
+this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,p,t,v){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",
+mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,k,p)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),n=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};v&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,
+color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+n+"&border="+p+"&xml="+encodeURIComponent(f))})}else"png"==e?b.exportImage(k,null==g||"none"==g,!0,!1,!1,p,!0,!1,null,v,t):b.exportImage(k,!1,!0,!1,!1,p,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});
EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=this.pages)for(var e=0;e<this.pages.length;e++){var g=b;this.currentPage!=this.pages[e]&&(g=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),g.model.setRoot(this.pages[e].root));c+=this.pages[e].getName()+" "+g.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=
-function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";g.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var n=mxSettings.getCustomLibraries();
-for(b=0;b<n.length;b++){var t=n[b];if("R"==t.substring(0,1)){var y=JSON.parse(decodeURIComponent(t.substring(1)));k[y[0]]={id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){g.innerHTML="";if(0==b.length)g.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);
+function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";g.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var p=mxSettings.getCustomLibraries();
+for(b=0;b<p.length;b++){var t=p[b];if("R"==t.substring(0,1)){var y=JSON.parse(decodeURIComponent(t.substring(1)));k[y[0]]={id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){g.innerHTML="";if(0==b.length)g.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);
(function(b,c){mxEvent.addListener(c,"change",function(){this.checked?d[b.id]=b:delete d[b.id]})})(e,f)}},mxUtils.bind(this,function(b){g.innerHTML="";var d=document.createElement("div");d.style.padding="8px";d.style.textAlign="center";mxUtils.write(d,mxResources.get("error")+": ");mxUtils.write(d,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));g.appendChild(d)}));c.appendChild(g);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));
var b=0,c;for(c in d)null==k[c]&&(b++,mxUtils.bind(this,function(d){this.remoteInvoke("getFileContent",[d.downloadUrl],null,mxUtils.bind(this,function(c){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,d))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(d[c]));for(c in k)d[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));
0==b&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,340,390,!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(b){this.remoteWin=b;for(var d=0;d<this.remoteInvokeQueue.length;d++)b.postMessage(this.remoteInvokeQueue[d],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(b){var d=b.msgMarkers,c=this.remoteInvokeCallbacks[d.callbackId];if(null==c)throw Error("No callback for "+(null!=d?d.callbackId:"null"));b.error?c.error&&c.error(b.error.errResp):c.callback&&c.callback.apply(this,
b.resp);this.remoteInvokeCallbacks[d.callbackId]=null};EditorUi.prototype.remoteInvoke=function(b,c,e,g,k){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(f);d&&g.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(f);d&&k.apply(this,arguments)});e=e||{};e.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,
error:m});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:e});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,c){var d=mxUtils.bind(this,function(d,c){var e={event:"remoteInvokeResponse",msgMarkers:b.msgMarkers};null!=c?e.error={errResp:c}:null!=d&&(e.resp=d);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=b.funtionName,f=this.remoteInvokableFns[e];if(null!=f&&"function"===
-typeof this[e]){if(f.allowedDomains){for(var g=!1,k=0;k<f.allowedDomains.length;k++)if(c=="https://"+f.allowedDomains[k]){g=!0;break}if(!g){d(null,"Invalid Call: "+e+" is not allowed.");return}}var n=b.functionArgs;Array.isArray(n)||(n=[]);if(f.isAsync)n.push(function(){d(Array.prototype.slice.apply(arguments))}),n.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,n);else{var t=this[e].apply(this,n);d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+
-x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(v){null!=c&&c(v)}};e.onsuccess=
+typeof this[e]){if(f.allowedDomains){for(var g=!1,k=0;k<f.allowedDomains.length;k++)if(c=="https://"+f.allowedDomains[k]){g=!0;break}if(!g){d(null,"Invalid Call: "+e+" is not allowed.");return}}var p=b.functionArgs;Array.isArray(p)||(p=[]);if(f.isAsync)p.push(function(){d(Array.prototype.slice.apply(arguments))}),p.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,p);else{var t=this[e].apply(this,p);d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+
+x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=c&&c(u)}};e.onsuccess=
mxUtils.bind(this,function(d){var c=e.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(b){if(!b||"1"==urlParams.forceMigration){var d=document.createElement("iframe");d.style.display="none";d.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);
document.body.appendChild(d);var c=!0,e=!1,f,g=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(c){null==c||".scratchpad"==b&&c==this.emptyLibraryXml?d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(A){console.log(A)}}),n=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(A){console.log(A)}});b=mxUtils.bind(this,function(b){try{if(b.source==d.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(M){}"init"==g.event?(d.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
-"*"),d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||(c?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],c=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?n(g.resp[0]):l())}}catch(M){console.log(M)}});window.addEventListener("message",b)}})));b(c);c.onversionchange=function(){c.close()}});e.onerror=c;e.onblocked=function(){}}catch(p){null!=c&&c(p)}else null!=c&&c()}else b(this.database)};
-EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(u){null!=g&&g(u)}}),g)};EditorUi.prototype.removeDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){g=g||"objects";Array.isArray(g)||(g=[g],b=[b]);d=d.transaction(g,
-"readwrite");d.oncomplete=c;d.onerror=e;for(var f=0;f<g.length;f++)d.objectStore(g[f])["delete"](b[f])}),e)};EditorUi.prototype.getDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){try{g=g||"objects";var f=d.transaction([g],"readonly").objectStore(g).get(b);f.onsuccess=function(){c(f.result)};f.onerror=e}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.getDatabaseItems=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],
-"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(d){null==d.target.result?b(g):(g.push(d.target.result.value),d.target.result["continue"]())};f.onerror=c}catch(v){null!=c&&c(v)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).getAllKeys();f.onsuccess=function(){b(f.result)};f.onerror=c}catch(q){null!=c&&c(q)}}),c)};EditorUi.prototype.commentsSupported=
+funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(A){console.log(A)}}),p=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(A){console.log(A)}});b=mxUtils.bind(this,function(b){try{if(b.source==d.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(M){}"init"==g.event?(d.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||(c?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],c=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?p(g.resp[0]):l())}}catch(M){console.log(M)}});window.addEventListener("message",b)}})));b(c);c.onversionchange=function(){c.close()}});e.onerror=c;e.onblocked=function(){}}catch(m){null!=c&&c(m)}else null!=c&&c()}else b(this.database)};
+EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.removeDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){g=g||"objects";Array.isArray(g)||(g=[g],b=[b]);d=d.transaction(g,
+"readwrite");d.oncomplete=c;d.onerror=e;for(var f=0;f<g.length;f++)d.objectStore(g[f])["delete"](b[f])}),e)};EditorUi.prototype.getDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){try{g=g||"objects";var f=d.transaction([g],"readonly").objectStore(g).get(b);f.onsuccess=function(){c(f.result)};f.onerror=e}catch(u){null!=e&&e(u)}}),e)};EditorUi.prototype.getDatabaseItems=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],
+"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(d){null==d.target.result?b(g):(g.push(d.target.result.value),d.target.result["continue"]())};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).getAllKeys();f.onsuccess=function(){b(f.result)};f.onerror=c}catch(n){null!=c&&c(n)}}),c)};EditorUi.prototype.commentsSupported=
function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();null!=d?d.getComments(b,c):b([])};EditorUi.prototype.addComment=function(b,c,e){var d=this.getCurrentFile();
null!=d?d.addComment(b,c,e):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var b=this.getCurrentFile();return null!=b?b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();
return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language",
-"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,g,k,n,t,u){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(b,c,e,g,k,n,t,u)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
-return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,n,t,u,y,x,D,C,G,J,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,n,t,u,y,x,D,C,G,J,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,g,k,p,t,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(b,c,e,g,k,p,t,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,p,t,v,y,x,D,C,G,J,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,p,t,v,y,x,D,C,G,J,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(b,c,e,g)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=
function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,e,g)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,c,e,g,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var e=localStorage.key(c),g=localStorage.getItem(e);if(0<e.length&&(".scratchpad"==e||"."!=e.charAt(0))&&0<g.length){var k="<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12),g="<mxlibrary>"===g.substring(0,11);(k||g)&&b.push(e)}}return b};EditorUi.prototype.getLocalStorageFile=function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,c,e,k,g,n){function t(){for(var b=C.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==C&&c++;G.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
-"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),t()):f();y=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);y=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
-function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(p.click(),mxEvent.consume(b)):27==b.keyCode&&(n.click(),mxEvent.consume(b)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function f(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
-[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function m(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function p(b){b.style.border="";b.removeChild(b.busyImg)}function q(c,e,g,k,n){function A(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
-"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});J.appendChild(f);e&&(f.style.display="none")}function N(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=O;b(c);return{pdiv:e,replies:d}}function x(e,f,g,n,t){function u(){l(x);c.addReply(C,function(b){C.id=b;c.replies.push(C);p(x);g&&g()},function(c){v();m(x);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,t)}function v(){d(C,x,function(b){u()},!0)}var A=N().pdiv,C=b.newComment(e,b.getCurrentUser());C.pCommentId=c.id;null==c.replies&&(c.replies=[]);var x=q(C,c.replies,A,k+1);f?v():u()}if(n||!c.isResolved){G.style.display="none";var O=document.createElement("div");O.className="geCommentContainer";O.setAttribute("data-commentId",c.id);O.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(O.style.backgroundColor="ghostWhite");
+var CommentsWindow=function(b,c,e,k,g,p){function t(){for(var b=C.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==C&&c++;G.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),t()):f();y=null});p.className="geCommentEditBtn";m.appendChild(p);var n=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);y=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
+function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(n.click(),mxEvent.consume(b)):27==b.keyCode&&(p.click(),mxEvent.consume(b)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";m.appendChild(n);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function f(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
+[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function q(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function m(b){b.style.border="";b.removeChild(b.busyImg)}function n(c,e,g,k,p){function A(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
+"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});J.appendChild(f);e&&(f.style.display="none")}function N(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=O;b(c);return{pdiv:e,replies:d}}function x(e,f,g,p,t){function u(){l(C);c.addReply(x,function(b){x.id=b;c.replies.push(x);m(C);g&&g()},function(c){v();q(C);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},p,t)}function v(){d(x,C,function(b){u()},!0)}var A=N().pdiv,x=b.newComment(e,b.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var C=n(x,c.replies,A,k+1);f?v():u()}if(p||!c.isResolved){G.style.display="none";var O=document.createElement("div");O.className="geCommentContainer";O.setAttribute("data-commentId",c.id);O.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(O.style.backgroundColor="ghostWhite");
var I=document.createElement("div");I.className="geCommentHeader";var T=document.createElement("img");T.className="geCommentUserImg";T.src=c.user.pictureUrl||Editor.userImage;I.appendChild(T);T=document.createElement("div");T.className="geCommentHeaderTxt";I.appendChild(T);var D=document.createElement("div");D.className="geCommentUsername";mxUtils.write(D,c.user.displayName||"");T.appendChild(D);D=document.createElement("div");D.className="geCommentDate";D.setAttribute("data-commentId",c.id);f(c,
-D);T.appendChild(D);O.appendChild(I);I=document.createElement("div");I.className="geCommentTxt";mxUtils.write(I,c.content||"");O.appendChild(I);c.isLocked&&(O.style.opacity="0.5");I=document.createElement("div");I.className="geCommentActions";var J=document.createElement("ul");J.className="geCommentActionsList";I.appendChild(J);v||c.isLocked||0!=k&&!u||A(mxResources.get("reply"),function(){x("",!0)},c.isResolved);T=b.getCurrentUser();null==T||T.id!=c.user.id||v||c.isLocked||(A(mxResources.get("edit"),
-function(){function e(){d(c,O,function(){l(O);c.editComment(c.content,function(){p(O)},function(c){m(O);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),A(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(O);c.deleteComment(function(b){if(!0===b){b=O.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=O.querySelectorAll(".geCommentAction");for(b=
-0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);p(O);O.style.opacity="0.5"}else{d=N(c).replies;for(b=0;b<d.length;b++)C.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}G.style.display=0==C.getElementsByTagName("div").length?"block":"none"}},function(c){m(O);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));v||c.isLocked||0!=k||A(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+D);T.appendChild(D);O.appendChild(I);I=document.createElement("div");I.className="geCommentTxt";mxUtils.write(I,c.content||"");O.appendChild(I);c.isLocked&&(O.style.opacity="0.5");I=document.createElement("div");I.className="geCommentActions";var J=document.createElement("ul");J.className="geCommentActionsList";I.appendChild(J);u||c.isLocked||0!=k&&!v||A(mxResources.get("reply"),function(){x("",!0)},c.isResolved);T=b.getCurrentUser();null==T||T.id!=c.user.id||u||c.isLocked||(A(mxResources.get("edit"),
+function(){function e(){d(c,O,function(){l(O);c.editComment(c.content,function(){m(O)},function(c){q(O);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),A(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(O);c.deleteComment(function(b){if(!0===b){b=O.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=O.querySelectorAll(".geCommentAction");for(b=
+0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);m(O);O.style.opacity="0.5"}else{d=N(c).replies;for(b=0;b<d.length;b++)C.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}G.style.display=0==C.getElementsByTagName("div").length?"block":"none"}},function(c){q(O);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||A(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=N(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);H||(f[k].style.display="none")}t()}c.isResolved?x(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):x(mxResources.get("markedAsResolved"),!1,d,!0)});O.appendChild(I);null!=g?C.insertBefore(O,g.nextSibling):C.appendChild(O);for(g=0;null!=c.replies&&g<c.replies.length;g++)I=c.replies[g],I.isResolved=c.isResolved,q(I,c.replies,null,k+1,n);null!=y&&(y.comment.id==c.id?(n=c.content,c.content=y.comment.content,d(c,O,y.saveCallback,y.deleteOnCancel),c.content=n):null==y.comment.id&&y.comment.pCommentId==c.id&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return O}}
-var v=!b.canComment(),u=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var D=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.bottom=parseInt(D)+7+"px";x.appendChild(C);var G=document.createElement("span");G.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(G,mxResources.get("noCommentsFound"));var J=document.createElement("div");J.className="geToolbarContainer geCommentsToolbar";J.style.height=D;J.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";J.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D=document.createElement("a");D.className="geButton";if(!v){var L=D.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;K.push(c);p(g)},function(c){m(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=q(f,K,null,0);e();c.preventDefault();mxEvent.consume(c)});J.appendChild(L)}L=D.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
+d,!1,!0):x(mxResources.get("markedAsResolved"),!1,d,!0)});O.appendChild(I);null!=g?C.insertBefore(O,g.nextSibling):C.appendChild(O);for(g=0;null!=c.replies&&g<c.replies.length;g++)I=c.replies[g],I.isResolved=c.isResolved,n(I,c.replies,null,k+1,p);null!=y&&(y.comment.id==c.id?(p=c.content,c.content=y.comment.content,d(c,O,y.saveCallback,y.deleteOnCancel),c.content=p):null==y.comment.id&&y.comment.pCommentId==c.id&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return O}}
+var u=!b.canComment(),v=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var D=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.bottom=parseInt(D)+7+"px";x.appendChild(C);var G=document.createElement("span");G.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(G,mxResources.get("noCommentsFound"));var J=document.createElement("div");J.className="geToolbarContainer geCommentsToolbar";J.style.height=D;J.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";J.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D=document.createElement("a");D.className="geButton";if(!u){var L=D.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;K.push(c);m(g)},function(c){q(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=n(f,K,null,0);e();c.preventDefault();mxEvent.consume(c)});J.appendChild(L)}L=D.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
var H=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";A();b.preventDefault();mxEvent.consume(b)});J.appendChild(L);b.commentsRefreshNeeded()&&(L=D.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){A();
-b.preventDefault();mxEvent.consume(b)}),J.appendChild(L));b.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(b){n();b.preventDefault();mxEvent.consume(b)}),J.appendChild(D));x.appendChild(J);var K=[],A=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
-var c=y.div.querySelector(".geCommentEditTxtArea"),e=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(N){b.handleError(N)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";u=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
-new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});C.innerHTML="";C.appendChild(G);G.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),q(K[b],K,null,0,H);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+b.preventDefault();mxEvent.consume(b)}),J.appendChild(L));b.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(b){p();b.preventDefault();mxEvent.consume(b)}),J.appendChild(D));x.appendChild(J);var K=[],A=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
+var c=y.div.querySelector(".geCommentEditTxtArea"),e=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(N){b.handleError(N)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
+new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});C.innerHTML="";C.appendChild(G);G.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),n(K[b],K,null,0,H);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
": "+b.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});A();this.refreshComments=A;J=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(f(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=C.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var g=c[e];d[g.getAttribute("data-commentId")]=g}for(e=0;e<K.length;e++)b(K[e])}});setInterval(J,6E4);this.refreshCommentsTime=J;this.window=
new mxWindow(mxResources.get("comments"),x,c,e,k,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(b,c,e,
-k,g,n,t,d,f,l,m){var p=document.createElement("div");p.style.textAlign="center";m=null!=m?m:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=m+"px";q.style.lineHeight="1.2em";mxUtils.write(q,c);p.appendChild(q);null!=l&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),q.appendChild(c),p.appendChild(q));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
-"nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k(v.checked)});n.className="geBtn";null!=d&&(n.innerHTML=d+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&l.appendChild(n);var u=mxUtils.button(g||mxResources.get("ok"),function(){b.hideDialog();null!=e&&e(v.checked)});l.appendChild(u);null!=t?(u.innerHTML=
-t+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(n);p.appendChild(l);f?(l.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(v),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),q.appendChild(g),p.appendChild(q),mxEvent.addListener(g,
-"click",function(b){v.checked=!v.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){u.focus()};this.container=p};function DiagramPage(b,c){this.node=b;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")};
+k,g,p,t,d,f,l,q){var m=document.createElement("div");m.style.textAlign="center";q=null!=q?q:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=q+"px";n.style.lineHeight="1.2em";mxUtils.write(n,c);m.appendChild(n);null!=l&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),n.appendChild(c),m.appendChild(n));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
+"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k(u.checked)});p.className="geBtn";null!=d&&(p.innerHTML=d+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&l.appendChild(p);var v=mxUtils.button(g||mxResources.get("ok"),function(){b.hideDialog();null!=e&&e(u.checked)});l.appendChild(v);null!=t?(v.innerHTML=
+t+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(p);m.appendChild(l);f?(l.style.marginTop="10px",n=document.createElement("p"),n.style.marginTop="20px",n.style.marginBottom="0px",n.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),n.appendChild(g),m.appendChild(n),mxEvent.addListener(g,
+"click",function(b){u.checked=!u.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){v.focus()};this.container=m};function DiagramPage(b,c){this.node=b;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(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,c,e){this.ui=b;this.page=c;this.previous=this.name=e}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,c,e){this.ui=b;this.oldIndex=c;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,c,e){this.ui=b;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=e&&(c.viewState=e,this.neverShown=!1))}
@@ -3766,15 +3767,15 @@ function ChangePage(b,c,e,k,g){SelectPage.call(this,b,e);this.relatedPage=c;this
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var c=null;if(null!=this.pages&&null!=b)for(var e=0;e<this.pages.length;e++)if(this.pages[e]==b){c=e;break}return c};EditorUi.prototype.getPageById=function(b){if(null!=this.pages)for(var c=0;c<this.pages.length;c++)if(this.pages[c].getId()==b)return this.pages[c];return null};
EditorUi.prototype.createImageForPageLink=function(b,c,e){var k=b.indexOf(","),g=null;0<k&&(k=this.getPageById(b.substring(k+1)),null!=k&&k!=c&&(g=this.getImageForPage(k,c,e),g.originalSrc=b));null==g&&(g={originalSrc:b});return g};
-EditorUi.prototype.getImageForPage=function(b,c,e){e=null!=e?e:this.editor.graph;var k=e.getGlobalVariable;e=this.createTemporaryGraph(e.getStylesheet());var g=this.getPageIndex(null!=c?c:this.currentPage);e.getGlobalVariable=function(b){return"pagenumber"==b?g+1:"page"==b&&null!=c?c.getName():k.apply(this,arguments)};document.body.appendChild(e.container);this.updatePageRoot(b);e.model.setRoot(b.root);b=e.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var n=e.getGraphBounds();
-document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),n.width,n.height,n.x,n.y)};
+EditorUi.prototype.getImageForPage=function(b,c,e){e=null!=e?e:this.editor.graph;var k=e.getGlobalVariable;e=this.createTemporaryGraph(e.getStylesheet());var g=this.getPageIndex(null!=c?c:this.currentPage);e.getGlobalVariable=function(b){return"pagenumber"==b?g+1:"page"==b&&null!=c?c.getName():k.apply(this,arguments)};document.body.appendChild(e.container);this.updatePageRoot(b);e.model.setRoot(b.root);b=e.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var p=e.getGraphBounds();
+document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),p.width,p.height,p.x,p.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,c=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var e=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";e!=this.tabContainer.style.height&&this.refresh(!1)}c.apply(b.view,arguments)});var e=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var c=this.currentPage;null!=c&&c!=e&&(null==c.viewState||null==c.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+c.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+c.viewState.scrollTop),e=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(b,c){for(var e=c.getProperty("edit").changes,d=0;d<e.length;d++)if(e[d]instanceof SelectPage||e[d]instanceof RenamePage||e[d]instanceof MovePage||e[d]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,c,e){b=null!=b?this.getPageById(b.getId()):null;var k=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,c):(k.setViewState(c),this.editor.updateGraphComponents(),k.view.revalidate(),k.sizeDidChange()),k.container.scrollLeft=k.view.translate.x*k.view.scale+c.scrollLeft,k.container.scrollTop=k.view.translate.y*k.view.scale+c.scrollTop,k.restoreSelection(e))};
-Graph.prototype.createViewState=function(b){var c=b.getAttribute("page"),e=parseFloat(b.getAttribute("pageScale")),k=parseFloat(b.getAttribute("pageWidth")),g=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),t=this.parseBackgroundImage(b.getAttribute("backgroundImage")),d=b.getAttribute("extFonts");if(d)try{d=d.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:t,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(k)||isNaN(g)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+Graph.prototype.createViewState=function(b){var c=b.getAttribute("page"),e=parseFloat(b.getAttribute("pageScale")),k=parseFloat(b.getAttribute("pageWidth")),g=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),t=this.parseBackgroundImage(b.getAttribute("backgroundImage")),d=b.getAttribute("extFonts");if(d)try{d=d.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:t,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(k)||isNaN(g)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,k,g),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:d||[]}};
Graph.prototype.saveViewState=function(b,c,e,k){e||(c.setAttribute("grid",null==b||b.gridEnabled?"1":"0"),c.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),c.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),c.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),c.setAttribute("connect",null==b||b.connect?"1":"0"),c.setAttribute("arrows",null==b||b.arrows?"1":"0"),c.setAttribute("page",null==b&&this.defaultPageVisible||null!=b&&b.pageVisible?"1":"0"),c.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));c.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);e=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=e&&(c.setAttribute("pageWidth",e.width),c.setAttribute("pageHeight",e.height));null!=b&&(null!=b.background&&c.setAttribute("background",b.background),k=this.getBackgroundImageObject(b.backgroundImage,k),null!=k&&c.setAttribute("backgroundImage",
@@ -3790,17 +3791,17 @@ Graph.prototype.addExtFont=function(b,c,e){if(b&&c){"1"!=urlParams["ext-fonts"]&
this.extFonts&&(this.extFonts=[]);e=this.extFonts;k=!0;for(g=0;g<e.length;g++)if(e[g].name==b){k=!1;break}k&&this.extFonts.push({name:b,url:c})}}};
EditorUi.prototype.updatePageRoot=function(b,c){if(null==b.root){var e=this.editor.extractGraphModel(b.node,null,c),k=Editor.extractParserError(e);if(k)throw Error(k);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),k=new mxCodec(e.ownerDocument),b.root=k.decode(e).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(e))throw Error(k);null!=e&&(b.graphModelNode=
e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,c,e){try{if(b!=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 k=this.editor.graph.model.createUndoableEdit();k.ignoreEdit=!0;var g=new SelectPage(this,b,e);g.execute();k.add(g);k.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",k))}}catch(n){this.handleError(n)}};
+EditorUi.prototype.selectPage=function(b,c,e){try{if(b!=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 k=this.editor.graph.model.createUndoableEdit();k.ignoreEdit=!0;var g=new SelectPage(this,b,e);g.execute();k.add(g);k.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",k))}}catch(p){this.handleError(p)}};
EditorUi.prototype.selectNextPage=function(b){var c=this.currentPage;null!=c&&null!=this.pages&&(c=mxUtils.indexOf(this.pages,c),b?this.selectPage(this.pages[mxUtils.mod(c+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(c-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(b,c){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:this.createPage(null,this.createPageId());c=null!=c?c:this.pages.length;var e=new ChangePage(this,b,b,c);this.editor.graph.model.execute(e)}return b};EditorUi.prototype.createPageId=function(){var b;do b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,c){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),c);e.setName(null!=b?b:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var b={},c=0;c<this.pages.length;c++){var e=this.pages[c].getName();null!=e&&0<e.length&&(b[e]=e)}c=this.pages.length;do e=mxResources.get("pageWithNumber",[++c]);while(null!=b[e]);return e};
EditorUi.prototype.removePage=function(b){try{var c=this.editor.graph,e=mxUtils.indexOf(this.pages,b);if(c.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c.model.beginUpdate();try{var k=this.currentPage;k==b&&1<this.pages.length?(e==this.pages.length-1?e--:e++,k=this.pages[e]):1>=this.pages.length&&(k=this.insertPage(),c.model.execute(new RenamePage(this,k,mxResources.get("pageWithNumber",[1]))));c.model.execute(new ChangePage(this,b,k))}finally{c.model.endUpdate()}}}catch(g){this.handleError(g)}return b};
-EditorUi.prototype.duplicatePage=function(b,c){var e=null;try{var k=this.editor.graph;if(k.isEnabled()){k.isEditing()&&k.stopEditing();var g=b.node.cloneNode(!1);g.removeAttribute("id");var n={},t=k.createCellLookup([k.model.root]),e=new DiagramPage(g);e.root=k.cloneCell(k.model.root,null,n);e.viewState=k.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(c);e=this.insertPage(e,mxUtils.indexOf(this.pages,
-b)+1);k.updateCustomLinks(k.createCellMapping(n,t),[e.root])}}catch(d){this.handleError(d)}return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,b,c))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return b};
+EditorUi.prototype.duplicatePage=function(b,c){var e=null;try{var k=this.editor.graph;if(k.isEnabled()){k.isEditing()&&k.stopEditing();var g=b.node.cloneNode(!1);g.removeAttribute("id");var p={},t=k.createCellLookup([k.model.root]),e=new DiagramPage(g);e.root=k.cloneCell(k.model.root,null,p);e.viewState=k.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(c);e=this.insertPage(e,mxUtils.indexOf(this.pages,
+b)+1);k.updateCustomLinks(k.createCellMapping(p,t),[e.root])}}catch(d){this.handleError(d)}return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,b,c))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return b};
EditorUi.prototype.movePage=function(b,c){this.editor.graph.model.execute(new MovePage(this,b,c))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,c=document.createElement("div");c.style.position="relative";c.style.display="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 e=this.editor.isChromelessView()?29:59,k=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-e)/this.pages.length)+
-1),g=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(d,e){this.pages[d]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){b.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=d):mxEvent.consume(c)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(b){g=null;b.stopPropagation();
-b.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(b){null!=g&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(b){null!=g&&d!=g&&this.movePage(g,d);b.stopPropagation();b.preventDefault()}));c.appendChild(e)})(n,this.createTabForPage(this.pages[n],k,this.pages[n]!=this.currentPage,n+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);k=this.createPageMenuTab();this.tabContainer.appendChild(k);
+1),g=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,e){this.pages[d]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){b.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=d):mxEvent.consume(c)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(b){g=null;b.stopPropagation();
+b.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(b){null!=g&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(b){null!=g&&d!=g&&this.movePage(g,d);b.stopPropagation();b.preventDefault()}));c.appendChild(e)})(p,this.createTabForPage(this.pages[p],k,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);k=this.createPageMenuTab();this.tabContainer.appendChild(k);
k=null;this.isPageInsertTabVisible()&&(k=this.createPageInsertTab(),this.tabContainer.appendChild(k));if(c.clientWidth>this.tabContainer.clientWidth-e){null!=k&&(k.style.position="absolute",k.style.right="0px",c.style.marginRight="30px");var t=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");t.style.position="absolute";t.style.right=this.editor.chromeless?"29px":"55px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var d=this.createControlTab(4,"&nbsp;&#10095;");d.style.position="absolute";
d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=f+"px";mxEvent.addListener(t,"click",mxUtils.bind(this,function(b){c.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}));mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,
c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){c.scrollLeft+=Math.max(20,f-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
@@ -3810,58 +3811,58 @@ EditorUi.prototype.createControlTab=function(b,c,e){e=this.createTab(null!=e?e:!
EditorUi.prototype.createPageMenuTab=function(b){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var c=b.getElementsByTagName("div")[0];c.style.display="inline-block";c.style.marginTop="5px";c.style.width="21px";c.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();
var c=new mxPopupMenu(mxUtils.bind(this,function(b,c){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this,function(d){var e=b.addItem(this.pages[d].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[d])}),c),f=this.pages[d].getId();e.setAttribute("title",this.pages[d].getName()+(null!=f?" ("+f+")":"")+" ["+(d+1)+"]");this.pages[d]==this.currentPage&&b.addCheckmark(e,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){b.addSeparator(c);b.addItem(mxResources.get("insertPage"),
null,mxUtils.bind(this,function(){this.insertPage()}),c);var e=this.currentPage;null!=e&&(b.addSeparator(c),d=e.getName(),b.addItem(mxResources.get("removeIt",[d]),null,mxUtils.bind(this,function(){this.removePage(e)}),c),b.addItem(mxResources.get("renameIt",[d]),null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),c),b.addSeparator(c),b.addItem(mxResources.get("duplicateIt",[d]),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.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 e=mxEvent.getClientX(b),n=mxEvent.getClientY(b);c.popup(e,n,null,b);this.setCurrentMenu(c);mxEvent.consume(b)}));return b};
+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 e=mxEvent.getClientX(b),p=mxEvent.getClientY(b);c.popup(e,p,null,b);this.setCurrentMenu(c);mxEvent.consume(b)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.insertPage();mxEvent.consume(b)}));var c=b.getElementsByTagName("div")[0];c.style.display="inline-block";c.style.width="21px";c.style.height="21px";return b};
-EditorUi.prototype.createTabForPage=function(b,c,e,k){e=this.createTab(e);var g=b.getName()||mxResources.get("untitled"),n=b.getId();e.setAttribute("title",g+(null!=n?" ("+n+")":"")+" ["+k+"]");mxUtils.write(e,g);e.style.maxWidth=c+"px";e.style.width=c+"px";this.addTabListeners(b,e);42<c&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(b,c){mxEvent.disableContextMenu(c);var e=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(c){this.renamePage(b);mxEvent.consume(c)}));var k=!1,g=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){k=null!=this.currentMenu;g=b==this.currentPage;e.isMouseDown||g||this.selectPage(b)}),null,mxUtils.bind(this,function(n){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(n)&&g||mxEvent.isPopupTrigger(n))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!k){var t=new mxPopupMenu(this.createPageMenu(b));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);this.resetCurrentMenu();t.destroy()});var d=mxEvent.getClientX(n),f=mxEvent.getClientY(n);t.popup(d,f,null,n);this.setCurrentMenu(t,c)}mxEvent.consume(n)}}))};
+EditorUi.prototype.createTabForPage=function(b,c,e,k){e=this.createTab(e);var g=b.getName()||mxResources.get("untitled"),p=b.getId();e.setAttribute("title",g+(null!=p?" ("+p+")":"")+" ["+k+"]");mxUtils.write(e,g);e.style.maxWidth=c+"px";e.style.width=c+"px";this.addTabListeners(b,e);42<c&&(e.style.textOverflow="ellipsis");return e};
+EditorUi.prototype.addTabListeners=function(b,c){mxEvent.disableContextMenu(c);var e=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(c){this.renamePage(b);mxEvent.consume(c)}));var k=!1,g=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){k=null!=this.currentMenu;g=b==this.currentPage;e.isMouseDown||g||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(p)&&g||mxEvent.isPopupTrigger(p))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!k){var t=new mxPopupMenu(this.createPageMenu(b));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);this.resetCurrentMenu();t.destroy()});var d=mxEvent.getClientX(p),f=mxEvent.getClientY(p);t.popup(d,f,null,p);this.setCurrentMenu(t,c)}mxEvent.consume(p)}}))};
EditorUi.prototype.getLinkForPage=function(b,c,e){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var k=this.getCurrentFile();if(null!=k&&k.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var g=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),g=g+((0==g.length?"?":"&")+"page-id="+b.getId());null!=c&&(g+="&"+c.join("&"));return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+g+"#"+k.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,c){return mxUtils.bind(this,function(e,k){var g=this.editor.graph;e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),k);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),k);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,c)}),k);null!=this.getLinkForPage(b)&&(e.addSeparator(k),e.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,e,d,f,k,m){c=this.createUrlParameters(c,e,d,f,k,m);d||c.push("hide-pages=1");g.isSelectionEmpty()||(d=g.getBoundingBox(g.getSelectionCells()),e=g.view.translate,k=g.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-e.x,d.y=d.y/k-e.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,e,d,f,k,q){c=this.createUrlParameters(c,e,d,f,k,q);d||c.push("hide-pages=1");g.isSelectionEmpty()||(d=g.getBoundingBox(g.getSelectionCells()),e=g.view.translate,k=g.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-e.x,d.y=d.y/k-e.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
f=new EmbedDialog(this,this.getLinkForPage(b,c,f));this.showDialog(f.container,440,240,!0,!0);f.init()}))})));e.addSeparator(k);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),k);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(k),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),k))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){b=k.oldIndex;k.oldIndex=k.newIndex;k.newIndex=b;return k};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){b=k.previous;k.previous=k.name;k.name=b;return k};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");b.afterEncode=function(b,k,g){g.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(g.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(b,e){return 0>mxUtils.indexOf(c,
b)?e:void 0})),null!=k.relatedPage.root&&b.encodeCell(k.relatedPage.root,g));return g};b.beforeDecode=function(b,c,g){g.ui=b.ui;g.relatedPage=g.ui.getPageById(c.getAttribute("relatedPage"));if(null==g.relatedPage){var e=c.ownerDocument.createElement("diagram");e.setAttribute("id",c.getAttribute("relatedPage"));e.setAttribute("name",c.getAttribute("name"));g.relatedPage=new DiagramPage(e);e=c.getAttribute("viewState");null!=e&&(g.relatedPage.viewState=JSON.parse(e),c.removeAttribute("viewState"));
-c=c.cloneNode(!0);e=c.firstChild;if(null!=e)for(g.relatedPage.root=b.decodeCell(e,!1),g=e.nextSibling,e.parentNode.removeChild(e),e=g;null!=e;){g=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==b.lookup(k)&&b.decodeCell(e)}e.parentNode.removeChild(e);e=g}}return c};b.afterDecode=function(b,c,g){g.index=g.previousIndex;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,e,n,t,d){e=null!=e?e:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var f=n.slice(),g=0;g<n.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[g]),"treeFolding","0")&&this.foldTreeCell(c,n[g]);n=f;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=
+c=c.cloneNode(!0);e=c.firstChild;if(null!=e)for(g.relatedPage.root=b.decodeCell(e,!1),g=e.nextSibling,e.parentNode.removeChild(e),e=g;null!=e;){g=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==b.lookup(k)&&b.decodeCell(e)}e.parentNode.removeChild(e);e=g}}return c};b.afterDecode=function(b,c,g){g.index=g.previousIndex;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,e,p,t,d){e=null!=e?e:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var f=p.slice(),g=0;g<p.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[g]),"treeFolding","0")&&this.foldTreeCell(c,p[g]);p=f;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
function(b,c){this.model.beginUpdate();try{var e=[];this.traverse(c,!0,mxUtils.bind(this,function(b,f){var d=null!=f&&this.isTreeEdge(f);d&&e.push(f);b==c||null!=f&&!d||e.push(b);return(null==f||d)&&(b==c||!this.model.isCollapsed(b))}));this.model.setCollapsed(c,b);for(var g=0;g<e.length;g++)this.model.setVisible(e[g],!b)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(b){return!this.isEdgeIgnored(b)};Graph.prototype.getTreeEdges=function(b,c,e,t,d,f){return this.model.filterCells(this.getEdges(b,
c,e,t,d,f),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.prototype.getIncomingTreeEdges=function(b,c){return this.getTreeEdges(b,c,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(b,c){return this.getTreeEdges(b,c,!1,!0,!1)};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 b(b){return y.isVertex(b)&&e(b)}function c(b){var c=
-!1;null!=b&&(c="1"==u.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=y.getParent(b),c=u.view.getState(b),c="tree"==(null!=c?c.style:u.getCellStyle(b)).containerType);return c}function t(b){var c=!1;null!=b&&(b=y.getParent(b),c=u.view.getState(b),u.view.getState(b),c=null!=(null!=c?c.style:u.getCellStyle(b)).childLayout);return c}function d(b){b=u.view.getState(b);if(null!=b){var c=u.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=u.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
-null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(b,c){c=null!=c?c:!0;u.model.beginUpdate();try{var e=u.model.getParent(b),f=u.getIncomingTreeEdges(b),g=u.cloneCells([f[0],b]);u.model.setTerminal(g[0],u.model.getTerminal(f[0],
-!0),!0);var k=d(b),l=e.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;u.view.currentRoot!=e&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var m=u.view.getState(b),n=u.view.scale;if(null!=m){var p=mxRectangle.fromRectangle(m);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?p.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*n:p.y+=(c?
-b.geometry.height+10:-g[1].geometry.height-10)*n;var q=u.getOutgoingTreeEdges(u.model.getTerminal(f[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,v=l=f=0;v<q.length;v++){var A=u.model.getTerminal(q[v],!1);if(k==d(A)){var C=u.view.getState(A);A!=b&&null!=C&&(t&&c!=C.getCenterX()<m.getCenterX()||!t&&c!=C.getCenterY()<m.getCenterY())&&mxUtils.intersects(p,C)&&(f=10+Math.max(f,(Math.min(p.x+p.width,C.x+C.width)-Math.max(p.x,C.x))/n),l=10+Math.max(l,(Math.min(p.y+
-p.height,C.y+C.height)-Math.max(p.y,C.y))/n))}}t?l=0:f=0;for(v=0;v<q.length;v++)if(A=u.model.getTerminal(q[v],!1),k==d(A)&&(C=u.view.getState(A),A!=b&&null!=C&&(t&&c!=C.getCenterX()<m.getCenterX()||!t&&c!=C.getCenterY()<m.getCenterY()))){var x=[];u.traverse(C.cell,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&x.push(c);(null==c||d)&&x.push(b);return null==c||d});u.moveCells(x,(c?1:-1)*f,(c?1:-1)*l)}}}return u.addCells(g,e)}finally{u.model.endUpdate()}}function l(b){u.model.beginUpdate();try{var c=
-d(b),e=u.getIncomingTreeEdges(b),f=u.cloneCells([e[0],b]);u.model.setTerminal(e[0],f[1],!1);u.model.setTerminal(f[0],f[1],!0);u.model.setTerminal(f[0],b,!1);var g=u.model.getParent(b),k=g.geometry,l=[];u.view.currentRoot!=g&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);u.traverse(b,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var m=b.geometry.width+40,n=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?m=0:c==mxConstants.DIRECTION_NORTH?
-(m=0,n=-n):c==mxConstants.DIRECTION_WEST?(m=-m,n=0):c==mxConstants.DIRECTION_EAST&&(n=0);u.moveCells(l,m,n);return u.addCells(f,g)}finally{u.model.endUpdate()}}function m(b,c){u.model.beginUpdate();try{var e=u.model.getParent(b),f=u.getIncomingTreeEdges(b),g=d(b);0==f.length&&(f=[u.createEdge(e,null,"",null,null,u.createCurrentEdgeStyle())],g=c);var k=u.cloneCells([f[0],b]);u.model.setTerminal(k[0],b,!0);if(null==u.model.getTerminal(k[0],!1)){u.model.setTerminal(k[0],k[1],!1);var l=u.getCellStyle(k[1]).newEdgeStyle;
-if(null!=l)try{var m=JSON.parse(l),n;for(n in m)u.setCellStyles(n,m[n],[k[0]]),"edgeStyle"==n&&"elbowEdgeStyle"==m[n]&&u.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(W){}}var f=u.getOutgoingTreeEdges(b),p=e.geometry,l=[];u.view.currentRoot==e&&(p=new mxRectangle);for(m=0;m<f.length;m++){var q=u.model.getTerminal(f[m],!1);null!=q&&l.push(q)}var t=u.view.getBounds(l),v=u.view.translate,A=u.view.scale;g==mxConstants.DIRECTION_SOUTH?
-(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/A-v.x-p.x+10,k[1].geometry.y+=k[1].geometry.height-p.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/A-v.x+-p.x+10,k[1].geometry.y-=k[1].geometry.height+p.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+p.x+40):k[1].geometry.x+(k[1].geometry.width-p.x+40),k[1].geometry.y=null==t?b.geometry.y+
-(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/A-v.y+-p.y+10);return u.addCells(k,e)}finally{u.model.endUpdate()}}function p(b,c,d){b=u.getOutgoingTreeEdges(b);d=u.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=u.view.getState(u.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
-d.y-d.height})}return e}function q(b,c){var e=d(b),f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST)==f&&e!=c?v.actions.get("selectParent").funct():e==c?(f=u.getOutgoingTreeEdges(b),null!=f&&0<f.length&&u.setSelectionCell(u.model.getTerminal(f[0],!1))):(e=u.getIncomingTreeEdges(b),null!=e&&0<e.length&&(f=p(u.model.getTerminal(e[0],!0),f,b),e=u.view.getState(b),null!=e&&(e=mxUtils.indexOf(f,e),0<=e&&(e+=c==mxConstants.DIRECTION_NORTH||
-c==mxConstants.DIRECTION_WEST?-1:1,0<=e&&e<=f.length-1&&u.setSelectionCell(f[e].cell)))))}var v=this,u=v.editor.graph,y=u.getModel(),x=v.menus.createPopupMenu;v.menus.createPopupMenu=function(c,d,e){x.apply(this,arguments);if(1==u.getSelectionCount()){d=u.getSelectionCell();var f=u.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(u.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(u.getSelectionCell())?(c.addSeparator(),
-0<u.getIncomingTreeEdges(d).length&&this.addMenuItems(c,["selectSiblings","selectParent"],null,e)):0<u.model.getEdgeCount(d)&&this.addMenuItems(c,["selectConnections"],null,e)}};v.actions.addAction("selectChildren",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var b=u.getSelectionCell(),b=u.getOutgoingTreeEdges(b);if(null!=b){for(var c=[],d=0;d<b.length;d++)c.push(u.model.getTerminal(b[d],!1));u.setSelectionCells(c)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&
-1==u.getSelectionCount()){var b=u.getSelectionCell(),b=u.getIncomingTreeEdges(b);if(null!=b&&0<b.length&&(b=u.getOutgoingTreeEdges(u.model.getTerminal(b[0],!0)),null!=b)){for(var c=[],d=0;d<b.length;d++)c.push(u.model.getTerminal(b[d],!1));u.setSelectionCells(c)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var b=u.getSelectionCell(),b=u.getIncomingTreeEdges(b);null!=b&&0<b.length&&u.setSelectionCell(u.model.getTerminal(b[0],
-!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(b,c){var d=u.getSelectionCell();if(u.isEnabled()&&u.model.isVertex(d)){if(null!=c&&mxEvent.isAltDown(c))u.setSelectionCells(u.model.getTreeEdges(d,null==c||!mxEvent.isShiftDown(c),null==c||!mxEvent.isControlDown(c)));else{var e=[];u.traverse(d,!0,function(b,d){var f=null!=d&&u.isTreeEdge(d);f&&e.push(d);null!=d&&!f||null!=c&&mxEvent.isShiftDown(c)||e.push(b);return null==d||f})}u.setSelectionCells(e)}},null,null,"Alt+Shift+D");
-var D=u.removeCells;u.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];u.traverse(k,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=u.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
-f;return D.apply(this,arguments)};v.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var C=u.duplicateCells;u.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=u.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=u.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=C.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
-u.getIncomingTreeEdges(l[f]),k=u.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,u.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var G=u.moveCells;u.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var n=g,p=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||u.model.isEdge(c[q])&&null==u.model.getTerminal(c[q],
-!0)){g=u.model.getParent(c[q]);break}if(null!=n&&g!=n&&null!=this.view.getState(c[0])){var t=u.getIncomingTreeEdges(c[0]);if(0<t.length){var v=u.view.getState(u.model.getTerminal(t[0],!0));if(null!=v){var A=u.view.getState(n);null!=A&&(d=(A.getCenterX()-v.getCenterX())/u.view.scale,e=(A.getCenterY()-v.getCenterY())/u.view.scale)}}}}m=G.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
-!0))&&this.model.setTerminal(m[q],n,!0);else if(b(c[q])&&(t=u.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(n)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==u.getIncomingTreeEdges(m[q]).length){p=n;if(null==p||p==u.model.getParent(c[q]))p=u.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,u.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=v.sidebar){var J=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=
-function(c,d,e,f){var g=u.model,k=null;g.beginUpdate();try{if(k=J.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=u.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},H=v.onKeyDown;v.onKeyDown=function(c){try{if(u.isEnabled()&&
-!u.isEditing()&&b(u.getSelectionCell())&&1==u.getSelectionCount()){var d=null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(u.getSelectionCell()):m(u.getSelectionCell()):13==c.which&&(d=f(u.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&u.model.isEdge(d[0])?u.setSelectionCell(u.model.getTerminal(d[0],!1)):u.setSelectionCell(d[d.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(u.view.getState(u.getSelectionCell())),
-u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(q(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(q(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(q(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(q(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(c))}}catch(E){v.handleError(E)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var K=u.connectVertex;u.connectVertex=function(c,e,g,k,n,p,q){var t=u.getIncomingTreeEdges(c);if(b(c)){var v=d(c),A=v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST,C=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return v==e||0==t.length?m(c,e):A==C?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return K.apply(this,arguments)};u.getSubtree=function(d){var e=
-[d];!c(d)&&!b(d)||t(d)||u.traverse(d,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var A=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){A.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+!1;null!=b&&(c="1"==v.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=y.getParent(b),c=v.view.getState(b),c="tree"==(null!=c?c.style:v.getCellStyle(b)).containerType);return c}function t(b){var c=!1;null!=b&&(b=y.getParent(b),c=v.view.getState(b),v.view.getState(b),c=null!=(null!=c?c.style:v.getCellStyle(b)).childLayout);return c}function d(b){b=v.view.getState(b);if(null!=b){var c=v.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=v.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
+null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(b,c){c=null!=c?c:!0;v.model.beginUpdate();try{var e=v.model.getParent(b),f=v.getIncomingTreeEdges(b),g=v.cloneCells([f[0],b]);v.model.setTerminal(g[0],v.model.getTerminal(f[0],
+!0),!0);var k=d(b),l=e.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;v.view.currentRoot!=e&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var m=v.view.getState(b),p=v.view.scale;if(null!=m){var n=mxRectangle.fromRectangle(m);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?n.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*p:n.y+=(c?
+b.geometry.height+10:-g[1].geometry.height-10)*p;var q=v.getOutgoingTreeEdges(v.model.getTerminal(f[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,u=l=f=0;u<q.length;u++){var A=v.model.getTerminal(q[u],!1);if(k==d(A)){var x=v.view.getState(A);A!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(n,x)&&(f=10+Math.max(f,(Math.min(n.x+n.width,x.x+x.width)-Math.max(n.x,x.x))/p),l=10+Math.max(l,(Math.min(n.y+
+n.height,x.y+x.height)-Math.max(n.y,x.y))/p))}}t?l=0:f=0;for(u=0;u<q.length;u++)if(A=v.model.getTerminal(q[u],!1),k==d(A)&&(x=v.view.getState(A),A!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var C=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&C.push(c);(null==c||d)&&C.push(b);return null==c||d});v.moveCells(C,(c?1:-1)*f,(c?1:-1)*l)}}}return v.addCells(g,e)}finally{v.model.endUpdate()}}function l(b){v.model.beginUpdate();try{var c=
+d(b),e=v.getIncomingTreeEdges(b),f=v.cloneCells([e[0],b]);v.model.setTerminal(e[0],f[1],!1);v.model.setTerminal(f[0],f[1],!0);v.model.setTerminal(f[0],b,!1);var g=v.model.getParent(b),k=g.geometry,l=[];v.view.currentRoot!=g&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);v.traverse(b,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var m=b.geometry.width+40,p=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?m=0:c==mxConstants.DIRECTION_NORTH?
+(m=0,p=-p):c==mxConstants.DIRECTION_WEST?(m=-m,p=0):c==mxConstants.DIRECTION_EAST&&(p=0);v.moveCells(l,m,p);return v.addCells(f,g)}finally{v.model.endUpdate()}}function q(b,c){v.model.beginUpdate();try{var e=v.model.getParent(b),f=v.getIncomingTreeEdges(b),g=d(b);0==f.length&&(f=[v.createEdge(e,null,"",null,null,v.createCurrentEdgeStyle())],g=c);var k=v.cloneCells([f[0],b]);v.model.setTerminal(k[0],b,!0);if(null==v.model.getTerminal(k[0],!1)){v.model.setTerminal(k[0],k[1],!1);var l=v.getCellStyle(k[1]).newEdgeStyle;
+if(null!=l)try{var m=JSON.parse(l),p;for(p in m)v.setCellStyles(p,m[p],[k[0]]),"edgeStyle"==p&&"elbowEdgeStyle"==m[p]&&v.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(W){}}var f=v.getOutgoingTreeEdges(b),n=e.geometry,l=[];v.view.currentRoot==e&&(n=new mxRectangle);for(m=0;m<f.length;m++){var q=v.model.getTerminal(f[m],!1);null!=q&&l.push(q)}var t=v.view.getBounds(l),u=v.view.translate,A=v.view.scale;g==mxConstants.DIRECTION_SOUTH?
+(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/A-u.x-n.x+10,k[1].geometry.y+=k[1].geometry.height-n.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/A-u.x+-n.x+10,k[1].geometry.y-=k[1].geometry.height+n.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+n.x+40):k[1].geometry.x+(k[1].geometry.width-n.x+40),k[1].geometry.y=null==t?b.geometry.y+
+(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/A-u.y+-n.y+10);return v.addCells(k,e)}finally{v.model.endUpdate()}}function m(b,c,d){b=v.getOutgoingTreeEdges(b);d=v.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=v.view.getState(v.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
+d.y-d.height})}return e}function n(b,c){var e=d(b),f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST)==f&&e!=c?u.actions.get("selectParent").funct():e==c?(f=v.getOutgoingTreeEdges(b),null!=f&&0<f.length&&v.setSelectionCell(v.model.getTerminal(f[0],!1))):(e=v.getIncomingTreeEdges(b),null!=e&&0<e.length&&(f=m(v.model.getTerminal(e[0],!0),f,b),e=v.view.getState(b),null!=e&&(e=mxUtils.indexOf(f,e),0<=e&&(e+=c==mxConstants.DIRECTION_NORTH||
+c==mxConstants.DIRECTION_WEST?-1:1,0<=e&&e<=f.length-1&&v.setSelectionCell(f[e].cell)))))}var u=this,v=u.editor.graph,y=v.getModel(),x=u.menus.createPopupMenu;u.menus.createPopupMenu=function(c,d,e){x.apply(this,arguments);if(1==v.getSelectionCount()){d=v.getSelectionCell();var f=v.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(v.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(v.getSelectionCell())?(c.addSeparator(),
+0<v.getIncomingTreeEdges(d).length&&this.addMenuItems(c,["selectSiblings","selectParent"],null,e)):0<v.model.getEdgeCount(d)&&this.addMenuItems(c,["selectConnections"],null,e)}};u.actions.addAction("selectChildren",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getOutgoingTreeEdges(b);if(null!=b){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(v.isEnabled()&&
+1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);if(null!=b&&0<b.length&&(b=v.getOutgoingTreeEdges(v.model.getTerminal(b[0],!0)),null!=b)){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);null!=b&&0<b.length&&v.setSelectionCell(v.model.getTerminal(b[0],
+!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(b,c){var d=v.getSelectionCell();if(v.isEnabled()&&v.model.isVertex(d)){if(null!=c&&mxEvent.isAltDown(c))v.setSelectionCells(v.model.getTreeEdges(d,null==c||!mxEvent.isShiftDown(c),null==c||!mxEvent.isControlDown(c)));else{var e=[];v.traverse(d,!0,function(b,d){var f=null!=d&&v.isTreeEdge(d);f&&e.push(d);null!=d&&!f||null!=c&&mxEvent.isShiftDown(c)||e.push(b);return null==d||f})}v.setSelectionCells(e)}},null,null,"Alt+Shift+D");
+var D=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
+f;return D.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var C=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=C.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
+v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var p=this.cloneCell(k[0]);this.addEdge(p,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var G=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var p=g,n=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
+!0)){g=v.model.getParent(c[q]);break}if(null!=p&&g!=p&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var A=v.view.getState(p);null!=A&&(d=(A.getCenterX()-u.getCenterX())/v.view.scale,e=(A.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=G.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(p)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
+!0))&&this.model.setTerminal(m[q],p,!0);else if(b(c[q])&&(t=v.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(p)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],p,!0);else if(0==v.getIncomingTreeEdges(m[q]).length){n=p;if(null==n||n==v.model.getParent(c[q]))n=v.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,v.getDefaultParent(),n,m[q])}}finally{this.model.endUpdate()}return m};if(null!=u.sidebar){var J=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
+function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=J.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=v.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},H=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
+!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(v.getSelectionCell()):q(v.getSelectionCell()):13==c.which&&(d=f(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
+v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(n(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(n(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(n(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(n(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(c))}}catch(E){u.handleError(E)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var K=v.connectVertex;v.connectVertex=function(c,e,g,k,m,p,n){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),A=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?q(c,e):A==x?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return K.apply(this,arguments)};v.getSubtree=function(d){var e=
+[d];!c(d)&&!b(d)||t(d)||v.traverse(d,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var A=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){A.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(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(b){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(b);
-this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(b)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.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 Q=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){Q.apply(this,
+this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(b)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.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 Q=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){Q.apply(this,
arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var T=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){T.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=e.apply(this,arguments),c=this.graph;return b.concat([this.addEntry("tree container",
function(){var b=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");b.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 d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);b.insert(e);b.insert(c);b.insert(d);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var b=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
b.vertex=!0;var c=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');c.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-g.vertex=!0;var 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);g.insertEdge(k,!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 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;c.insertEdge(q,!0);p.insertEdge(q,!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 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;c.insertEdge(u,!0);v.insertEdge(u,!1);b.insert(e);b.insert(k);b.insert(q);b.insert(u);b.insert(c);b.insert(d);b.insert(g);b.insert(p);b.insert(v);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=new mxCell("Central Idea",
+g.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);g.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 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;c.insertEdge(n,!0);m.insertEdge(n,!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 v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.relative=!0;v.edge=!0;c.insertEdge(v,!0);u.insertEdge(v,!1);b.insert(e);b.insert(k);b.insert(n);b.insert(v);b.insert(c);b.insert(d);b.insert(g);b.insert(m);b.insert(u);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=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;');b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var b=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var b=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;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 c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree orgchart organization division",function(){var b=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -3888,27 +3889,27 @@ EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxRes
function(b){if(Editor.darkMode!=b){var c=this.editor.graph;Editor.darkMode=b;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";this.setGridColor(Editor.isDarkMode()?c.view.defaultDarkGridColor:c.view.defaultGridColor);c.defaultPageBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";c.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";c.loadStylesheet();
null!=this.actions.layersWindow&&(b=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,b&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Dialog.backdropColor=Editor.isDarkMode()?"#2a2a2a":"white";
StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;
-document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";n.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }":
+document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";p.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html body .geStatus { padding-top:3px !important; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?"#2a2a2a":"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var n=document.createElement("style");n.type="text/css";n.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(n);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var t=EditorUi.prototype.updateTabContainer;
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var p=document.createElement("style");p.type="text/css";p.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(p);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var t=EditorUi.prototype.updateTabContainer;
EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");t.apply(this,arguments)};var d=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){d.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var f=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(b,
c){null!=c.shortcut&&900>e&&!mxClient.IS_IOS?b.firstChild.nextSibling.setAttribute("title",c.shortcut):f.apply(this,arguments)};var l=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){l.apply(this,arguments);if(null!=this.userElement){var b=this.userElement;b.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+b.style.display;b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.userImage+")";b.style.backgroundPosition="center center";
-b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var m=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){m.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
+b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.shareImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var b=
document.createElement("div");b.style.display="inline-block";b.style.position="relative";b.style.marginTop="6px";b.style.marginRight="4px";var c=document.createElement("a");c.className="geMenuItem gePrimaryBtn";c.style.marginLeft="8px";c.style.padding="6px";if("1"==urlParams.noSaveBtn){var d="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,d);c.setAttribute("title",d);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
b.appendChild(c)}else 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()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",d),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top=
-"6px"}};var p=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=p.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);e.x+=d.x-16;e.y+=d.y;return e};var q=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=
-function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;q.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()&&this.addMenuItems(b,["-","lockUnlock"],null,d)):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),this.addMenuItems(b,["collapsible","-","lockUnlock","enterGroup"],null,d),b.addSeparator(),this.addSubmenu("layout",b)):e.isSelectionEmpty()&&
-e.isEnabled()?(b.addSeparator(),this.addMenuItems(b,["editData"],null,d),b.addSeparator(),this.addSubmenu("layout",b),this.addSubmenu("insert",b),this.addMenuItems(b,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(b,["-","lockUnlock"],null,d);e.isEnabled()&&e.isSelectionEmpty()&&(this.addMenuItems(b,["-","fullscreen"]),(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(b,["toggleDarkMode"]))};var v=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=
-function(b,c,d){v.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(b,["copyAsImage"],null,d)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),
+"6px"}};var m=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=m.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);e.x+=d.x-16;e.y+=d.y;return e};var n=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=
+function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;n.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()&&this.addMenuItems(b,["-","lockUnlock"],null,d)):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),this.addMenuItems(b,["collapsible","-","lockUnlock","enterGroup"],null,d),b.addSeparator(),this.addSubmenu("layout",b)):e.isSelectionEmpty()&&
+e.isEnabled()?(b.addSeparator(),this.addMenuItems(b,["editData"],null,d),b.addSeparator(),this.addSubmenu("layout",b),this.addSubmenu("insert",b),this.addMenuItems(b,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(b,["-","lockUnlock"],null,d);e.isEnabled()&&e.isSelectionEmpty()&&(this.addMenuItems(b,["-","fullscreen"]),(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(b,["toggleDarkMode"]))};var u=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=
+function(b,c,d){u.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(b,["copyAsImage"],null,d)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var v=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.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);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);u.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;
+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);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);v.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;
EditorUi.prototype.setGraphEnabled=function(b){y.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else 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 d=this.editorUi,e=d.editor.graph;d.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";d.actions.get("createShape").label=mxResources.get("shape")+"...";d.actions.get("outline").label=mxResources.get("outline")+"...";d.actions.get("layers").label=mxResources.get("layers")+"...";d.actions.get("tags").label=mxResources.get("tags")+"...";d.actions.get("forkme").visible="1"!=urlParams.sketch;
d.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;var f=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(b){d.setDarkMode(!Editor.darkMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.isDarkMode()});f=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(b){d.setSketchMode(!Editor.sketchMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.sketchMode});f=d.actions.put("togglePagesVisible",
@@ -3946,12 +3947,12 @@ q.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabConta
"0px":"47px";var B=n.menus.get("viewZoom"),F="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,Z="1"==urlParams.sketch?document.createElement("div"):null,I="1"==urlParams.sketch?document.createElement("div"):null,ba="1"==urlParams.sketch?document.createElement("div"):null,ca=mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&
(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.view.validateBackground()});n.addListener("darkModeChanged",ca);n.addListener("sketchModeChanged",ca);Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=n.hoverIcons){var da=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||
da.apply(this,arguments)}}if(null!=p.freehand){var ka=p.freehand.createStyle;p.freehand.createStyle=function(b){return ka.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){I.className="geToolbarContainer";Z.className="geToolbarContainer";ba.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=I;var ma=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){ma||(n.statusContainer.style.display=
-"none")});var ia=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&(q.style.visibility=14>q.clientWidth?"hidden":"",n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&null==n.statusContainer.firstChild.getAttribute("class")){var b=null!=n.statusContainer.firstChild?
-n.statusContainer.firstChild.getAttribute("title"):n.editor.getStatus();ia(b);var c=n.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(c))+'..."src="'+Editor.tailSpin+'">',n.statusContainer.style.display="inline-block",ma=!0):6<n.buttonContainer.clientWidth&&(n.statusContainer.style.display="none",ma=!1)}else n.statusContainer.style.display="inline-block",ia(null),
-ma=!0;q.style.visibility=12<q.clientWidth?"":"hidden"})));P=d("diagram",null,Editor.menuImage);P.style.boxShadow="none";P.style.padding="6px";P.style.margin="0px";ba.appendChild(P);mxEvent.disableContextMenu(P);mxEvent.addGestureListeners(P,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position="";n.statusContainer.style.display="none";
-n.statusContainer.style.margin="0px";n.statusContainer.style.padding="6px 0px";n.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";n.statusContainer.style.display="inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var W=document.createElement("a");W.style.padding="0px";W.style.boxShadow="none";W.className="geMenuItem";W.style.display="inline-block";W.style.width=
-"40px";W.style.height="12px";W.style.marginBottom="-2px";W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";W.style.backgroundPosition="top center";W.style.backgroundRepeat="no-repeat";W.setAttribute("title","Minimize");var na=!1,V=mxUtils.bind(this,function(){I.innerHTML="";if(!na){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";b.style.opacity="0.7";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";
-b.style.margin="2px 0px";I.appendChild(b);mxUtils.br(I);return b};c(n.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!0,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(n.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+"none")});var ia=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&(q.style.visibility=14>q.clientWidth?"hidden":"",n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&"function"===typeof n.statusContainer.firstChild.getAttribute&&null==n.statusContainer.firstChild.getAttribute("class")){var b=
+null!=n.statusContainer.firstChild?n.statusContainer.firstChild.getAttribute("title"):n.editor.getStatus();ia(b);var c=n.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(c))+'..."src="'+Editor.tailSpin+'">',n.statusContainer.style.display="inline-block",ma=!0):6<n.buttonContainer.clientWidth&&(n.statusContainer.style.display="none",ma=!1)}else n.statusContainer.style.display=
+"inline-block",ia(null),ma=!0;q.style.visibility=12<q.clientWidth?"":"hidden"})));P=d("diagram",null,Editor.menuImage);P.style.boxShadow="none";P.style.padding="6px";P.style.margin="0px";ba.appendChild(P);mxEvent.disableContextMenu(P);mxEvent.addGestureListeners(P,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position="";n.statusContainer.style.display=
+"none";n.statusContainer.style.margin="0px";n.statusContainer.style.padding="6px 0px";n.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";n.statusContainer.style.display="inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var W=document.createElement("a");W.style.padding="0px";W.style.boxShadow="none";W.className="geMenuItem";W.style.display="inline-block";
+W.style.width="40px";W.style.height="12px";W.style.marginBottom="-2px";W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";W.style.backgroundPosition="top center";W.style.backgroundRepeat="no-repeat";W.setAttribute("title","Minimize");var na=!1,V=mxUtils.bind(this,function(){I.innerHTML="";if(!na){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";b.style.opacity="0.7";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=
+null!=d?d:"default";b.style.margin="2px 0px";I.appendChild(b);mxUtils.br(I);return b};c(n.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!0,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(n.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));c(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,
20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var e=n.actions.get("toggleShapes");b(e,mxResources.get("shapes")+" ("+e.shortcut+
@@ -3969,7 +3970,7 @@ Z.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;
" (Alt+Mousewheel)");P.style.whiteSpace="nowrap";P.style.paddingRight="10px";P.style.textDecoration="none";P.style.textDecoration="none";P.style.overflow="hidden";P.style.visibility="hidden";P.style.textAlign="center";P.style.cursor="pointer";P.style.height=parseInt(n.tabContainerHeight)-1+"px";P.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px";P.style.position="absolute";P.style.display="block";P.style.fontSize="12px";P.style.width="59px";P.style.right="0px";P.style.bottom="0px";P.style.backgroundImage=
"url("+mxWindow.prototype.minimizeImage+")";P.style.backgroundPosition="right 6px center";P.style.backgroundRepeat="no-repeat";y.appendChild(P)}(function(b){var c=mxUtils.bind(this,function(){b.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,c);n.editor.addListener("resetGraphView",c);n.editor.addListener("pageSelected",c)})(P);var sa=n.setGraphEnabled;n.setGraphEnabled=function(){sa.apply(this,arguments);null!=this.tabContainer&&(P.style.visibility=
this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==Z?this.tabContainerHeight+"px":"0px")}}y.appendChild(q);y.appendChild(n.diagramContainer);l.appendChild(y);n.updateTabContainer();null==Z&&y.appendChild(n.tabContainer);var la=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();
-null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,g,n,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=g;this.isResolved=n;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,g){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,g){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=g};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\nbringForward=Bring Forward\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\ncompare=Compare\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.\ncontainer=Container\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.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\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.\ncopyData=Copy Data\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.\nlicenseRequired=This feature requires draw.io to be licensed.\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\nmerge=Merge\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\nnotion=Notion\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\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\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\nradial=Radial\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\nsendBackward=Send Backward\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\ntooLargeUseDownload=Too large, use download instead.\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\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\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;
+null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,g,p,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=g;this.isResolved=p;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,g){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,g){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=g};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\nbringForward=Bring Forward\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\ncompare=Compare\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.\ncontainer=Container\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.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\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.\ncopyData=Copy Data\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.\nlicenseRequired=This feature requires draw.io to be licensed.\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\nmerge=Merge\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\nnotion=Notion\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\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\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\nradial=Radial\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\nsendBackward=Send Backward\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\ntooLargeUseDownload=Too large, use download instead.\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\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\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(b,c,e){this.init(b,c,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
GraphViewer.prototype.init=function(b,c,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
@@ -3979,18 +3980,18 @@ this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageI
this.graph.dialect==mxConstants.DIALECT_SVG){var e=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?e.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(e.style.padding="8px");e.style.boxSizing="border-box";e.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var b=this.view.graphBounds,c=this.view.translate;e.setAttribute("viewBox",b.x+c.x-this.panDx+" "+(b.y+c.y-this.panDy)+" "+(b.width+1)+
" "+(b.height+1));this.container.style.backgroundColor=e.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",b))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(b){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&
(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=c&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(b){return d.getImageUrl(b)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var f=this.xmlNode.getElementsByTagName("diagram");if(0<f.length){if(null!=this.pageId)for(var g=
-0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(b){var c=f[d.currentPage];return"page"==b?c.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==b?d.currentPage+1:"pagecount"==b?f.length:k.apply(this,arguments)}}}this.diagrams=[];var n=null;this.selectPage=function(b){this.handlingResize||(this.currentPage=mxUtils.mod(b,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
-this.selectPageById=function(b){b=this.getIndexById(b);var c=0<=b;c&&this.selectPage(b);return c};var g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=n&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),n=this.xmlNode)}),q=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(b){if(null!=b&&Graph.isPageLink(b.src)){var c=b.src,e=c.indexOf(",");0<e&&(e=d.getIndexById(c.substring(e+1)),0<=e&&(b=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[e])),
-b.originalSrc=c))}q.apply(this,arguments)};var v=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=v.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale;c.add(new mxRectangle((d.x+b.x)*e,(d.y+b.y)*e,b.width*e,b.height*e))}return c};this.addListener("xmlNodeChanged",g);g();urlParams.page=d.currentPage;g=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),
+0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(b){var c=f[d.currentPage];return"page"==b?c.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==b?d.currentPage+1:"pagecount"==b?f.length:k.apply(this,arguments)}}}this.diagrams=[];var m=null;this.selectPage=function(b){this.handlingResize||(this.currentPage=mxUtils.mod(b,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
+this.selectPageById=function(b){b=this.getIndexById(b);var c=0<=b;c&&this.selectPage(b);return c};var g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=m&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),m=this.xmlNode)}),n=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(b){if(null!=b&&Graph.isPageLink(b.src)){var c=b.src,e=c.indexOf(",");0<e&&(e=d.getIndexById(c.substring(e+1)),0<=e&&(b=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[e])),
+b.originalSrc=c))}n.apply(this,arguments)};var p=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=p.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale;c.add(new mxRectangle((d.x+b.x)*e,(d.y+b.y)*e,b.width*e,b.height*e))}return c};this.addListener("xmlNodeChanged",g);g();urlParams.page=d.currentPage;g=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),
this.graph.view.scale=this.graphConfig.zoom||1,g=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=
!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),
-scale:this.graph.view.scale};null!=g&&this.setLayersVisible(g);this.graph.customLinkClicked=function(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");d.selectPageById(b.substring(c+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(b);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||
-window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof e){var g=this.getObservableParent(b),n=new e(mxUtils.bind(this,function(c){0<b.offsetWidth&&(n.disconnect(),k())}));n.observe(g,{attributes:!0})}else k()}};GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};
+scale:this.graph.view.scale};null!=g&&this.setLayersVisible(g);this.graph.customLinkClicked=function(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");d.selectPageById(b.substring(c+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(b);return!0};var v=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return v.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||
+window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof e){var g=this.getObservableParent(b),p=new e(mxUtils.bind(this,function(c){0<b.offsetWidth&&(p.disconnect(),k())}));p.observe(g,{attributes:!0})}else k()}};GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};
GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
GraphViewer.prototype.getImageForGraphModel=function(b){var c=Graph.createOffscreenGraph(this.graph.getStylesheet());c.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(c.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;c.model.setRoot(b);b=c.getSvg();var e=c.getGraphBounds();document.body.removeChild(c.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),e.width,e.height,e.x,e.y)};
GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==b)return c;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(b){var c=!0;if(!this.autoOrigin){var e=[],k=this.graph.getModel();k.beginUpdate();try{for(var g=0;g<k.getChildCount(k.root);g++){var n=k.getChildAt(k.root,g),c=c&&k.isVisible(n);e.push(k.isVisible(n));k.setVisible(n,null!=b?b[g]:!0)}}finally{k.endUpdate()}}return c?null:e};
+GraphViewer.prototype.setLayersVisible=function(b){var c=!0;if(!this.autoOrigin){var e=[],k=this.graph.getModel();k.beginUpdate();try{for(var g=0;g<k.getChildCount(k.root);g++){var p=k.getChildAt(k.root,g),c=c&&k.isVisible(p);e.push(k.isVisible(p));k.setVisible(p,null!=b?b[g]:!0)}}finally{k.endUpdate()}}return c?null:e};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var c=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),c=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(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};c&&this.setLayersVisible(c)}};
GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,c=this.graph.getGraphBounds(),e=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var k=mxUtils.bind(this,function(){if(!e){e=!0;var c=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?c.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var c=b.getBoundingClientRect(),f=mxUtils.getScrollOrigin(document.body),
@@ -3998,31 +3999,31 @@ f="relative"===document.body.style.position?document.body.getBoundingClientRect(
this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());e=!1}}),g=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(c){var d=b.offsetWidth;d==g||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=c?c:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,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},g=d,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",k),this.graph.addListener("size",k)):new ResizeSensor(this.graph.container,k));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||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,c.width+2*this.graph.border),
-0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,c.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var n=g=null,k=mxUtils.bind(this,function(){window.clearTimeout(n);this.handlingResize||(n=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",k):new ResizeSensor(this.graph.container,k))}else 9>=document.documentMode||this.graph.addListener("size",
+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,c.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=g=null,k=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",k):new ResizeSensor(this.graph.container,k))}else 9>=document.documentMode||this.graph.addListener("size",
k);var t=mxUtils.bind(this,function(d){var e=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var k=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==d&&this.allowZoomOut&&(this.allowZoomIn||c.width+2*this.graph.border>b.offsetWidth||c.height+2*this.graph.border>k)?(d=null,null!=k&&c.height+2*this.graph.border>k-2&&(d=(k-2*this.graph.border-2)/c.height),this.fitGraph(d)):this.widthIsEmpty||
null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-c.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-c.y/this.graph.view.scale)+d.y),g=b.offsetWidth):this.graph.center((!this.widthIsEmpty||c.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=e});8==document.documentMode?window.setTimeout(t,0):t();this.positionGraph=function(b){c=this.graph.getGraphBounds();g=null;t(b)}};
GraphViewer.prototype.crop=function(){var b=this.graph,c=b.getGraphBounds(),e=b.border,k=b.view.scale;b.view.setTranslate(null!=c.x?Math.floor(b.view.translate.x-c.x/k+e):e,null!=c.y?Math.floor(b.view.translate.y-c.y/k+e):e)};GraphViewer.prototype.updateContainerWidth=function(b,c){b.style.width=c+"px"};GraphViewer.prototype.updateContainerHeight=function(b,c){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=c+"px"};
-GraphViewer.prototype.showLayers=function(b,c){var e=this.graphConfig.layers,e=null!=e&&0<e.length?e.split(" "):[],k=this.graphConfig.layerIds,g=null!=k&&0<k.length,n=!1;if(0<e.length||g||null!=c){var t=null!=c?c.getModel():null,n=b.getModel();n.beginUpdate();try{var d=n.getChildCount(n.root);if(null==t){var t=!1,f={};if(g)for(var l=0;l<k.length;l++){var m=n.getCell(k[l]);null!=m&&(t=!0,f[m.id]=!0)}else for(l=0;l<e.length;l++)m=n.getChildAt(n.root,parseInt(e[l])),null!=m&&(t=!0,f[m.id]=!0);for(l=
-0;t&&l<d;l++)m=n.getChildAt(n.root,l),n.setVisible(m,f[m.id]||!1)}else for(l=0;l<d;l++)n.setVisible(n.getChildAt(n.root,l),t.isVisible(t.getChildAt(t.root,l)))}finally{n.endUpdate()}n=!0}return n};
+GraphViewer.prototype.showLayers=function(b,c){var e=this.graphConfig.layers,e=null!=e&&0<e.length?e.split(" "):[],k=this.graphConfig.layerIds,g=null!=k&&0<k.length,p=!1;if(0<e.length||g||null!=c){var t=null!=c?c.getModel():null,p=b.getModel();p.beginUpdate();try{var d=p.getChildCount(p.root);if(null==t){var t=!1,f={};if(g)for(var l=0;l<k.length;l++){var q=p.getCell(k[l]);null!=q&&(t=!0,f[q.id]=!0)}else for(l=0;l<e.length;l++)q=p.getChildAt(p.root,parseInt(e[l])),null!=q&&(t=!0,f[q.id]=!0);for(l=
+0;t&&l<d;l++)q=p.getChildAt(p.root,l),p.setVisible(q,f[q.id]||!1)}else for(l=0;l<d;l++)p.setVisible(p.getChildAt(p.root,l),t.isVisible(t.getChildAt(t.root,l)))}finally{p.endUpdate()}p=!0}return p};
GraphViewer.prototype.addToolbar=function(){function b(b,c,d,f){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",b);null!=d&&g.setAttribute("title",d);g.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",c);b.style.width="18px";null==f||f?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
-function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(b);e.appendChild(g);m++;return g}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 e=c.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
-e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,g=null,n=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(e,0);k=null;g=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";g=null}),100)}),b||200)}),t=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,b||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(t(30),n())}));mxEvent.addListener(e,mxClient.IS_POINTER?
+function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(b);e.appendChild(g);q++;return g}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 e=c.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
+e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,g=null,p=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(e,0);k=null;g=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";g=null}),100)}),b||200)}),t=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,b||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(t(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?
"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(b){t(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(b){t(100);mxEvent.consume(b)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||t(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?n():t(30))}})}for(var l=this.toolbarItems,m=0,p=null,q=null,v=null,u=null,y=0;y<l.length;y++){var x=l[y];if("pages"==x){u=c.ownerDocument.createElement("div");
-u.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var D=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");D.style.borderRightStyle="none";D.style.paddingLeft="0px";D.style.paddingRight="0px";e.appendChild(u);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");C.style.paddingLeft="0px";C.style.paddingRight="0px";x=mxUtils.bind(this,function(){u.innerHTML="";mxUtils.write(u,this.currentPage+1+" / "+this.diagrams.length);u.style.display=1<this.diagrams.length?"inline-block":"none";D.style.display=u.style.display;C.style.display=u.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)this.zoomEnabled&&(b(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(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"==x){if(this.layersEnabled){var G=this.graph.getModel(),J=b(mxUtils.bind(this,function(b){if(null!=p)p.parentNode.removeChild(p),
-p=null;else{p=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&
-(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});b=J.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily=Editor.defaultHtmlFont;p.style.fontSize=
-"11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var c=mxUtils.getDocumentScrollOrigin(document);p.style.left=c.x+b.left-1+"px";p.style.top=c.y+b.bottom-2+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");G.addListener(mxEvent.CHANGE,function(){J.style.display=1<G.getChildCount(G.root)?"inline-block":"none"});J.style.display=1<G.getChildCount(G.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
-function(b){null==q&&(q=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),q.div.getElementsByTagName("div")[0].style.position="",q.div.style.maxHeight="160px",q.div.style.maxWidth="120px",q.div.style.padding="2px",q.div.style.overflow="auto",q.div.style.height="auto",q.div.style.position="fixed",q.div.style.fontFamily=Editor.defaultHtmlFont,q.div.style.fontSize="11px",q.div.style.backgroundColor="#eee",q.div.style.color="#000",q.div.style.border="1px solid #d0d0d0",q.div.style.zIndex=
-this.toolbarZIndex+1,mxUtils.setOpacity(q.div,80));if(null!=v)v.parentNode.removeChild(v),v=null;else{v=q.div;mxEvent.addListener(v,"mouseleave",function(){v.parentNode.removeChild(v);v=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);v.style.left=c.x+b.left-1+"px";v.style.top=c.y+b.bottom-2+"px";document.body.appendChild(v);q.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");G.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){L.style.display=0<
+this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?p():t(30))}})}for(var l=this.toolbarItems,q=0,m=null,n=null,u=null,v=null,y=0;y<l.length;y++){var x=l[y];if("pages"==x){v=c.ownerDocument.createElement("div");
+v.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(v,70);var D=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");D.style.borderRightStyle="none";D.style.paddingLeft="0px";D.style.paddingRight="0px";e.appendChild(v);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");C.style.paddingLeft="0px";C.style.paddingRight="0px";x=mxUtils.bind(this,function(){v.innerHTML="";mxUtils.write(v,this.currentPage+1+" / "+this.diagrams.length);v.style.display=1<this.diagrams.length?"inline-block":"none";D.style.display=v.style.display;C.style.display=v.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)this.zoomEnabled&&(b(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(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"==x){if(this.layersEnabled){var G=this.graph.getModel(),J=b(mxUtils.bind(this,function(b){if(null!=m)m.parentNode.removeChild(m),
+m=null;else{m=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&
+(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(m,"mouseleave",function(){m.parentNode.removeChild(m);m=null});b=J.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=Editor.defaultHtmlFont;m.style.fontSize=
+"11px";m.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(m,80);var c=mxUtils.getDocumentScrollOrigin(document);m.style.left=c.x+b.left-1+"px";m.style.top=c.y+b.bottom-2+"px";document.body.appendChild(m)}}),Editor.layersImage,mxResources.get("layers")||"Layers");G.addListener(mxEvent.CHANGE,function(){J.style.display=1<G.getChildCount(G.root)?"inline-block":"none"});J.style.display=1<G.getChildCount(G.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
+function(b){null==n&&(n=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),n.div.getElementsByTagName("div")[0].style.position="",n.div.style.maxHeight="160px",n.div.style.maxWidth="120px",n.div.style.padding="2px",n.div.style.overflow="auto",n.div.style.height="auto",n.div.style.position="fixed",n.div.style.fontFamily=Editor.defaultHtmlFont,n.div.style.fontSize="11px",n.div.style.backgroundColor="#eee",n.div.style.color="#000",n.div.style.border="1px solid #d0d0d0",n.div.style.zIndex=
+this.toolbarZIndex+1,mxUtils.setOpacity(n.div,80));if(null!=u)u.parentNode.removeChild(u),u=null;else{u=n.div;mxEvent.addListener(u,"mouseleave",function(){u.parentNode.removeChild(u);u=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);u.style.left=c.x+b.left-1+"px";u.style.top=c.y+b.bottom-2+"px";document.body.appendChild(u);n.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");G.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){L.style.display=0<
this.graph.getAllTags().length?"inline-block":"none"}));L.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==x?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(x=this.graphConfig["toolbar-buttons"][x],null!=x&&(x.elem=b(null==x.enabled||x.enabled?x.handler:function(){},x.image,x.title,x.enabled)))}null!=this.graph.minimumContainerSize&&
-(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.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;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*m;var H=c.style.border,K=mxUtils.bind(this,function(){e.style.width=
+(this.graph.minimumContainerSize.width=34*q);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.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;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*q;var H=c.style.border,K=mxUtils.bind(this,function(){e.style.width=
"inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,c.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var b=c.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};e.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?
-e.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==H&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=p&&(p.parentNode.removeChild(p),p=null);c.style.border=H});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==
-c||b==e||b==p)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",K):K();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&K()})).observe(c)};
+e.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==H&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=m&&(m.parentNode.removeChild(m),m=null);c.style.border=H});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==
+c||b==e||b==m)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",K):K();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&K()})).observe(c)};
GraphViewer.prototype.disableButton=function(b){var c=this.graphConfig["toolbar-buttons"][b];null!=c&&(mxUtils.setOpacity(c.elem,30),mxEvent.removeListener(c.elem,"click",c.handler),mxEvent.addListener(c.elem,"mouseenter",function(){c.elem.style.backgroundColor="#eee"}))};
GraphViewer.prototype.addClickHandler=function(b,c){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,k){if(null==k)for(var g=mxEvent.getSource(e);g!=b.container&&null!=g&&null==k;)"a"==g.nodeName.toLowerCase()&&(k=g.getAttribute("href")),g=g.parentNode;null!=c?null==k||b.isCustomLink(k)?mxEvent.consume(e):b.isExternalProtocol(k)||b.isBlankLink(k)||window.setTimeout(function(){c.destroy()},0):null!=k&&null==c&&b.isCustomLink(k)&&
(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&b.customLinkClicked(k)&&(mxUtils.clearSelection(),mxEvent.consume(e))}),mxUtils.bind(this,function(b){null!=c||!this.lightboxClickEnabled||mxEvent.isTouchEvent(b)&&0!=this.toolbarItems.length||this.showLightbox()}))};
@@ -4032,7 +4033,7 @@ this.graphConfig.highlight&&(e.highlight=this.graphConfig.highlight.substring(1)
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("src",Editor.closeBlackImage);c.style.cssText="position:fixed;top:32px;right:32px;";c.style.cursor="pointer";
mxEvent.addListener(c,"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";this.tagsEnabled&&(urlParams.tags="{}");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 e=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=e;
-k.refresh=function(){};var g=mxUtils.bind(this,function(b){27==b.keyCode&&k.destroy()}),n=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",g);document.body.removeChild(b);document.body.removeChild(c);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;n.apply(this,arguments)};var t=k.editor.graph,d=t.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,
+k.refresh=function(){};var g=mxUtils.bind(this,function(b){27==b.keyCode&&k.destroy()}),p=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",g);document.body.removeChild(b);document.body.removeChild(c);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;p.apply(this,arguments)};var t=k.editor.graph,d=t.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,
"keydown",g)):(b.style.display="none",c.style.display="none");var f=this;t.getImageFromBundles=function(b){return f.getImageUrl(b)};var l=k.createTemporaryGraph;k.createTemporaryGraph=function(){var b=l.apply(this,arguments);b.getImageFromBundles=function(b){return f.getImageUrl(b)};return b};this.graphConfig.move&&(t.isMoveCellsEvent=function(b){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(d.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(d.style,"transition","all .25s ease-in-out"));this.addClickHandler(t,k);window.setTimeout(mxUtils.bind(this,function(){d.style.outline="none";d.style.zIndex=this.lightboxZIndex;c.style.zIndex=this.lightboxZIndex;document.body.appendChild(d);document.body.appendChild(c);k.setFileData(this.xml);mxUtils.setPrefixedStyle(d.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});k.lightboxFit();k.chromelessResize();this.showLayers(t,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
@@ -4042,10 +4043,10 @@ GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassNam
GraphViewer.createViewerForElement=function(b,c){var e=b.getAttribute("data-mxgraph");if(null!=e){var k=JSON.parse(e),g=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(b,e.documentElement,k);null!=c&&c(e)};null!=k.url?GraphViewer.getUrl(k.url,function(b){g(b)}):g(k.xml)}};
GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.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(b)}catch(c){}};
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,c,e){if(null!=GraphViewer.cachedUrls[b])c(GraphViewer.cachedUrls[b]);else{var k=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;k.open("GET",b);k.onload=function(){c(null!=k.getText?k.getText():k.responseText)};k.onerror=e;k.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(b){return window.setTimeout(b,20)},c=function(e,k){function g(){this.q=[];this.add=function(b){this.q.push(b)};var b,c;this.call=function(){b=0;for(c=this.q.length;b<c;b++)this.q[b].call()}}function n(b,c){return b.currentStyle?b.currentStyle[c]:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue(c):b.style[c]}function t(c,d){if(!c.resizedAttached)c.resizedAttached=
+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(b){return window.setTimeout(b,20)},c=function(e,k){function g(){this.q=[];this.add=function(b){this.q.push(b)};var b,c;this.call=function(){b=0;for(c=this.q.length;b<c;b++)this.q[b].call()}}function p(b,c){return b.currentStyle?b.currentStyle[c]:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue(c):b.style[c]}function t(c,d){if(!c.resizedAttached)c.resizedAttached=
new g,c.resizedAttached.add(d);else if(c.resizedAttached){c.resizedAttached.add(d);return}c.resizeSensor=document.createElement("div");c.resizeSensor.className="resize-sensor";c.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";c.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>';
-c.appendChild(c.resizeSensor);"static"==n(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,p=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(p))};b(p);var q,t,L,H,K=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},A=function(b,c,d){b.attachEvent?
-b.attachEvent("on"+c,d):b.addEventListener(c,d)};A(e,"scroll",K);A(k,"scroll",K)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,m=e.length;f<m;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
+c.appendChild(c.resizeSensor);"static"==p(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(n))};b(n);var q,t,L,H,K=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},A=function(b,c,d){b.attachEvent?
+b.attachEvent("on"+c,d):b.addEventListener(c,d)};A(e,"scroll",K);A(k,"scroll",K)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,q=e.length;f<q;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
c.detach=function(b){b.resizeSensor&&(b.removeChild(b.resizeSensor),delete b.resizeSensor,delete b.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);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 5b9bd4ee..64adb687 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -200,7 +200,7 @@ null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1");(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||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.4.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),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/"),
+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||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"15.4.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),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.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),
@@ -2057,53 +2057,53 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,c=new mxUndoManager;this.undoListener=function(b,e){c.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(b,c){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,e);b.getView().addListener(mxEvent.UNDO,e);e=function(c,e){var g=b.getSelectionCellsForChanges(e.getProperty("edit").changes,function(b){return!(b instanceof mxChildChange)});if(0<g.length){b.getModel();for(var k=[],d=0;d<
g.length;d++)null!=b.view.getState(g[d])&&k.push(g[d]);b.setSelectionCells(k)}};c.addListener(mxEvent.UNDO,e);c.addListener(mxEvent.REDO,e);return c};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};
OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,c,e,k,g,n,t,d,f,l,m){var p=f?57:0,q=e,v=k,u=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,D=Math.max(1,Math.round((y.width-e-u)/2)),C=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-u):e;k=Math.min(k,x-u);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",
+function Dialog(b,c,e,k,g,p,t,d,f,l,q){var m=f?57:0,n=e,u=k,v=f?0:64,y=mxUtils.getDocumentSize();null!=window.innerHeight&&(y.height=window.innerHeight);var x=y.height,D=Math.max(1,Math.round((y.width-e-v)/2)),C=Math.max(1,Math.round((x-k-b.footerHeight)/3));c.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-v):e;k=Math.min(k,x-v);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",
this.bg.style.background=Dialog.backdropColor,this.bg.style.height=x+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));y=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=y.x+"px";this.bg.style.top=y.y+"px";D+=y.x;C+=y.y;g&&document.body.appendChild(this.bg);var G=b.createDiv(f?"geTransDialog":"geDialog");g=this.getPosition(D,C,e,k);D=g.x;C=g.y;G.style.width=e+"px";G.style.height=k+"px";G.style.left=D+"px";G.style.top=C+"px";G.style.zIndex=
-this.zIndex;G.appendChild(c);document.body.appendChild(G);!d&&c.clientHeight>G.clientHeight-u&&(c.style.overflowY="auto");c.style.overflowX="hidden";if(n&&(n=document.createElement("img"),n.setAttribute("src",Dialog.prototype.closeImage),n.setAttribute("title",mxResources.get("close")),n.className="geDialogClose",n.style.top=C+14+"px",n.style.left=D+e+38-p+"px",n.style.zIndex=this.zIndex,mxEvent.addListener(n,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(n),this.dialogImg=
-n,!m)){var J=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){J=!0}),null,mxUtils.bind(this,function(d){J&&(b.hideDialog(!0),J=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(q=e=f.w,v=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";D=Math.max(1,Math.round((f.width-e-u)/2));C=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(q,document.body.scrollWidth-u):q;k=Math.min(v,x-u);f=this.getPosition(D,
-C,e,k);D=f.x;C=f.y;G.style.left=D+"px";G.style.top=C+"px";G.style.width=e+"px";G.style.height=k+"px";!d&&c.clientHeight>G.clientHeight-u&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=C+14+"px",this.dialogImg.style.left=D+e+38-p+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=G;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+this.zIndex;G.appendChild(c);document.body.appendChild(G);!d&&c.clientHeight>G.clientHeight-v&&(c.style.overflowY="auto");c.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=D+e+38-m+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=
+p,!q)){var J=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(b){J=!0}),null,mxUtils.bind(this,function(d){J&&(b.hideDialog(!0),J=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=l){var f=l();null!=f&&(n=e=f.w,u=k=f.h)}f=mxUtils.getDocumentSize();x=f.height;this.bg.style.height=x+"px";D=Math.max(1,Math.round((f.width-e-v)/2));C=Math.max(1,Math.round((x-k-b.footerHeight)/3));e=null!=document.body?Math.min(n,document.body.scrollWidth-v):n;k=Math.min(u,x-v);f=this.getPosition(D,
+C,e,k);D=f.x;C=f.y;G.style.left=D+"px";G.style.top=C+"px";G.style.width=e+"px";G.style.height=k+"px";!d&&c.clientHeight>G.clientHeight-v&&(c.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=C+14+"px",this.dialogImg.style.left=D+e+38-m+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=t;this.container=G;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
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+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,c){return new mxPoint(b,c)};Dialog.prototype.close=function(b,c){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,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(b,c,e,k,g,n,t,d,f,l,m){f=null!=f?f:!0;var p=document.createElement("div");p.style.textAlign="center";if(null!=c){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="10px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";q.style.whiteSpace="nowrap";q.style.textOverflow="ellipsis";q.style.overflow="hidden";mxUtils.write(q,c);q.setAttribute("title",c);p.appendChild(q)}c=
-document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;p.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=n&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();n()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=m&&m()}),l.className="geBtn",e.appendChild(l));var v=mxUtils.button(k,function(){f&&b.hideDialog();null!=g&&g()});
-v.className="geBtn";e.appendChild(v);null!=t&&(k=mxUtils.button(t,function(){f&&b.hideDialog();null!=d&&d()}),k.className="geBtn gePrimaryBtn",e.appendChild(k));this.init=function(){v.focus()};p.appendChild(e);this.container=p},PrintDialog=function(b,c){this.create(b,c)};
-PrintDialog.prototype.create=function(b){function c(b){var f=d.checked||l.checked,c=parseInt(p.value)/100;isNaN(c)&&(c=1,p.value="100%");var c=.75*c,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/e.pageScale;if(f){var q=d.checked?1:parseInt(m.value);isNaN(q)||(k=mxUtils.getScaleForPageCount(q,e,g))}e.getGraphBounds();var n=q=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*c);g.height=Math.ceil(g.height*c);k*=c;!f&&e.pageVisible?(c=e.getPageLayout(),q-=c.x*g.width,n-=c.y*g.height):
-f=!0;f=PrintDialog.createPrintPreview(e,k,g,0,q,n,f);f.open();b&&PrintDialog.printPreview(f)}var e=b.editor.graph,k,g,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";g.appendChild(d);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
+var ErrorDialog=function(b,c,e,k,g,p,t,d,f,l,q){f=null!=f?f:!0;var m=document.createElement("div");m.style.textAlign="center";if(null!=c){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,c);n.setAttribute("title",c);m.appendChild(n)}c=
+document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=e;m.appendChild(c);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=p&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),c.className="geBtn",e.appendChild(c),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=q&&q()}),l.className="geBtn",e.appendChild(l));var u=mxUtils.button(k,function(){f&&b.hideDialog();null!=g&&g()});
+u.className="geBtn";e.appendChild(u);null!=t&&(k=mxUtils.button(t,function(){f&&b.hideDialog();null!=d&&d()}),k.className="geBtn gePrimaryBtn",e.appendChild(k));this.init=function(){u.focus()};m.appendChild(e);this.container=m},PrintDialog=function(b,c){this.create(b,c)};
+PrintDialog.prototype.create=function(b){function c(b){var f=d.checked||l.checked,c=parseInt(m.value)/100;isNaN(c)&&(c=1,m.value="100%");var c=.75*c,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,k=1/e.pageScale;if(f){var n=d.checked?1:parseInt(q.value);isNaN(n)||(k=mxUtils.getScaleForPageCount(n,e,g))}e.getGraphBounds();var p=n=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*c);g.height=Math.ceil(g.height*c);k*=c;!f&&e.pageVisible?(c=e.getPageLayout(),n-=c.x*g.width,p-=c.y*g.height):
+f=!0;f=PrintDialog.createPrintPreview(e,k,g,0,n,p,f);f.open();b&&PrintDialog.printPreview(f)}var e=b.editor.graph,k,g,p=document.createElement("table");p.style.width="100%";p.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");var d=document.createElement("input");d.setAttribute("type","checkbox");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";g.appendChild(d);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
g.appendChild(f);mxEvent.addListener(f,"click",function(b){d.checked=!d.checked;l.checked=!d.checked;mxEvent.consume(b)});mxEvent.addListener(d,"change",function(){l.checked=!d.checked});k.appendChild(g);t.appendChild(k);k=k.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(l);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");g.appendChild(f);mxEvent.addListener(f,
-"click",function(b){l.checked=!l.checked;d.checked=!l.checked;mxEvent.consume(b)});k.appendChild(g);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(m);mxUtils.write(g," "+mxResources.get("pages")+" (max)");k.appendChild(g);t.appendChild(k);mxEvent.addListener(l,"change",
-function(){l.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");d.checked=!l.checked});k=k.cloneNode(!1);g=document.createElement("td");mxUtils.write(g,mxResources.get("pageScale")+":");k.appendChild(g);g=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";g.appendChild(p);k.appendChild(g);t.appendChild(k);k=document.createElement("tr");g=document.createElement("td");g.colSpan=2;
-g.style.paddingTop="20px";g.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);if(PrintDialog.previewEnabled){var q=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)});q.className="geBtn";g.appendChild(q)}q=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});q.className="geBtn gePrimaryBtn";g.appendChild(q);b.editor.cancelFirst||
-g.appendChild(f);k.appendChild(g);t.appendChild(k);n.appendChild(t);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var c=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(e){}};
-PrintDialog.createPrintPreview=function(b,c,e,k,g,n,t){c=new mxPrintPreview(b,c,e,k,g,n);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=t;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";c.backgroundColor=b;var d=c.writeHead;c.writeHead=function(b){d.apply(this,arguments);b.writeln('<style type="text/css">');b.writeln("@media screen {");b.writeln(" body > div { padding:30px;box-sizing:content-box; }");b.writeln("}");b.writeln("</style>")};return c};
+"click",function(b){l.checked=!l.checked;d.checked=!l.checked;mxEvent.consume(b)});k.appendChild(g);var q=document.createElement("input");q.setAttribute("value","1");q.setAttribute("type","number");q.setAttribute("min","1");q.setAttribute("size","4");q.setAttribute("disabled","disabled");q.style.width="50px";g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(q);mxUtils.write(g," "+mxResources.get("pages")+" (max)");k.appendChild(g);t.appendChild(k);mxEvent.addListener(l,"change",
+function(){l.checked?q.removeAttribute("disabled"):q.setAttribute("disabled","disabled");d.checked=!l.checked});k=k.cloneNode(!1);g=document.createElement("td");mxUtils.write(g,mxResources.get("pageScale")+":");k.appendChild(g);g=document.createElement("td");var m=document.createElement("input");m.setAttribute("value","100 %");m.setAttribute("size","5");m.style.width="50px";g.appendChild(m);k.appendChild(g);t.appendChild(k);k=document.createElement("tr");g=document.createElement("td");g.colSpan=2;
+g.style.paddingTop="20px";g.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)});n.className="geBtn";g.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});n.className="geBtn gePrimaryBtn";g.appendChild(n);b.editor.cancelFirst||
+g.appendChild(f);k.appendChild(g);t.appendChild(k);p.appendChild(t);this.container=p};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var c=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(c,500):c()}}catch(e){}};
+PrintDialog.createPrintPreview=function(b,c,e,k,g,p,t){c=new mxPrintPreview(b,c,e,k,g,p);c.title=mxResources.get("preview");c.printBackgroundImage=!0;c.autoOrigin=t;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";c.backgroundColor=b;var d=c.writeHead;c.writeHead=function(b){d.apply(this,arguments);b.writeln('<style type="text/css">');b.writeln("@media screen {");b.writeln(" body > div { padding:30px;box-sizing:content-box; }");b.writeln("}");b.writeln("</style>")};return c};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function c(){null==m||m==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=m,l.style.backgroundImage="")}function e(){var d=u;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(v.setAttribute("src",d.src),v.style.display=""):(v.removeAttribute("src"),v.style.display="none")}var k=b.editor.graph,g,n,t=document.createElement("table");t.style.width=
-"100%";t.style.height="100%";var d=document.createElement("tbody");g=document.createElement("tr");n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");g.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",k.pageFormat);g.appendChild(n);d.appendChild(g);g=document.createElement("tr");n=document.createElement("td");
-mxUtils.write(n,mxResources.get("background")+":");g.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var m=k.background;c();mxEvent.addListener(l,
-"click",function(d){b.pickColor(m||"none",function(b){m=b;c()});mxEvent.consume(d)});n.appendChild(l);mxUtils.write(n,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=k.getGridSize();n.appendChild(p);mxEvent.addListener(p,"change",function(){var b=parseInt(p.value);p.value=Math.max(1,isNaN(b)?k.getGridSize():b)});g.appendChild(n);d.appendChild(g);g=document.createElement("tr");
-n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");g.appendChild(n);n=document.createElement("td");var q=document.createElement("button");q.className="geBtn";q.style.margin="0px";mxUtils.write(q,mxResources.get("change")+"...");var v=document.createElement("img");v.setAttribute("valign","middle");v.style.verticalAlign="middle";v.style.border="1px solid lightGray";v.style.borderRadius="4px";v.style.marginRight="14px";v.style.maxWidth="100px";v.style.cursor="pointer";v.style.height=
-"60px";v.style.padding="4px";var u=k.backgroundImage,y=function(d){b.showBackgroundImageDialog(function(b,d){d||(u=b,e())},u);mxEvent.consume(d)};mxEvent.addListener(q,"click",y);mxEvent.addListener(v,"click",y);e();n.appendChild(v);n.appendChild(q);g.appendChild(n);d.appendChild(g);g=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";
-b.editor.cancelFirst&&n.appendChild(q);y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(p.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,m,u,f.get());d.ignoreColor=k.background==m;d.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=u?u.src:null);k.pageFormat.width==d.previousFormat.width&&k.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||k.model.execute(d)});y.className="geBtn gePrimaryBtn";
-n.appendChild(y);b.editor.cancelFirst||n.appendChild(q);g.appendChild(n);d.appendChild(g);t.appendChild(d);this.container=t};
-PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function g(b,c,l){if(l||p!=document.activeElement&&q!=document.activeElement){b=!1;for(c=0;c<u.length;c++)l=u[c],C?"custom"==l.key&&(d.value=l.key,C=!1):null!=l.format&&("a4"==l.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==l.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==l.format.width&&
-e.height==l.format.height?(d.value=l.key,n.setAttribute("checked","checked"),n.defaultChecked=!0,n.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(f.style.display="",m.style.display="none"):(p.value=e.width/100,q.value=e.height/100,n.setAttribute("checked","checked"),
-d.value="custom",f.style.display="none",m.style.display="")}}c="format-"+c;var n=document.createElement("input");n.setAttribute("name",c);n.setAttribute("type","radio");n.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.width="206px";var f=
-document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";n.style.marginRight="6px";f.appendChild(n);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));f.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));f.appendChild(l);var m=document.createElement("div");m.style.marginLeft=
-"4px";m.style.width="210px";m.style.height="24px";var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in x ");var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var v={},u=PageSetupDialog.getFormats(),y=0;y<u.length;y++){var x=u[y];v[x.key]=x;var D=document.createElement("option");D.setAttribute("value",
-x.key);mxUtils.write(D,x.title);d.appendChild(D)}var C=!1;g();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var G=e,J=function(b,c){var l=v[d.value];null!=l.format?(p.value=l.format.width/100,q.value=l.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");l=parseFloat(p.value);if(isNaN(l)||0>=l)p.value=e.width/100;l=parseFloat(q.value);if(isNaN(l)||0>=l)q.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),
-Math.floor(100*parseFloat(q.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,l.height,l.width));c&&C||l.width==G.width&&l.height==G.height||(G=l,null!=k&&k(G))};mxEvent.addListener(c,"click",function(b){n.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(p,"blur",J);mxEvent.addListener(p,"click",J);mxEvent.addListener(q,"blur",J);mxEvent.addListener(q,"click",J);mxEvent.addListener(t,"change",J);mxEvent.addListener(n,
-"change",J);mxEvent.addListener(d,"change",function(b){C="custom"==d.value;J(b,!0)});J();return{set:function(b){e=b;g(null,null,!0)},get:function(){return G},widthInput:p,heightInput:q}};
+var PageSetupDialog=function(b){function c(){null==q||q==mxConstants.NONE?(l.style.backgroundColor="",l.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(l.style.backgroundColor=q,l.style.backgroundImage="")}function e(){var d=v;null!=d&&Graph.isPageLink(d.src)&&(d=b.createImageForPageLink(d.src,null));null!=d&&null!=d.src?(u.setAttribute("src",d.src),u.style.display=""):(u.removeAttribute("src"),u.style.display="none")}var k=b.editor.graph,g,p,t=document.createElement("table");t.style.width=
+"100%";t.style.height="100%";var d=document.createElement("tbody");g=document.createElement("tr");p=document.createElement("td");p.style.verticalAlign="top";p.style.fontSize="10pt";mxUtils.write(p,mxResources.get("paperSize")+":");g.appendChild(p);p=document.createElement("td");p.style.verticalAlign="top";p.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(p,"pagesetupdialog",k.pageFormat);g.appendChild(p);d.appendChild(g);g=document.createElement("tr");p=document.createElement("td");
+mxUtils.write(p,mxResources.get("background")+":");g.appendChild(p);p=document.createElement("td");p.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var l=document.createElement("button");l.style.width="22px";l.style.height="22px";l.style.cursor="pointer";l.style.marginRight="20px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(l.style.position="relative",l.style.top="-6px");var q=k.background;c();mxEvent.addListener(l,
+"click",function(d){b.pickColor(q||"none",function(b){q=b;c()});mxEvent.consume(d)});p.appendChild(l);mxUtils.write(p,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=k.getGridSize();p.appendChild(m);mxEvent.addListener(m,"change",function(){var b=parseInt(m.value);m.value=Math.max(1,isNaN(b)?k.getGridSize():b)});g.appendChild(p);d.appendChild(g);g=document.createElement("tr");
+p=document.createElement("td");mxUtils.write(p,mxResources.get("image")+":");g.appendChild(p);p=document.createElement("td");var n=document.createElement("button");n.className="geBtn";n.style.margin="0px";mxUtils.write(n,mxResources.get("change")+"...");var u=document.createElement("img");u.setAttribute("valign","middle");u.style.verticalAlign="middle";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.maxWidth="100px";u.style.cursor="pointer";u.style.height=
+"60px";u.style.padding="4px";var v=k.backgroundImage,y=function(d){b.showBackgroundImageDialog(function(b,d){d||(v=b,e())},v);mxEvent.consume(d)};mxEvent.addListener(n,"click",y);mxEvent.addListener(u,"click",y);e();p.appendChild(u);p.appendChild(n);g.appendChild(p);d.appendChild(g);g=document.createElement("tr");p=document.createElement("td");p.colSpan=2;p.style.paddingTop="16px";p.setAttribute("align","right");n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";
+b.editor.cancelFirst&&p.appendChild(n);y=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var d=parseInt(m.value);isNaN(d)||k.gridSize===d||k.setGridSize(d);d=new ChangePageSetup(b,q,v,f.get());d.ignoreColor=k.background==q;d.ignoreImage=(null!=k.backgroundImage?k.backgroundImage.src:null)===(null!=v?v.src:null);k.pageFormat.width==d.previousFormat.width&&k.pageFormat.height==d.previousFormat.height&&d.ignoreColor&&d.ignoreImage||k.model.execute(d)});y.className="geBtn gePrimaryBtn";
+p.appendChild(y);b.editor.cancelFirst||p.appendChild(n);g.appendChild(p);d.appendChild(g);t.appendChild(d);this.container=t};
+PageSetupDialog.addPageFormatPanel=function(b,c,e,k){function g(b,c,l){if(l||m!=document.activeElement&&n!=document.activeElement){b=!1;for(c=0;c<v.length;c++)l=v[c],C?"custom"==l.key&&(d.value=l.key,C=!1):null!=l.format&&("a4"==l.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==l.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==l.format.width&&
+e.height==l.format.height?(d.value=l.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,b=!0):e.width==l.format.height&&e.height==l.format.width&&(d.value=l.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,t.setAttribute("checked","checked"),t.defaultChecked=!0,b=t.checked=!0));b?(f.style.display="",q.style.display="none"):(m.value=e.width/100,n.value=e.height/100,p.setAttribute("checked","checked"),
+d.value="custom",f.style.display="none",q.style.display="")}}c="format-"+c;var p=document.createElement("input");p.setAttribute("name",c);p.setAttribute("type","radio");p.setAttribute("value","portrait");var t=document.createElement("input");t.setAttribute("name",c);t.setAttribute("type","radio");t.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.width="206px";var f=
+document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";p.style.marginRight="6px";f.appendChild(p);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));f.appendChild(c);t.style.marginLeft="10px";t.style.marginRight="6px";f.appendChild(t);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));f.appendChild(l);var q=document.createElement("div");q.style.marginLeft=
+"4px";q.style.width="210px";q.style.height="24px";var m=document.createElement("input");m.setAttribute("size","7");m.style.textAlign="right";q.appendChild(m);mxUtils.write(q," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";q.appendChild(n);mxUtils.write(q," in");f.style.display="none";q.style.display="none";for(var u={},v=PageSetupDialog.getFormats(),y=0;y<v.length;y++){var x=v[y];u[x.key]=x;var D=document.createElement("option");D.setAttribute("value",
+x.key);mxUtils.write(D,x.title);d.appendChild(D)}var C=!1;g();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(q);var G=e,J=function(b,c){var l=u[d.value];null!=l.format?(m.value=l.format.width/100,n.value=l.format.height/100,q.style.display="none",f.style.display=""):(f.style.display="none",q.style.display="");l=parseFloat(m.value);if(isNaN(l)||0>=l)m.value=e.width/100;l=parseFloat(n.value);if(isNaN(l)||0>=l)n.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(m.value)),
+Math.floor(100*parseFloat(n.value)));"custom"!=d.value&&t.checked&&(l=new mxRectangle(0,0,l.height,l.width));c&&C||l.width==G.width&&l.height==G.height||(G=l,null!=k&&k(G))};mxEvent.addListener(c,"click",function(b){p.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(l,"click",function(b){t.checked=!0;J(b);mxEvent.consume(b)});mxEvent.addListener(m,"blur",J);mxEvent.addListener(m,"click",J);mxEvent.addListener(n,"blur",J);mxEvent.addListener(n,"click",J);mxEvent.addListener(t,"change",J);mxEvent.addListener(p,
+"change",J);mxEvent.addListener(d,"change",function(b){C="custom"==d.value;J(b,!0)});J();return{set:function(b){e=b;g(null,null,!0)},get:function(){return G},widthInput:m,heightInput:n}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (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,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,c,e,k,g,n,t,d,f,l,m,p){f=null!=f?f:!0;var q,v,u=document.createElement("table"),y=document.createElement("tbody");u.style.position="absolute";u.style.top="30px";u.style.left="20px";q=document.createElement("tr");v=document.createElement("td");v.style.textOverflow="ellipsis";v.style.textAlign="right";v.style.maxWidth="100px";v.style.fontSize="10pt";v.style.width="84px";mxUtils.write(v,(g||mxResources.get("filename"))+":");q.appendChild(v);var x=document.createElement("input");
-x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width=null!=p?p+"px":"180px";var D=mxUtils.button(e,function(){if(null==n||n(x.value))f&&b.hideDialog(),k(x.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=u.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
+var FilenameDialog=function(b,c,e,k,g,p,t,d,f,l,q,m){f=null!=f?f:!0;var n,u,v=document.createElement("table"),y=document.createElement("tbody");v.style.position="absolute";v.style.top="30px";v.style.left="20px";n=document.createElement("tr");u=document.createElement("td");u.style.textOverflow="ellipsis";u.style.textAlign="right";u.style.maxWidth="100px";u.style.fontSize="10pt";u.style.width="84px";mxUtils.write(u,(g||mxResources.get("filename"))+":");n.appendChild(u);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(e,function(){if(null==p||p(x.value))f&&b.hideDialog(),k(x.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==t)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var b=v.parentNode;if(null!=b){var d=null;mxEvent.addListener(b,"dragleave",function(b){null!=d&&(d.style.backgroundColor=
"",d=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(b){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(b.dataTransfer.getData("text/uri-list")),D.click());b.stopPropagation();
-b.preventDefault()}))}}};v=document.createElement("td");v.style.whiteSpace="nowrap";v.appendChild(x);q.appendChild(v);if(null!=g||null==t)y.appendChild(q),null!=m&&(v.appendChild(FilenameDialog.createTypeHint(b,x,m)),null!=b.editor.diagramFileTypes&&(q=document.createElement("tr"),v=document.createElement("td"),v.style.textOverflow="ellipsis",v.style.textAlign="right",v.style.maxWidth="100px",v.style.fontSize="10pt",v.style.width="84px",mxUtils.write(v,mxResources.get("type")+":"),q.appendChild(v),
-v=document.createElement("td"),v.style.whiteSpace="nowrap",q.appendChild(v),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",v.appendChild(c),x.style.width=null!=p?p-40+"px":"190px",q.appendChild(v),y.appendChild(q)));null!=t&&(q=document.createElement("tr"),v=document.createElement("td"),v.colSpan=2,v.appendChild(t),q.appendChild(v),y.appendChild(q));q=document.createElement("tr");v=document.createElement("td");v.colSpan=2;v.style.paddingTop=
-null!=m?"12px":"20px";v.style.whiteSpace="nowrap";v.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});m.className="geBtn";b.editor.cancelFirst&&v.appendChild(m);null!=d&&(p=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),p.className="geBtn",v.appendChild(p));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&D.click()});v.appendChild(D);b.editor.cancelFirst||v.appendChild(m);q.appendChild(v);y.appendChild(q);
-u.appendChild(y);this.container=u};FilenameDialog.filenameHelpLink=null;
+b.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(x);n.appendChild(u);if(null!=g||null==t)y.appendChild(n),null!=q&&(u.appendChild(FilenameDialog.createTypeHint(b,x,q)),null!=b.editor.diagramFileTypes&&(n=document.createElement("tr"),u=document.createElement("td"),u.style.textOverflow="ellipsis",u.style.textAlign="right",u.style.maxWidth="100px",u.style.fontSize="10pt",u.style.width="84px",mxUtils.write(u,mxResources.get("type")+":"),n.appendChild(u),
+u=document.createElement("td"),u.style.whiteSpace="nowrap",n.appendChild(u),c=FilenameDialog.createFileTypes(b,x,b.editor.diagramFileTypes),c.style.marginLeft="4px",c.style.width="198px",u.appendChild(c),x.style.width=null!=m?m-40+"px":"190px",n.appendChild(u),y.appendChild(n)));null!=t&&(n=document.createElement("tr"),u=document.createElement("td"),u.colSpan=2,u.appendChild(t),n.appendChild(u),y.appendChild(n));n=document.createElement("tr");u=document.createElement("td");u.colSpan=2;u.style.paddingTop=
+null!=q?"12px":"20px";u.style.whiteSpace="nowrap";u.setAttribute("align","right");q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});q.className="geBtn";b.editor.cancelFirst&&u.appendChild(q);null!=d&&(m=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),m.className="geBtn",u.appendChild(m));mxEvent.addListener(x,"keypress",function(b){13==b.keyCode&&D.click()});u.appendChild(D);b.editor.cancelFirst||u.appendChild(q);n.appendChild(u);y.appendChild(n);
+v.appendChild(y);this.container=v};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,c,e){var k=document.createElement("img");k.style.backgroundPosition="center bottom";k.style.backgroundRepeat="no-repeat";k.style.margin="2px 0 0 4px";k.style.verticalAlign="top";k.style.cursor="pointer";k.style.height="16px";k.style.width="16px";mxUtils.setOpacity(k,70);var g=function(){k.setAttribute("src",Editor.helpImage);k.setAttribute("title",mxResources.get("help"));for(var b=0;b<e.length;b++)if(0<e[b].ext.length&&c.value.toLowerCase().substring(c.value.length-
e[b].ext.length-1)=="."+e[b].ext){k.setAttribute("title",mxResources.get(e[b].title));break}};mxEvent.addListener(c,"keyup",g);mxEvent.addListener(c,"change",g);mxEvent.addListener(k,"click",function(c){var e=k.getAttribute("title");k.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&b.showError(null,e,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(c)});
g();return k};
@@ -2116,35 +2116,35 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var b=this.graph,d=nul
")";var g=f=0;null!=b.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),f=1+g.x,g=1+g.y);e=-Math.round(e-mxUtils.mod(this.translate.x*this.scale-f,e))+"px "+-Math.round(e-mxUtils.mod(this.translate.y*this.scale-g,e))+"px"}f=b.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=b.view.backgroundPageShape?(b.view.backgroundPageShape.node.style.backgroundPosition=e,b.view.backgroundPageShape.node.style.backgroundImage=c,b.view.backgroundPageShape.node.style.backgroundColor=d,b.view.backgroundPageShape.node.style.borderColor=
b.defaultPageBorderColor,b.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(b.container.className="geDiagramContainer",f.style.backgroundPosition=e,f.style.backgroundColor=d,f.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(b){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,c=[],e=1;e<this.gridSteps;e++){var g=e*d;c.push("M 0 "+g+" L "+f+" "+g+" M "+g+" 0 L "+g+
" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+b+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+b+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,d){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+c,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+d,e))+"px";f.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(b,d,f){var c=this.view.scale,e=this.view.translate,g=this.pageFormat,k=c*this.pageScale,n=this.view.getBackgroundPageBounds();
-d=n.width;f=n.height;var u=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(u.width,u.height)>this.minPageBreakDist)?Math.ceil(f/u.height)-1:0,x=b?Math.ceil(d/u.width)-1:0,D=n.x+d,C=n.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),
-Math.round(n.y+(f+1)*u.height)),new mxPoint(Math.round(D),Math.round(n.y+(f+1)*u.height))]:[new mxPoint(Math.round(n.x+(f+1)*u.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(f+1)*u.width),Math.round(C))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
+if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+c,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+d,e))+"px";f.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(b,d,f){var c=this.view.scale,e=this.view.translate,g=this.pageFormat,k=c*this.pageScale,p=this.view.getBackgroundPageBounds();
+d=p.width;f=p.height;var v=new mxRectangle(c*e.x,c*e.y,g.width*k,g.height*k),t=(b=b&&Math.min(v.width,v.height)>this.minPageBreakDist)?Math.ceil(f/v.height)-1:0,x=b?Math.ceil(d/v.width)-1:0,D=p.x+d,C=p.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);b=mxUtils.bind(this,function(b){if(null!=b){for(var d=b==this.horizontalPageBreaks?t:x,f=0;f<=d;f++){var c=b==this.horizontalPageBreaks?[new mxPoint(Math.round(p.x),
+Math.round(p.y+(f+1)*v.height)),new mxPoint(Math.round(D),Math.round(p.y+(f+1)*v.height))]:[new mxPoint(Math.round(p.x+(f+1)*v.width),Math.round(p.y)),new mxPoint(Math.round(p.x+(f+1)*v.width),Math.round(C))];null!=b[f]?(b[f].points=c,b[f].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),b[f]=c)}for(f=d;f<b.length;f++)b[f].destroy();b.splice(d,b.length-d)}});b(this.horizontalPageBreaks);
b(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(b,d,f){for(var e=0;e<d.length;e++){if(this.graph.isTableCell(d[e])||this.graph.isTableRow(d[e]))return!1;if(this.graph.getModel().isVertex(d[e])){var g=this.graph.getCellGeometry(d[e]);if(null!=g&&g.relative)return!1}}return c.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var b=
e.apply(this,arguments);b.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(b,arguments)});return b};mxGraphView.prototype.createBackgroundPageShape=function(b){return new mxRectangleShape(b,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var b=this.getGraphBounds(),d=0<b.width?b.x/this.scale-this.translate.x:0,f=0<b.height?b.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,
e=this.graph.pageScale,g=c.width*e,c=c.height*e,e=Math.floor(Math.min(0,d)/g),k=Math.floor(Math.min(0,f)/c);return new mxRectangle(this.scale*(this.translate.x+e*g),this.scale*(this.translate.y+k*c),this.scale*(Math.ceil(Math.max(1,d+b.width/this.scale)/g)-e)*g,this.scale*(Math.ceil(Math.max(1,f+b.height/this.scale)/c)-k)*c)};var k=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){k.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=b+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,d,f,c,e,k){var l=g.apply(this,arguments);null==k||k||mxEvent.addListener(l,"mousedown",function(b){mxEvent.consume(b)});return l};var n=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(b,d,f){var c,e=this.graph.model.getParent(b);if(d)c=this.graph.model.isEdge(b)?null:this.graph.getCellGeometry(b),c=!this.graph.model.isEdge(e)&&!this.graph.isSiblingSelected(b)&&(null!=c&&c.relative||!this.graph.isContainer(e)||this.graph.isPart(b));else if(c=n.apply(this,arguments),this.graph.isTableCell(b)||this.graph.isTableRow(b))c=e,this.graph.isTable(c)||(c=this.graph.model.getParent(c)),c=!this.graph.selectionCellsHandler.isHandled(c)||this.graph.isCellSelected(c)&&this.graph.isToggleEvent(f.getEvent())||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=b+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,d,f,c,e,k){var l=g.apply(this,arguments);null==k||k||mxEvent.addListener(l,"mousedown",function(b){mxEvent.consume(b)});return l};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(b,d,f){var c,e=this.graph.model.getParent(b);if(d)c=this.graph.model.isEdge(b)?null:this.graph.getCellGeometry(b),c=!this.graph.model.isEdge(e)&&!this.graph.isSiblingSelected(b)&&(null!=c&&c.relative||!this.graph.isContainer(e)||this.graph.isPart(b));else if(c=p.apply(this,arguments),this.graph.isTableCell(b)||this.graph.isTableRow(b))c=e,this.graph.isTable(c)||(c=this.graph.model.getParent(c)),c=!this.graph.selectionCellsHandler.isHandled(c)||this.graph.isCellSelected(c)&&this.graph.isToggleEvent(f.getEvent())||
this.graph.isCellSelected(b)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(b)&&this.graph.isCellSelected(e);return c};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(b){b=b.getCell();for(var d=this.graph.getModel(),f=d.getParent(b),c=this.graph.view.getState(f),e=this.graph.isCellSelected(b);null!=c&&(d.isVertex(f)||d.isEdge(f));){var g=this.graph.isCellSelected(f),e=e||g;if(g||!e&&(this.graph.isTableCell(b)||this.graph.isTableRow(b)))b=f;f=d.getParent(f)}return b}})();EditorUi=function(b,c,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=c||document.body;var k=this.editor.graph;k.lightbox=e;this.initialDefaultVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.initialDefaultEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);if(e){var g=k.getGraphBounds;k.getGraphBounds=function(b){var d=g.apply(this,arguments);b=this.backgroundImage;if(null!=b){var f=this.view.translate,c=this.view.scale;d.add(new mxRectangle((f.x+b.x)*c,
(f.y+b.y)*c,b.width*c,b.height*c))}return d}}k.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,k.isEnabled=
-function(){return!1},k.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!k.standalone){var n="rounded shadow glass dashed dashPattern labelBackgroundColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),t="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");
-this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var f=b.clone();f.style="";var c=k.getCellStyle(f);b=[];var f=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),f.push(e));for(var l=k.getModel().getStyle(d.cell),g=null!=l?l.split(";"):[],l=0;l<g.length;l++){var m=g[l],p=m.indexOf("=");if(0<=p){e=m.substring(0,p);var q=m.substring(p+1);null!=c[e]&&"none"==q&&(b.push(q),f.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
-"keys",f,"values",b,"cells",[d.cell]))}}catch(ca){this.handleError(ca)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(n,d[c])&&n.push(d[c]);var f="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
-l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)n.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(n,t[c])&&n.push(t[c]);var m=function(b,d,f,c,e,g,m){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;f=null!=f?f:k.getModel();
-if(m){m=[];for(var E=0;E<b.length;E++)m=m.concat(f.getDescendants(b[E]));b=m}f.beginUpdate();try{for(E=0;E<b.length;E++){var p=b[E],q;if(d)q=["fontSize","fontFamily","fontColor"];else{var B=f.getStyle(p),u=null!=B?B.split(";"):[];q=n.slice();for(var v=0;v<u.length;v++){var F=u[v],x=F.indexOf("=");if(0<=x){var y=F.substring(0,x),N=mxUtils.indexOf(q,y);0<=N&&q.splice(N,1);for(m=0;m<l.length;m++){var C=l[m];if(0<=mxUtils.indexOf(C,y))for(var A=0;A<C.length;A++){var G=mxUtils.indexOf(q,C[A]);0<=G&&q.splice(G,
-1)}}}}}var J=f.isEdge(p);m=J?e:c;for(var D=f.getStyle(p),v=0;v<q.length;v++){var y=q[v],O=m[y];null!=O&&("shape"!=y||J)&&(!J||g||0>mxUtils.indexOf(t,y))&&(D=mxUtils.setStyle(D,y,O))}Editor.simpleLabels&&(D=mxUtils.setStyle(mxUtils.setStyle(D,"html",null),"whiteSpace",null));f.setStyle(p,D)}}finally{f.endUpdate()}return b};k.addListener("cellsInserted",function(b,d){m(d.getProperty("cells"),null,null,null,null,!0,!0)});k.addListener("textInserted",function(b,d){m(d.getProperty("cells"),!0)});this.insertHandler=
-m;this.createDivs();this.createUi();this.refresh();var p=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=p,this.menubarContainer.onmousedown=p,this.toolbarContainer.onselectstart=p,this.toolbarContainer.onmousedown=p,this.diagramContainer.onselectstart=p,this.diagramContainer.onmousedown=p,this.sidebarContainer.onselectstart=p,this.sidebarContainer.onmousedown=p,
-this.formatContainer.onselectstart=p,this.formatContainer.onmousedown=p,this.footerContainer.onselectstart=p,this.footerContainer.onmousedown=p,null!=this.tabContainer&&(this.tabContainer.onselectstart=p));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return p(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
-"contextmenu",c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var q=k.graphHandler.start;k.graphHandler.start=function(){null!=K.hoverIcons&&K.hoverIcons.reset();q.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
-function(b){var d=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(b)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(b)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var v=!1,u=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(b,d){return v||u.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(b){32!=b.which||k.isEditing()?
-mxEvent.isConsumed(b)||27!=b.keyCode||this.hideDialog(null,!0):(v=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(b)!=k.container||mxEvent.consume(b))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(b){k.container.style.cursor="";v=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(b){return y.apply(this,
-arguments)||v||mxEvent.isMouseEvent(b.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var D=k.isZoomWheelEvent;
-k.isZoomWheelEvent=function(){return v||D.apply(this,arguments)};var C=!1,G=null,J=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&C!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);
+function(){return!1},k.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!k.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),t="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" ");
+this.setDefaultStyle=function(b){try{var d=k.view.getState(b);if(null!=d){var f=b.clone();f.style="";var c=k.getCellStyle(f);b=[];var f=[],e;for(e in d.style)c[e]!=d.style[e]&&(b.push(d.style[e]),f.push(e));for(var l=k.getModel().getStyle(d.cell),g=null!=l?l.split(";"):[],l=0;l<g.length;l++){var q=g[l],m=q.indexOf("=");if(0<=m){e=q.substring(0,m);var n=q.substring(m+1);null!=c[e]&&"none"==n&&(b.push(n),f.push(e))}}k.getModel().isEdge(d.cell)?k.currentEdgeStyle={}:k.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
+"keys",f,"values",b,"cells",[d.cell]))}}catch(ca){this.handleError(ca)}};this.clearDefaultStyle=function(){k.currentEdgeStyle=mxUtils.clone(k.defaultEdgeStyle);k.currentVertexStyle=mxUtils.clone(k.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var d=["fontFamily","fontSource","fontSize","fontColor"];for(c=0;c<d.length;c++)0>mxUtils.indexOf(p,d[c])&&p.push(d[c]);var f="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),
+l=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["align","verticalAlign"],["opacity"],["html"]];for(c=0;c<l.length;c++)for(e=0;e<l[c].length;e++)p.push(l[c][e]);for(c=0;c<t.length;c++)0>mxUtils.indexOf(p,t[c])&&p.push(t[c]);var q=function(b,d,f,c,e,g,q){c=null!=c?c:k.currentVertexStyle;e=null!=e?e:k.currentEdgeStyle;f=null!=f?f:k.getModel();
+if(q){q=[];for(var E=0;E<b.length;E++)q=q.concat(f.getDescendants(b[E]));b=q}f.beginUpdate();try{for(E=0;E<b.length;E++){var m=b[E],n;if(d)n=["fontSize","fontFamily","fontColor"];else{var B=f.getStyle(m),v=null!=B?B.split(";"):[];n=p.slice();for(var u=0;u<v.length;u++){var F=v[u],x=F.indexOf("=");if(0<=x){var y=F.substring(0,x),N=mxUtils.indexOf(n,y);0<=N&&n.splice(N,1);for(q=0;q<l.length;q++){var C=l[q];if(0<=mxUtils.indexOf(C,y))for(var A=0;A<C.length;A++){var G=mxUtils.indexOf(n,C[A]);0<=G&&n.splice(G,
+1)}}}}}var J=f.isEdge(m);q=J?e:c;for(var D=f.getStyle(m),u=0;u<n.length;u++){var y=n[u],O=q[y];null!=O&&("shape"!=y||J)&&(!J||g||0>mxUtils.indexOf(t,y))&&(D=mxUtils.setStyle(D,y,O))}Editor.simpleLabels&&(D=mxUtils.setStyle(mxUtils.setStyle(D,"html",null),"whiteSpace",null));f.setStyle(m,D)}}finally{f.endUpdate()}return b};k.addListener("cellsInserted",function(b,d){q(d.getProperty("cells"),null,null,null,null,!0,!0)});k.addListener("textInserted",function(b,d){q(d.getProperty("cells"),!0)});this.insertHandler=
+q;this.createDivs();this.createUi();this.refresh();var m=mxUtils.bind(this,function(b){null==b&&(b=window.event);return k.isEditing()||null!=b&&this.isSelectionAllowed(b)});this.container==document.body&&(this.menubarContainer.onselectstart=m,this.menubarContainer.onmousedown=m,this.toolbarContainer.onselectstart=m,this.toolbarContainer.onmousedown=m,this.diagramContainer.onselectstart=m,this.diagramContainer.onmousedown=m,this.sidebarContainer.onselectstart=m,this.sidebarContainer.onmousedown=m,
+this.formatContainer.onselectstart=m,this.formatContainer.onmousedown=m,this.footerContainer.onselectstart=m,this.footerContainer.onmousedown=m,null!=this.tabContainer&&(this.tabContainer.onselectstart=m));!this.editor.chromeless||this.editor.editable?(c=function(b){if(null!=b){var d=mxEvent.getSource(b);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return m(b)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
+"contextmenu",c):this.diagramContainer.oncontextmenu=c):k.panningHandler.usePopupTrigger=!1;k.init(this.diagramContainer);mxClient.IS_SVG&&null!=k.view.getDrawPane()&&(c=k.view.getDrawPane().ownerSVGElement,null!=c&&(c.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=k.graphHandler){var n=k.graphHandler.start;k.graphHandler.start=function(){null!=K.hoverIcons&&K.hoverIcons.reset();n.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
+function(b){var d=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(b)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(b)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var u=!1,v=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(b,d){return u||v.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(b){32!=b.which||k.isEditing()?
+mxEvent.isConsumed(b)||27!=b.keyCode||this.hideDialog(null,!0):(u=!0,this.hoverIcons.reset(),k.container.style.cursor="move",k.isEditing()||mxEvent.getSource(b)!=k.container||mxEvent.consume(b))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(b){k.container.style.cursor="";u=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var y=k.panningHandler.isForcePanningEvent;k.panningHandler.isForcePanningEvent=function(b){return y.apply(this,
+arguments)||u||mxEvent.isMouseEvent(b.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(b.getEvent()))&&(!mxEvent.isControlDown(b.getEvent())&&mxEvent.isRightMouseButton(b.getEvent())||mxEvent.isMiddleMouseButton(b.getEvent()))};var x=k.cellEditor.isStopEditingEvent;k.cellEditor.isStopEditingEvent=function(b){return x.apply(this,arguments)||13==b.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxClient.IS_SF&&mxEvent.isShiftDown(b))};var D=k.isZoomWheelEvent;
+k.isZoomWheelEvent=function(){return u||D.apply(this,arguments)};var C=!1,G=null,J=null,L=null,H=mxUtils.bind(this,function(){if(null!=this.toolbar&&C!=k.cellEditor.isContentEditing()){for(var b=this.toolbar.container.firstChild,d=[];null!=b;){var f=b.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,b)&&(b.parentNode.removeChild(b),d.push(b));b=f}b=this.toolbar.fontMenu;f=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var c=0;c<L.length;c++)this.toolbar.container.appendChild(L[c]);
this.toolbar.fontMenu=G;this.toolbar.sizeMenu=J}C=k.cellEditor.isContentEditing();G=b;J=f;L=d}}),K=this,A=k.cellEditor.startEditing;k.cellEditor.startEditing=function(){A.apply(this,arguments);H();if(k.cellEditor.isContentEditing()){var b=!1,d=function(){b||(b=!0,window.setTimeout(function(){var d=k.getSelectedEditingElement();null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=K.toolbar&&(K.toolbar.setFontName(Graph.stripQuotes(d.fontFamily)),K.toolbar.setFontSize(parseInt(d.fontSize))));b=!1},
0))};mxEvent.addListener(k.cellEditor.textarea,"input",d);mxEvent.addListener(k.cellEditor.textarea,"touchend",d);mxEvent.addListener(k.cellEditor.textarea,"mouseup",d);mxEvent.addListener(k.cellEditor.textarea,"keyup",d);d()}};var M=k.cellEditor.stopEditing;k.cellEditor.stopEditing=function(b,d){try{M.apply(this,arguments),H()}catch(O){K.handleError(O)}};k.container.setAttribute("tabindex","0");k.container.style.cursor="default";if(window.self===window.top&&null!=k.container.parentNode)try{k.container.focus()}catch(T){}var Q=
k.fireMouseEvent;k.fireMouseEvent=function(b,d,f){b==mxEvent.MOUSE_DOWN&&this.container.focus();Q.apply(this,arguments)};k.popupMenuHandler.autoExpand=!0;null!=this.menus&&(k.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(b,d,f){this.menus.createPopupMenu(b,d,f)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(b){k.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};k.connectionHandler.addListener(mxEvent.CONNECT,
-function(b,d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=K.hoverIcons&&K.hoverIcons.update(k.view.getState(f[f.length-1]))},0));m(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var m=0;m<e.length&&(l=k.getModel().isVertex(e[m])||l,!(g=k.getModel().isEdge(e[m])||g)||!l);m++);else g=l=!0;for(var e=c.getProperty("keys"),p=c.getProperty("values"),
-m=0;m<e.length;m++){var q=0<=mxUtils.indexOf(d,e[m]);if("strokeColor"!=e[m]||null!=p[m]&&"none"!=p[m])if(0<=mxUtils.indexOf(t,e[m]))g||0<=mxUtils.indexOf(f,e[m])?null==p[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=p[m]:l&&0<=mxUtils.indexOf(n,e[m])&&(null==p[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=p[m]);else if(0<=mxUtils.indexOf(n,e[m])){if(l||q)null==p[m]?delete k.currentVertexStyle[e[m]]:k.currentVertexStyle[e[m]]=p[m];if(g||q||0<=mxUtils.indexOf(f,e[m]))null==
-p[m]?delete k.currentEdgeStyle[e[m]]:k.currentEdgeStyle[e[m]]=p[m]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
+function(b,d){var f=[d.getProperty("cell")];d.getProperty("terminalInserted")&&(f.push(d.getProperty("terminal")),window.setTimeout(function(){null!=K.hoverIcons&&K.hoverIcons.update(k.view.getState(f[f.length-1]))},0));q(f)});this.addListener("styleChanged",mxUtils.bind(this,function(b,c){var e=c.getProperty("cells"),l=!1,g=!1;if(0<e.length)for(var q=0;q<e.length&&(l=k.getModel().isVertex(e[q])||l,!(g=k.getModel().isEdge(e[q])||g)||!l);q++);else g=l=!0;for(var e=c.getProperty("keys"),m=c.getProperty("values"),
+q=0;q<e.length;q++){var n=0<=mxUtils.indexOf(d,e[q]);if("strokeColor"!=e[q]||null!=m[q]&&"none"!=m[q])if(0<=mxUtils.indexOf(t,e[q]))g||0<=mxUtils.indexOf(f,e[q])?null==m[q]?delete k.currentEdgeStyle[e[q]]:k.currentEdgeStyle[e[q]]=m[q]:l&&0<=mxUtils.indexOf(p,e[q])&&(null==m[q]?delete k.currentVertexStyle[e[q]]:k.currentVertexStyle[e[q]]=m[q]);else if(0<=mxUtils.indexOf(p,e[q])){if(l||n)null==m[q]?delete k.currentVertexStyle[e[q]]:k.currentVertexStyle[e[q]]=m[q];if(g||n||0<=mxUtils.indexOf(f,e[q]))null==
+m[q]?delete k.currentEdgeStyle[e[q]]:k.currentEdgeStyle[e[q]]=m[q]}}null!=this.toolbar&&(this.toolbar.setFontName(k.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(k.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==k.currentEdgeStyle.edgeStyle&&"1"==k.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==k.currentEdgeStyle.edgeStyle||
"none"==k.currentEdgeStyle.edgeStyle||null==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==k.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==k.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==k.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==k.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==k.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
mxUtils.getValue(k.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",k.currentEdgeStyle.shape,k.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(k.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var b=k.currentVertexStyle.fontFamily||"Helvetica",d=String(k.currentVertexStyle.fontSize||"12"),f=k.getView().getState(k.getSelectionCell());
@@ -2158,16 +2158,16 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);e.updateActionStates()};b.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,c=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,d){"mouseDown"==d.getProperty("eventName")&&c.hideShapePicker()}));var e=mxUtils.bind(this,function(){c.hideShapePicker(!0)});b.addListener("wheel",e);b.addListener(mxEvent.ESCAPE,e);b.view.addListener(mxEvent.SCALE,e);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,e);b.getSelectionModel().addListener(mxEvent.CHANGE,e);b.getModel().addListener(mxEvent.CHANGE,
e);var k=b.popupMenuHandler.isMenuShowing;b.popupMenuHandler.isMenuShowing=function(){return k.apply(this,arguments)||null!=c.shapePicker};var g=b.dblClick;b.dblClick=function(d,e){if(this.isEnabled())if(null!=e||null==c.sidebar||mxEvent.isShiftDown(d)||b.isCellLocked(b.getDefaultParent()))g.apply(this,arguments);else{var f=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d));mxEvent.consume(d);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(f.x,f.y)}),
-30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var n=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();n.apply(this,arguments)};var t=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,g){var f=g.getEvent();this.graph.isCloneEvent(f)||mxEvent.isShiftDown(f)?t.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,l,m){var k=b.getCompositeParent(d.cell);f=b.getCellGeometry(k);
-for(g.consume();null!=k&&b.model.isVertex(k)&&null!=f&&f.relative;)cell=k,k=b.model.getParent(cell),f=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(g.getGraphX(),g.getGraphY(),k,mxUtils.bind(this,function(d){m(d);null!=c.hoverIcons&&c.hoverIcons.update(b.view.getState(d))}),e)}),30)}),mxUtils.bind(this,function(b){this.graph.selectCellsForConnectVertex(b,f,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,e){null!=d&&window.clearTimeout(d);
-d=window.setTimeout(mxUtils.bind(this,function(){var d=e.getProperty("arrow"),f=e.getProperty("direction"),l=e.getProperty("event"),d=d.getBoundingClientRect(),g=mxUtils.getOffset(b.container),k=b.container.scrollLeft+d.x-g.x,g=b.container.scrollTop+d.y-g.y,n=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),x=c.showShapePicker(k,g,n,mxUtils.bind(this,function(d){null!=d&&b.connectVertex(n,f,b.defaultEdgeLength,l,!0,!0,function(f,e,l){l(d);null!=c.hoverIcons&&
+30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){c.hideShapePicker();p.apply(this,arguments)};var t=this.hoverIcons.execute;this.hoverIcons.execute=function(d,e,g){var f=g.getEvent();this.graph.isCloneEvent(f)||mxEvent.isShiftDown(f)?t.apply(this,arguments):this.graph.connectVertex(d.cell,e,this.graph.defaultEdgeLength,f,null,null,mxUtils.bind(this,function(f,l,q){var k=b.getCompositeParent(d.cell);f=b.getCellGeometry(k);
+for(g.consume();null!=k&&b.model.isVertex(k)&&null!=f&&f.relative;)cell=k,k=b.model.getParent(cell),f=b.getCellGeometry(k);window.setTimeout(mxUtils.bind(this,function(){c.showShapePicker(g.getGraphX(),g.getGraphY(),k,mxUtils.bind(this,function(d){q(d);null!=c.hoverIcons&&c.hoverIcons.update(b.view.getState(d))}),e)}),30)}),mxUtils.bind(this,function(b){this.graph.selectCellsForConnectVertex(b,f,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,e){null!=d&&window.clearTimeout(d);
+d=window.setTimeout(mxUtils.bind(this,function(){var d=e.getProperty("arrow"),f=e.getProperty("direction"),l=e.getProperty("event"),d=d.getBoundingClientRect(),g=mxUtils.getOffset(b.container),k=b.container.scrollLeft+d.x-g.x,g=b.container.scrollTop+d.y-g.y,p=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),x=c.showShapePicker(k,g,p,mxUtils.bind(this,function(d){null!=d&&b.connectVertex(p,f,b.defaultEdgeLength,l,!0,!0,function(f,e,l){l(d);null!=c.hoverIcons&&
c.hoverIcons.update(b.view.getState(d))},function(d){b.selectCellsForConnectVertex(d)},l,this.hoverIcons)}),f,!0);this.centerShapePicker(x,d,k,g,f);mxUtils.setOpacity(x,30);mxEvent.addListener(x,"mouseenter",function(){mxUtils.setOpacity(x,100)});mxEvent.addListener(x,"mouseleave",function(){c.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(b,c){null!=d&&window.clearTimeout(d)}))}};
-EditorUi.prototype.centerShapePicker=function(b,c,e,k,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)b.style.width="40px";var n=b.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(e-=n.width/2-10,k-=n.height+6):g==mxConstants.DIRECTION_SOUTH?(e-=n.width/2-10,k+=c.height+6):g==mxConstants.DIRECTION_WEST?(e-=n.width+6,k-=n.height/2-10):g==mxConstants.DIRECTION_EAST&&(e+=c.width+6,k-=n.height/2-10);b.style.left=e+"px";b.style.top=k+"px"};
-EditorUi.prototype.showShapePicker=function(b,c,e,k,g,n){b=this.createShapePicker(b,c,e,k,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,n),n);null!=b&&(null==this.hoverIcons||n||this.hoverIcons.reset(),n=this.editor.graph,n.popupMenuHandler.hideMenu(),n.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=k,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,c,e,k,g,n,t,d){var f=null;if(null!=t&&0<t.length){var l=this,m=this.editor.graph,f=document.createElement("div");g=m.view.getState(e);var p=null==e||null!=g&&m.isTransparentState(g)?null:m.copyStyle(e);e=6>t.length?35*t.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(f.style.backgroundColor=m.background);m.container.appendChild(f);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(e);null!=p&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(p,[d]):l.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var f=m.cloneCell(d);if(null!=k)k(f);else{f.geometry.x=m.snap(Math.round(b/m.view.scale)-m.view.translate.x-d.geometry.width/2);f.geometry.y=m.snap(Math.round(c/m.view.scale)-m.view.translate.y-d.geometry.height/2);m.model.beginUpdate();try{m.addCell(f)}finally{m.model.endUpdate()}m.setSelectionCell(f);
-m.scrollCellToVisible(f);m.startEditingAtCell(f);null!=l.hoverIcons&&l.hoverIcons.update(m.view.getState(f))}null!=n&&n()})});for(g=0;g<(d?Math.min(t.length,4):t.length);g++)e(t[g]);t=f.offsetTop+f.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<t&&(f.style.top=Math.max(m.container.scrollTop+22,c-t)+"px");t=f.offsetLeft+f.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<t&&(f.style.left=Math.max(m.container.scrollLeft+22,b-t)+"px")}return f};
+EditorUi.prototype.centerShapePicker=function(b,c,e,k,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(e-=p.width/2-10,k-=p.height+6):g==mxConstants.DIRECTION_SOUTH?(e-=p.width/2-10,k+=c.height+6):g==mxConstants.DIRECTION_WEST?(e-=p.width+6,k-=p.height/2-10):g==mxConstants.DIRECTION_EAST&&(e+=c.width+6,k-=p.height/2-10);b.style.left=e+"px";b.style.top=k+"px"};
+EditorUi.prototype.showShapePicker=function(b,c,e,k,g,p){b=this.createShapePicker(b,c,e,k,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=k,this.shapePicker=b);return b};
+EditorUi.prototype.createShapePicker=function(b,c,e,k,g,p,t,d){var f=null;if(null!=t&&0<t.length){var l=this,q=this.editor.graph,f=document.createElement("div");g=q.view.getState(e);var m=null==e||null!=g&&q.isTransparentState(g)?null:q.copyStyle(e);e=6>t.length?35*t.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+c+"px;width:"+e+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=q.background&&q.background!=mxConstants.NONE&&(f.style.backgroundColor=q.background);q.container.appendChild(f);e=mxUtils.bind(this,function(d){var e=document.createElement("a");e.className="geItem";e.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(e);null!=m&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(m,[d]):l.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,e,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(e,"click",function(){var f=q.cloneCell(d);if(null!=k)k(f);else{f.geometry.x=q.snap(Math.round(b/q.view.scale)-q.view.translate.x-d.geometry.width/2);f.geometry.y=q.snap(Math.round(c/q.view.scale)-q.view.translate.y-d.geometry.height/2);q.model.beginUpdate();try{q.addCell(f)}finally{q.model.endUpdate()}q.setSelectionCell(f);
+q.scrollCellToVisible(f);q.startEditingAtCell(f);null!=l.hoverIcons&&l.hoverIcons.update(q.view.getState(f))}null!=p&&p()})});for(g=0;g<(d?Math.min(t.length,4):t.length);g++)e(t[g]);t=f.offsetTop+f.clientHeight-(q.container.scrollTop+q.container.offsetHeight);0<t&&(f.style.top=Math.max(q.container.scrollTop+22,c-t)+"px");t=f.offsetLeft+f.clientWidth-(q.container.scrollLeft+q.container.offsetWidth);0<t&&(f.style.left=Math.max(q.container.scrollLeft+22,b-t)+"px")}return f};
EditorUi.prototype.getCellsForShapePicker=function(b,c){var e=mxUtils.bind(this,function(b,c,e,t){return this.editor.graph.createVertex(null,null,t||"",0,0,c||120,e||60,b,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),
e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",
120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};
@@ -2182,35 +2182,35 @@ e==mxConstants.ARROW_DIAMOND_THIN?"1"==k?"geSprite geSprite-"+b+"thindiamond":"g
e?"geSprite geSprite-"+b+"eronetoone":"ERmany"==e?"geSprite geSprite-"+b+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+b+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+b+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+b+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,c=this.actions.get("paste"),e=this.actions.get("pasteHere");c.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));e.setEnabled(c.isEnabled())};
EditorUi.prototype.initClipboard=function(){var b=this,c=mxClipboard.cut;mxClipboard.cut=function(e){e.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(c){var e=null;if(c.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var e=e||c.getSelectionCells(),e=c.getExportableCells(c.model.getTopmostCells(e)),d={},f=c.createCellLookup(e),l=c.cloneCells(e,null,d),g=new mxGraphModel,k=g.getChildAt(g.getRoot(),
-0),q=0;q<l.length;q++){g.add(k,l[q]);var n=c.view.getState(e[q]);if(null!=n){var u=c.getCellGeometry(l[q]);null!=u&&u.relative&&!g.isEdge(e[q])&&null==f[mxObjectIdentity.get(g.getParent(e[q]))]&&(u.offset=null,u.relative=!1,u.x=n.x/n.view.scale-n.view.translate.x,u.y=n.y/n.view.scale-n.view.translate.y)}}c.updateCustomLinks(c.createCellMapping(d,f),l);mxClipboard.insertCount=1;mxClipboard.setCells(l)}b.updatePasteActionStates();return e};var e=mxClipboard.paste;mxClipboard.paste=function(c){var g=
+0),n=0;n<l.length;n++){g.add(k,l[n]);var p=c.view.getState(e[n]);if(null!=p){var v=c.getCellGeometry(l[n]);null!=v&&v.relative&&!g.isEdge(e[n])&&null==f[mxObjectIdentity.get(g.getParent(e[n]))]&&(v.offset=null,v.relative=!1,v.x=p.x/p.view.scale-p.view.translate.x,v.y=p.y/p.view.scale-p.view.translate.y)}}c.updateCustomLinks(c.createCellMapping(d,f),l);mxClipboard.insertCount=1;mxClipboard.setCells(l)}b.updatePasteActionStates();return e};var e=mxClipboard.paste;mxClipboard.paste=function(c){var g=
null;c.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):g=e.apply(this,arguments);b.updatePasteActionStates();return g};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);b.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(c,e){g.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var b=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+b.x*d.width),this.scale*(this.translate.y+b.y*d.height),this.scale*b.width*d.width,
-this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),m=b.view.translate,k=b.view.scale,E=mxRectangle.fromRectangle(l);
-E.x=E.x/k-m.x;E.y=E.y/k-m.y;E.width/=k;E.height/=k;var m=b.container.scrollTop,p=b.container.scrollLeft,q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)q+=3;var n=b.container.offsetWidth-q,q=b.container.offsetHeight-q;d=d?Math.max(.3,Math.min(f||1,n/E.width)):k;f=(n-d*E.width)/2/d;var u=0==this.lightboxVerticalDivider?0:(q-d*E.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),u=Math.max(u,0));if(g||l.width<n||l.height<q)b.view.scaleAndTranslate(d,Math.floor(f-
-E.x),Math.floor(u-E.y)),b.container.scrollTop=m*d/k,b.container.scrollLeft=p*d/k;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/k),Math.floor(l.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
+this.scale*b.height*d.height)};b.getPreferredPageSize=function(b,d,f){b=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,b.width*d.width,b.height*d.height)};var c=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=c=mxUtils.bind(this,function(d,f,c,e){if(null!=b.container&&!b.isViewer()){c=null!=c?c:0;e=null!=e?e:0;var l=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),g=mxUtils.hasScrollbars(b.container),q=b.view.translate,k=b.view.scale,E=mxRectangle.fromRectangle(l);
+E.x=E.x/k-q.x;E.y=E.y/k-q.y;E.width/=k;E.height/=k;var q=b.container.scrollTop,m=b.container.scrollLeft,n=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=b.container.offsetWidth-n,n=b.container.offsetHeight-n;d=d?Math.max(.3,Math.min(f||1,p/E.width)):k;f=(p-d*E.width)/2/d;var v=0==this.lightboxVerticalDivider?0:(n-d*E.height)/this.lightboxVerticalDivider/d;g&&(f=Math.max(f,0),v=Math.max(v,0));if(g||l.width<p||l.height<n)b.view.scaleAndTranslate(d,Math.floor(f-
+E.x),Math.floor(v-E.y)),b.container.scrollTop=q*d/k,b.container.scrollLeft=m*d/k;else if(0!=c||0!=e)l=b.view.translate,b.view.setTranslate(Math.floor(l.x+c/k),Math.floor(l.y+e/k))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var k=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",k);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",k)});this.editor.addListener("resetGraphView",mxUtils.bind(this,
function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=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.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"transition","opacity 600ms ease-in-out");var n=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var t=0,n=mxUtils.bind(this,function(b,d,f){t++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight=
-"8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",b);null!=f&&c.setAttribute("title",f);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",d);b.style.width="36px";b.style.filter="invert(100%)";c.appendChild(b);this.chromelessToolbar.appendChild(c);return c});null!=g.backBtn&&n(mxUtils.bind(this,function(b){window.location.href=g.backBtn.url;mxEvent.consume(b)}),Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=n(mxUtils.bind(this,
-function(b){this.actions.get("previousPage").funct();mxEvent.consume(b)}),Editor.previousImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.fontFamily=Editor.defaultHtmlFont;f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontWeight="bold";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(f);var l=n(mxUtils.bind(this,function(b){this.actions.get("nextPage").funct();
-mxEvent.consume(b)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var p=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",d.style.display=
-"",f.style.display="inline-block"):(l.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",p);this.editor.addListener("pageSelected",m)}n(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();mxEvent.consume(b)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
-n(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.zoomFitImage,mxResources.get("fit"));var q=null,v=null,u=mxUtils.bind(this,function(b){null!=q&&(window.clearTimeout(q),q=null);null!=v&&(window.clearTimeout(v),v=null);q=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);q=null;v=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";v=null}),600)}),b||200)}),y=mxUtils.bind(this,function(b){null!=q&&(window.clearTimeout(q),q=null);null!=v&&(window.clearTimeout(v),v=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=n(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,
+"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var t=0,p=mxUtils.bind(this,function(b,d,f){t++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight=
+"8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",b);null!=f&&c.setAttribute("title",f);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",d);b.style.width="36px";b.style.filter="invert(100%)";c.appendChild(b);this.chromelessToolbar.appendChild(c);return c});null!=g.backBtn&&p(mxUtils.bind(this,function(b){window.location.href=g.backBtn.url;mxEvent.consume(b)}),Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=p(mxUtils.bind(this,
+function(b){this.actions.get("previousPage").funct();mxEvent.consume(b)}),Editor.previousImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.fontFamily=Editor.defaultHtmlFont;f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontWeight="bold";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(f);var l=p(mxUtils.bind(this,function(b){this.actions.get("nextPage").funct();
+mxEvent.consume(b)}),Editor.nextImage,mxResources.get("nextPage")),q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";l.style.paddingLeft="4px";l.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(l.style.display="",d.style.display=
+"",f.style.display="inline-block"):(l.style.display="none",d.style.display="none",f.style.display="none");q()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",q)}p(mxUtils.bind(this,function(b){this.actions.get("zoomOut").funct();mxEvent.consume(b)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(b){this.actions.get("zoomIn").funct();mxEvent.consume(b)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
+p(mxUtils.bind(this,function(d){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.zoomFitImage,mxResources.get("fit"));var n=null,u=null,v=mxUtils.bind(this,function(b){null!=n&&(window.clearTimeout(n),n=null);null!=u&&(window.clearTimeout(u),u=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
+"none";u=null}),600)}),b||200)}),y=mxUtils.bind(this,function(b){null!=n&&(window.clearTimeout(n),n=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,b||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=p(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,
"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));f=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(d)}),
-Editor.layersImage,mxResources.get("layers")),D=b.getModel();D.addListener(mxEvent.CHANGE,function(){x.style.display=1<D.getChildCount(D.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,
-"editWindow");mxEvent.consume(d)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(p=0;p<this.lightboxToolbarActions.length;p++){var C=this.lightboxToolbarActions[p];C.elem=n(C.fn,C.icon,C.tooltip)}null!=g.refreshBtn&&n(mxUtils.bind(this,function(b){g.refreshBtn.url?window.location.href=g.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,
-function(d){g.fullscreenBtn.url?b.openLink(g.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,function(b){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(b))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display=
-"none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||y(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",
-mxUtils.bind(this,function(d){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(d)?u():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?u():y(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||y(30)}));var G=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,f){this.startX=
-f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<G&&Math.abs(this.scrollTop-b.container.scrollTop)<G&&Math.abs(this.startX-f.getGraphX())<G&&Math.abs(this.startY-f.getGraphY())<G&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?u():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var J=
+Editor.layersImage,mxResources.get("layers")),D=b.getModel();D.addListener(mxEvent.CHANGE,function(){x.style.display=1<D.getChildCount(D.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(d){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,
+"editWindow");mxEvent.consume(d)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(m=0;m<this.lightboxToolbarActions.length;m++){var C=this.lightboxToolbarActions[m];C.elem=p(C.fn,C.icon,C.tooltip)}null!=g.refreshBtn&&p(mxUtils.bind(this,function(b){g.refreshBtn.url?window.location.href=g.refreshBtn.url:window.location.reload();mxEvent.consume(b)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,
+function(d){g.fullscreenBtn.url?b.openLink(g.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(b){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(b))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display=
+"none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(mxEvent.isShiftDown(b)||y(30),v())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",
+mxUtils.bind(this,function(d){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(d)?v():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(b){mxEvent.isShiftDown(b)?v():y(100);mxEvent.consume(b)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||y(30)}));var G=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,f){this.startX=
+f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(b,d){},mouseUp:function(d,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<G&&Math.abs(this.scrollTop-b.container.scrollTop)<G&&Math.abs(this.startX-f.getGraphX())<G&&Math.abs(this.startY-f.getGraphY())<G&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?v():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var J=
b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var b=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=b.x-(this.x0||0)*d.width;this.translate.y=b.y-(this.y0||0)*d.height}J.apply(this,arguments)};if(!b.isViewer()){var L=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),f=this.getPagePadding(),c=this.getPageSize(),e=Math.ceil(2*
f.x+d.width*c.width),l=Math.ceil(2*f.y+d.height*c.height),g=b.minimumGraphSize;if(null==g||g.width!=e||g.height!=l)b.minimumGraphSize=new mxRectangle(0,0,e,l);e=f.x-d.x*c.width;f=f.y-d.y*c.height;this.autoTranslate||this.view.translate.x==e&&this.view.translate.y==f?L.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=d.y,d=b.view.translate.x,c=b.view.translate.y,b.view.setTranslate(e,f),b.container.scrollLeft+=Math.round((e-d)*b.view.scale),b.container.scrollTop+=Math.round((f-
c)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var H=b.view.getBackgroundPane(),K=b.view.getDrawPane();b.cumulativeZoomFactor=1;var A=null,M=null,Q=null,T=null,N=null,O=function(d){null!=A&&window.clearTimeout(A);window.setTimeout(function(){if(!b.isMouseDown||T)A=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,
"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),K.style.transformOrigin="",H.style.transformOrigin="",mxClient.IS_SF?(K.style.transform="scale(1)",H.style.transform="scale(1)",window.setTimeout(function(){K.style.transform="";H.style.transform=""},0)):(K.style.transform="",H.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var d=new mxPoint(b.container.scrollLeft,b.container.scrollTop),
-f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,m=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,m=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=Q&&(g+=d.x-Q.x,m+=d.y-Q.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-1),m*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==m||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=m*(b.cumulativeZoomFactor-1)));null!=N&&K.setAttribute("filter",
+f=mxUtils.getOffset(b.container),l=b.view.scale,g=0,q=0;null!=M&&(g=b.container.offsetWidth/2-M.x+f.x,q=b.container.offsetHeight/2-M.y+f.y);b.zoom(b.cumulativeZoomFactor);b.view.scale!=l&&(null!=Q&&(g+=d.x-Q.x,q+=d.y-Q.y),null!=c&&e.chromelessResize(!1,null,g*(b.cumulativeZoomFactor-1),q*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==g&&0==q||(b.container.scrollLeft-=g*(b.cumulativeZoomFactor-1),b.container.scrollTop-=q*(b.cumulativeZoomFactor-1)));null!=N&&K.setAttribute("filter",
N);b.cumulativeZoomFactor=1;N=T=M=Q=A=null}),null!=d?d:b.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)},ha=Date.now();b.lazyZoom=function(d,f,c){(f=f||!b.scrollbars)&&(M=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));if(mxClient.IS_IOS||!(15>Date.now()-ha)){ha=Date.now();d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,
this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==
N&&""!=K.getAttribute("filter")&&(N=K.getAttribute("filter"),K.removeAttribute("filter"));Q=new mxPoint(b.container.scrollLeft,b.container.scrollTop);d=f?b.container.scrollLeft+b.container.clientWidth/2:M.x+b.container.scrollLeft-b.container.offsetLeft;var l=f?b.container.scrollTop+b.container.clientHeight/2:M.y+b.container.scrollTop-b.container.offsetTop;K.style.transformOrigin=d+"px "+l+"px";K.style.transform="scale("+this.cumulativeZoomFactor+")";H.style.transformOrigin=d+"px "+l+"px";H.style.transform=
@@ -2239,17 +2239,17 @@ this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSe
EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
EditorUi.prototype.setPageFormat=function(b,c){c=null!=c?c:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;c||(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(b){this.editor.graph.pageScale=b;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(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),c=this.actions.get("redo"),e=this.editor.undoManager,k=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,k);e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);e.addListener(mxEvent.CLEAR,k);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);k()};var n=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(b,d){n.apply(this,arguments);k()};k()};
-EditorUi.prototype.updateActionStates=function(){var b=this.editor.graph,c=!1,e=!1,k=!1,g=!1,n=[],t=b.getSelectionCells();if(null!=t)for(var d=0;d<t.length;d++){var f=t[d];b.isCellEditable(f)&&(n.push(f),g=!0,b.getModel().isEdge(f)&&(k=!0),b.getModel().isVertex(f)&&(c=!0,0<b.getModel().getChildCount(f)||b.isContainer(f)))&&(e=!0)}t="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(d=
-0;d<t.length;d++)this.actions.get(t[d]).setEnabled(g);this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(g);this.actions.get("copySize").setEnabled(1==b.getSelectionCount());this.actions.get("bringForward").setEnabled(1==n.length);this.actions.get("sendBackward").setEnabled(1==n.length);this.actions.get("turn").setEnabled(0<b.getResizableCells(b.getSelectionCells()).length);
-this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(c);this.actions.get("wordWrap").setEnabled(c);this.actions.get("autosize").setEnabled(c);k=c&&1==b.getSelectionCount();this.actions.get("group").setEnabled(1<b.getSelectionCount()||k&&!b.isContainer(b.getSelectionCell()));this.actions.get("ungroup").setEnabled(e);this.actions.get("removeFromGroup").setEnabled(k&&b.getModel().isVertex(b.getModel().getParent(n[0])));b.view.getState(b.getSelectionCell());this.menus.get("navigation").setEnabled(g||
+EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),c=this.actions.get("redo"),e=this.editor.undoManager,k=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());c.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,k);e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);e.addListener(mxEvent.CLEAR,k);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);k()};var p=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(b,d){p.apply(this,arguments);k()};k()};
+EditorUi.prototype.updateActionStates=function(){var b=this.editor.graph,c=!1,e=!1,k=!1,g=!1,p=[],t=b.getSelectionCells();if(null!=t)for(var d=0;d<t.length;d++){var f=t[d];b.isCellEditable(f)&&(p.push(f),g=!0,b.getModel().isEdge(f)&&(k=!0),b.getModel().isVertex(f)&&(c=!0,0<b.getModel().getChildCount(f)||b.isContainer(f)))&&(e=!0)}t="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(d=
+0;d<t.length;d++)this.actions.get(t[d]).setEnabled(g);this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(g);this.actions.get("copySize").setEnabled(1==b.getSelectionCount());this.actions.get("bringForward").setEnabled(1==p.length);this.actions.get("sendBackward").setEnabled(1==p.length);this.actions.get("turn").setEnabled(0<b.getResizableCells(b.getSelectionCells()).length);
+this.actions.get("curved").setEnabled(k);this.actions.get("rotation").setEnabled(c);this.actions.get("wordWrap").setEnabled(c);this.actions.get("autosize").setEnabled(c);k=c&&1==b.getSelectionCount();this.actions.get("group").setEnabled(1<b.getSelectionCount()||k&&!b.isContainer(b.getSelectionCell()));this.actions.get("ungroup").setEnabled(e);this.actions.get("removeFromGroup").setEnabled(k&&b.getModel().isVertex(b.getModel().getParent(p[0])));b.view.getState(b.getSelectionCell());this.menus.get("navigation").setEnabled(g||
null!=b.view.currentRoot);this.actions.get("collapsible").setEnabled(c&&(b.isContainer(b.getSelectionCell())||0<b.model.getChildCount(b.getSelectionCell())));this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.getSelectionCount()&&b.isValidRoot(b.getSelectionCell()));e=1==b.getSelectionCount()&&b.isCellFoldable(b.getSelectionCell());this.actions.get("expand").setEnabled(e);this.actions.get("collapse").setEnabled(e);
-this.actions.get("editLink").setEnabled(1==n.length);this.actions.get("openLink").setEnabled(1==b.getSelectionCount()&&null!=b.getLinkForCell(b.getSelectionCell()));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);n=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent());this.menus.get("layout").setEnabled(n);this.menus.get("insert").setEnabled(n);this.menus.get("direction").setEnabled(n&&c);this.menus.get("align").setEnabled(n&&
-c&&1<b.getSelectionCount());this.menus.get("distribute").setEnabled(n&&c&&1<b.getSelectionCount());this.actions.get("selectVertices").setEnabled(n);this.actions.get("selectEdges").setEnabled(n);this.actions.get("selectAll").setEnabled(n);this.actions.get("selectNone").setEnabled(n);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
+this.actions.get("editLink").setEnabled(1==p.length);this.actions.get("openLink").setEnabled(1==b.getSelectionCount()&&null!=b.getLinkForCell(b.getSelectionCell()));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);p=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent());this.menus.get("layout").setEnabled(p);this.menus.get("insert").setEnabled(p);this.menus.get("direction").setEnabled(p&&c);this.menus.get("align").setEnabled(p&&
+c&&1<b.getSelectionCount());this.menus.get("distribute").setEnabled(p&&c&&1<b.getSelectionCount());this.actions.get("selectVertices").setEnabled(p);this.actions.get("selectEdges").setEnabled(p);this.actions.get("selectAll").setEnabled(p);this.actions.get("selectNone").setEnabled(p);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var c=this.container.clientWidth,e=this.container.clientHeight;this.container==document.body&&(c=document.body.clientWidth||document.documentElement.clientWidth,e=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 g=Math.max(0,Math.min(this.hsplitPosition,c-this.splitSize-
-20)),n=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",n+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",n+=this.toolbarHeight);0<n&&(n+=1);c=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,c=Math.max(0,Math.min(e-n-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=c+"px";
-this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=n+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=n+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var t=this.getDiagramContainerOffset(),d=null!=this.hsplit.parentNode?g+this.splitSize:0;this.diagramContainer.style.left=d+t.x+"px";this.diagramContainer.style.top=n+t.y+"px";this.footerContainer.style.height=
+20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&(p+=1);c=0;if(null!=this.sidebarFooterContainer){var t=this.footerHeight+k,c=Math.max(0,Math.min(e-p-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=c+"px";
+this.sidebarFooterContainer.style.bottom=t+"px"}e=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=e+"px";this.formatContainer.style.display=null!=this.format?"":"none";var t=this.getDiagramContainerOffset(),d=null!=this.hsplit.parentNode?g+this.splitSize:0;this.diagramContainer.style.left=d+t.x+"px";this.diagramContainer.style.top=p+t.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=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px");this.diagramContainer.style.right=e+"px";g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=
this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+c+k+"px";this.formatContainer.style.bottom=this.footerHeight+k+"px";this.diagramContainer.style.bottom=this.footerHeight+k+g+"px";b&&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"));
@@ -2260,18 +2260,18 @@ 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(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};
EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(b){var c=document.createElement("div");c.className=b;return c};
-EditorUi.prototype.addSplitHandler=function(b,c,e,k){function g(b){if(null!=t){var g=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));k(Math.max(0,d+(c?g.x-t.x:t.y-g.y)-e));mxEvent.consume(b);d!=m()&&(f=!0,l=null)}}function n(b){g(b);t=d=null}var t=null,d=null,f=!0,l=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var m=mxUtils.bind(this,function(){var d=parseInt(c?b.style.left:b.style.bottom);c||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(b,function(b){t=new mxPoint(mxEvent.getClientX(b),
-mxEvent.getClientY(b));d=m();f=!1;mxEvent.consume(b)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){if(!f&&this.hsplitClickEnabled){var d=null!=l?l-e:0;l=m();k(d);mxEvent.consume(b)}}));mxEvent.addGestureListeners(document,null,g,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,n)})};
-EditorUi.prototype.handleError=function(b,c,e,k,g){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=c){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=b&&null!=b.message&&(g=mxUtils.htmlEntities(b.message));this.showError(c,g,n,e,null,null,null,null,null,null,null,null,k?e:null)}else null!=e&&e()};
-EditorUi.prototype.showError=function(b,c,e,k,g,n,t,d,f,l,m,p,q){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,g,n,t,p,d,f);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,m||100+20*c,!0,!1,q);b.init()};EditorUi.prototype.showDialog=function(b,c,e,k,g,n,t,d,f,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,c,e,k,g,n,t,d,f,l);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(b,c,e,k){function g(b){if(null!=t){var g=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));k(Math.max(0,d+(c?g.x-t.x:t.y-g.y)-e));mxEvent.consume(b);d!=q()&&(f=!0,l=null)}}function p(b){g(b);t=d=null}var t=null,d=null,f=!0,l=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var q=mxUtils.bind(this,function(){var d=parseInt(c?b.style.left:b.style.bottom);c||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(b,function(b){t=new mxPoint(mxEvent.getClientX(b),
+mxEvent.getClientY(b));d=q();f=!1;mxEvent.consume(b)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){if(!f&&this.hsplitClickEnabled){var d=null!=l?l-e:0;l=q();k(d);mxEvent.consume(b)}}));mxEvent.addGestureListeners(document,null,g,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,p)})};
+EditorUi.prototype.handleError=function(b,c,e,k,g){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=c){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");c=null!=c?c:mxResources.get("error");null!=b&&null!=b.message&&(g=mxUtils.htmlEntities(b.message));this.showError(c,g,p,e,null,null,null,null,null,null,null,null,k?e:null)}else null!=e&&e()};
+EditorUi.prototype.showError=function(b,c,e,k,g,p,t,d,f,l,q,m,n){b=new ErrorDialog(this,b,c,e||mxResources.get("ok"),k,g,p,t,m,d,f);c=Math.ceil(null!=c?c.length/50:1);this.showDialog(b.container,l||340,q||100+20*c,!0,!1,n);b.init()};EditorUi.prototype.showDialog=function(b,c,e,k,g,p,t,d,f,l){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,c,e,k,g,p,t,d,f,l);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,c,e){null!=this.dialogs&&0<this.dialogs.length&&(null==e||e==this.dialog.container.firstChild)&&(e=this.dialogs.pop(),0==e.close(b,c)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var c=b.getSelectionCells(),e=new mxDictionary,k=[],g=0;g<c.length;g++){var n=b.isTableCell(c[g])?b.model.getParent(c[g]):c[g];null==n||e.get(n)||(e.put(n,!0),k.push(n))}b.setSelectionCells(b.duplicateCells(k,!1))}catch(t){this.handleError(t)}};
-EditorUi.prototype.pickColor=function(b,c){var e=this.editor.graph,k=e.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),n=new ColorDialog(this,b||"none",function(b){e.cellEditor.restoreSelection(k);c(b)},function(){e.cellEditor.restoreSelection(k)});this.showDialog(n.container,230,g,!0,!1);n.init()};
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var c=b.getSelectionCells(),e=new mxDictionary,k=[],g=0;g<c.length;g++){var p=b.isTableCell(c[g])?b.model.getParent(c[g]):c[g];null==p||e.get(p)||(e.put(p,!0),k.push(p))}b.setSelectionCells(b.duplicateCells(k,!1))}catch(t){this.handleError(t)}};
+EditorUi.prototype.pickColor=function(b,c){var e=this.editor.graph,k=e.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),p=new ColorDialog(this,b||"none",function(b){e.cellEditor.restoreSelection(k);c(b)},function(){e.cellEditor.restoreSelection(k)});this.showDialog(p.container,230,g,!0,!1);p.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=null;try{var e=b.indexOf("&lt;mxGraphModel ");if(0<=e){var k=b.lastIndexOf("&lt;/mxGraphModel&gt;");k>e&&(c=b.substring(e,k+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return c};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){null!=c?b(c):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(c){if(null!=c){var e=decodeURIComponent(c);this.isCompatibleString(e)&&(c=e)}b(c)}),"text")}),"html")};
EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,c){navigator.clipboard.read().then(mxUtils.bind(this,function(e){if(null!=e&&0<e.length&&"html"==c&&0<=mxUtils.indexOf(e[0].types,"text/html"))e[0].getType("text/html").then(mxUtils.bind(this,function(c){c.text().then(mxUtils.bind(this,function(c){try{var e=this.parseHtmlData(c),g="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var d=g.lastIndexOf("%3E");
-0<=d&&d<g.length-3&&(g=g.substring(0,d+3))}catch(m){}try{var f=e.getElementsByTagName("span"),l=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(g);this.isCompatibleString(l)&&(g=l)}catch(m){}}catch(m){}b(this.isCompatibleString(g)?g:null)}))["catch"](function(c){b(null)})}))["catch"](function(c){b(null)});else if(null!=e&&0<e.length&&"text"==c&&0<=mxUtils.indexOf(e[0].types,"text/plain"))e[0].getType("text/plain").then(function(c){c.text().then(function(c){b(c)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+0<=d&&d<g.length-3&&(g=g.substring(0,d+3))}catch(q){}try{var f=e.getElementsByTagName("span"),l=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(g);this.isCompatibleString(l)&&(g=l)}catch(q){}}catch(q){}b(this.isCompatibleString(g)?g:null)}))["catch"](function(c){b(null)})}))["catch"](function(c){b(null)});else if(null!=e&&0<e.length&&"text"==c&&0<=mxUtils.indexOf(e[0].types,"text/plain"))e[0].getType("text/plain").then(function(c){c.text().then(function(c){b(c)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(c){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var c=null;if(null!=b&&0<b.length){var e="<meta "==b.substring(0,6),c=document.createElement("div");c.innerHTML=(e?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=c.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
c.firstChild.nodeName&&"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(b=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,b==c.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(c,b),asHtml=!1));e=e&&null!=c.firstChild?c.firstChild.nextSibling:c.firstChild;null!=e&&null==e.nextSibling&&e.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==e.nodeName?(b=e.getAttribute("src"),
@@ -2282,19 +2282,19 @@ EditorUi.prototype.extractGraphModelFromEvent=function(b){var c=null,e=null;null
EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,c);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(c.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(c))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(c);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
EditorUi.prototype.executeLayout=function(b,c,e){var k=this.editor.graph;if(k.isEnabled()){k.getModel().beginUpdate();try{b()}catch(g){throw g;}finally{this.allowAnimation&&c&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(b=new mxMorphing(k),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=e&&e()})),b.startAnimation()):(k.getModel().endUpdate(),null!=e&&e())}}};
-EditorUi.prototype.showImageDialog=function(b,c,e,k){k=this.editor.graph.cellEditor;var g=k.saveSelection(),n=mxUtils.prompt(b,c);k.restoreSelection(g);if(null!=n&&0<n.length){var t=new Image;t.onload=function(){e(n,t.width,t.height)};t.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};t.src=n}else e(null)};EditorUi.prototype.showLinkDialog=function(b,c,e){b=new LinkDialog(this,b,c,e);this.showDialog(b.container,420,90,!0,!0);b.init()};
+EditorUi.prototype.showImageDialog=function(b,c,e,k){k=this.editor.graph.cellEditor;var g=k.saveSelection(),p=mxUtils.prompt(b,c);k.restoreSelection(g);if(null!=p&&0<p.length){var t=new Image;t.onload=function(){e(p,t.width,t.height)};t.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};t.src=p}else e(null)};EditorUi.prototype.showLinkDialog=function(b,c,e){b=new LinkDialog(this,b,c,e);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b){b=new ChangePageSetup(this,null,b);b.ignoreColor=!0;this.editor.graph.model.execute(b)});var e=mxUtils.prompt(mxResources.get("backgroundImage"),null!=c?c.src:"");null!=e&&0<e.length?(c=new Image,c.onload=function(){b(new mxImage(e,c.width,c.height),!1)},c.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},c.src=e):b(null)};
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,c,e){mxUtils.confirm(b)?null!=c&&c():null!=e&&e()};EditorUi.prototype.createOutline=function(b){var c=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){c.update(!1)});return c};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
EditorUi.prototype.createKeyHandler=function(b){function c(b,f,c){t.push(function(){if(!k.isSelectionEmpty()&&k.isEnabled())if(f=null!=f?f:1,c){k.getModel().beginUpdate();try{for(var d=k.getSelectionCells(),e=0;e<d.length;e++)if(k.getModel().isVertex(d[e])&&k.isCellResizable(d[e])){var l=k.getCellGeometry(d[e]);null!=l&&(l=l.clone(),37==b?l.width=Math.max(0,l.width-f):38==b?l.height=Math.max(0,l.height-f):39==b?l.width+=f:40==b&&(l.height+=f),k.getModel().setGeometry(d[e],l))}}finally{k.getModel().endUpdate()}}else{var g=
k.getSelectionCell(),l=k.model.getParent(g),d=null;1==k.getSelectionCount()&&k.model.isVertex(g)&&null!=k.layoutManager&&!k.isCellLocked(g)&&(d=k.layoutManager.getLayout(l));if(null!=d&&d.constructor==mxStackLayout)d=l.getIndex(g),37==b||38==b?k.model.add(l,g,Math.max(0,d-1)):39!=b&&40!=b||k.model.add(l,g,Math.min(k.model.getChildCount(l),d+1));else{d=k.getMovableCells(k.getSelectionCells());g=[];for(e=0;e<d.length;e++)l=k.getCurrentCellStyle(d[e]),"1"==mxUtils.getValue(l,"part","0")?(l=k.model.getParent(d[e]),
-k.model.isVertex(l)&&0>mxUtils.indexOf(d,l)&&g.push(l)):g.push(d[e]);0<g.length&&(d=l=0,37==b?l=-f:38==b?d=-f:39==b?l=f:40==b&&(d=f),k.moveCells(g,l,d))}}});null!=d&&window.clearTimeout(d);d=window.setTimeout(function(){if(0<t.length){k.getModel().beginUpdate();try{for(var b=0;b<t.length;b++)t[b]();t=[]}finally{k.getModel().endUpdate()}}},200)}var e=this,k=this.editor.graph,g=new mxKeyHandler(k),n=g.isEventIgnored;g.isEventIgnored=function(b){return!(mxEvent.isShiftDown(b)&&9==b.keyCode)&&(!this.isControlDown(b)||
-mxEvent.isShiftDown(b)||90!=b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode&&85!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&n.apply(this,arguments)};g.isEnabledForEvent=function(b){return!mxEvent.isConsumed(b)&&this.isGraphEvent(b)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};g.isControlDown=function(b){return mxEvent.isControlDown(b)||mxClient.IS_MAC&&b.metaKey};var t=[],d=
+k.model.isVertex(l)&&0>mxUtils.indexOf(d,l)&&g.push(l)):g.push(d[e]);0<g.length&&(d=l=0,37==b?l=-f:38==b?d=-f:39==b?l=f:40==b&&(d=f),k.moveCells(g,l,d))}}});null!=d&&window.clearTimeout(d);d=window.setTimeout(function(){if(0<t.length){k.getModel().beginUpdate();try{for(var b=0;b<t.length;b++)t[b]();t=[]}finally{k.getModel().endUpdate()}}},200)}var e=this,k=this.editor.graph,g=new mxKeyHandler(k),p=g.isEventIgnored;g.isEventIgnored=function(b){return!(mxEvent.isShiftDown(b)&&9==b.keyCode)&&(!this.isControlDown(b)||
+mxEvent.isShiftDown(b)||90!=b.keyCode&&89!=b.keyCode&&188!=b.keyCode&&190!=b.keyCode&&85!=b.keyCode)&&(66!=b.keyCode&&73!=b.keyCode||!this.isControlDown(b)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};g.isEnabledForEvent=function(b){return!mxEvent.isConsumed(b)&&this.isGraphEvent(b)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};g.isControlDown=function(b){return mxEvent.isControlDown(b)||mxClient.IS_MAC&&b.metaKey};var t=[],d=
null,f={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},l=g.getFunction;mxKeyHandler.prototype.getFunction=function(b){if(k.isEnabled()){if(mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){var d=e.actions.get(e.altShiftActions[b.keyCode]);if(null!=d)return d.funct}if(null!=f[b.keyCode]&&!k.isSelectionEmpty())if(!this.isControlDown(b)&&mxEvent.isShiftDown(b)&&mxEvent.isAltDown(b)){if(k.model.isVertex(k.getSelectionCell()))return function(){var d=
k.connectVertex(k.getSelectionCell(),f[b.keyCode],k.defaultEdgeLength,b,!0);null!=d&&0<d.length&&(1==d.length&&k.model.isEdge(d[0])?k.setSelectionCell(k.model.getTerminal(d[0],!1)):k.setSelectionCell(d[d.length-1]),k.scrollCellToVisible(k.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(k.view.getState(k.getSelectionCell())))}}else return this.isControlDown(b)?function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null,!0)}:function(){c(b.keyCode,mxEvent.isShiftDown(b)?k.gridSize:null)}}return l.apply(this,
-arguments)};g.bindAction=mxUtils.bind(this,function(b,d,f,c){var e=this.actions.get(f);null!=e&&(f=function(){e.isEnabled()&&e.funct()},d?c?g.bindControlShiftKey(b,f):g.bindControlKey(b,f):c?g.bindShiftKey(b,f):g.bindKey(b,f))});var m=this,p=g.escape;g.escape=function(b){p.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){k.exitGroup()});g.bindControlShiftKey(35,function(){k.enterGroup()});g.bindShiftKey(36,function(){k.home()});g.bindKey(35,function(){k.refresh()});
-g.bindAction(107,!0,"zoomIn");g.bindAction(109,!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){k.isEnabled()&&k.foldCells(!0)}),g.bindControlKey(35,function(){k.isEnabled()&&k.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),
+arguments)};g.bindAction=mxUtils.bind(this,function(b,d,f,c){var e=this.actions.get(f);null!=e&&(f=function(){e.isEnabled()&&e.funct()},d?c?g.bindControlShiftKey(b,f):g.bindControlKey(b,f):c?g.bindShiftKey(b,f):g.bindKey(b,f))});var q=this,m=g.escape;g.escape=function(b){m.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){k.exitGroup()});g.bindControlShiftKey(35,function(){k.enterGroup()});g.bindShiftKey(36,function(){k.home()});g.bindKey(35,function(){k.refresh()});
+g.bindAction(107,!0,"zoomIn");g.bindAction(109,!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){k.isEnabled()&&k.foldCells(!0)}),g.bindControlKey(35,function(){k.isEnabled()&&k.foldCells(!1)}),g.bindControlKey(13,function(){q.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),
g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),
g.bindAction(66,!0,"bold"),g.bindAction(66,!0,"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,
!0,"formatPanel",!0),g.bindAction(85,!0,"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){k.isEnabled()&&k.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
@@ -2303,38 +2303,38 @@ EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),
"scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}for(var c=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],b=0;b<c.length;b++)null!=c[b]&&null!=c[b].parentNode&&c[b].parentNode.removeChild(c[b])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var b=[["nbsp","160"],["shy","173"]],c=mxUtils.parseXml;mxUtils.parseXml=function(e){for(var k=0;k<b.length;k++)e=e.replace(new RegExp("&"+b[k][0]+";","g"),"&#"+b[k][1]+";");return c(e)}})();
Date.prototype.toISOString||function(){function b(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,c=function(c){return"function"===typeof c||"[object Function]"===b.call(c)},e=Math.pow(2,53)-1;return function(b){var g=Object(b);if(null==b)throw new TypeError("Array.from requires an array-like object - not null or undefined");var k=1<arguments.length?arguments[1]:void 0,t;if("undefined"!==typeof k){if(!c(k))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(t=
-arguments[2])}var d;d=Number(g.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),e);for(var f=c(this)?Object(new this(d)):Array(d),l=0,m;l<d;)m=g[l],f[l]=k?"undefined"===typeof t?k(m,l):k.call(t,m,l):m,l+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+arguments[2])}var d;d=Number(g.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),e);for(var f=c(this)?Object(new this(d)):Array(d),l=0,q;l<d;)q=g[l],f[l]=k?"undefined"===typeof t?k(q,l):k.call(t,q,l):q,l+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?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.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,c,e){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,c,e,k,g,n){mxGraph.call(this,b,c,e,k);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!1;b=this.baseUrl;c=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=b.indexOf("/",c+2),0<c&&(this.domainUrl=b.substring(0,c)),c=b.lastIndexOf("/"),0<c&&(this.domainPathUrl=b.substring(0,c+1)));this.isHtmlLabel=function(b){b=this.getCurrentCellStyle(b);
-return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState(),k=this.view.scale;if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),m=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=
-g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var p=this.selectionCellsHandler.getHandler(g.cell);null!=p&&null!=p.bends&&0<p.bends.length&&(l=p.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(p=this.selectionCellsHandler.getHandler(g.cell),null==p||null==p.getHandleForEvent(e))){var q=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);q.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var n=this.model.getParent(g.cell),p=this.model.getParent(n);if(!this.isCellSelected(p)){var u=this.getCellGeometry(g.cell),u=null!=u.alternateBounds?u.alternateBounds:u;if(mxUtils.intersects(q,new mxRectangle(g.x,g.y-2,u.width*k,3))&&this.model.getChildAt(p,0)!=n||mxUtils.intersects(q,new mxRectangle(g.x,g.y+u.height-2,u.width,3))||mxUtils.intersects(q,new mxRectangle(g.x-2,g.y,2,u.height*k))&&
-this.model.getChildAt(n,0)!=g.cell||mxUtils.intersects(q,new mxRectangle(g.x+u.width*k-2,g.y,2,u.height*k)))n=this.selectionCellsHandler.isHandled(p),this.selectCellForEvent(p,e.getEvent()),p=this.selectionCellsHandler.getHandler(p),null!=p&&(u=p.getHandleForEvent(e),null!=u&&(p.start(e.getGraphX(),e.getGraphY(),u),p.blockDelayedSelection=!n,e.consume()))}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(p=this.getActualStartSize(g.cell),
-(0<p.x||0<p.width)&&mxUtils.intersects(q,new mxRectangle(g.x+(p.x-p.width-1)*k+(0==p.x?g.width:0),g.y,1,g.height))||(0<p.y||0<p.height)&&mxUtils.intersects(q,new mxRectangle(g.x,g.y+(p.y-p.height-1)*k+(0==p.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),p=this.selectionCellsHandler.getHandler(g.cell),null!=p&&(u=mxEvent.CUSTOM_HANDLE-p.customHandles.length+1,p.start(e.getGraphX(),e.getGraphY(),u),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,
+Graph=function(b,c,e,k,g,p){mxGraph.call(this,b,c,e,k);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;c=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<c&&(c=b.indexOf("/",c+2),0<c&&(this.domainUrl=b.substring(0,c)),c=b.lastIndexOf("/"),0<c&&(this.domainPathUrl=b.substring(0,c+1)));this.isHtmlLabel=function(b){b=this.getCurrentCellStyle(b);
+return null!=b?"1"==b.html||"wrap"==b[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var t=null,d=null,f=null,l=null,q=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,c){if("mouseDown"==c.getProperty("eventName")&&this.isEnabled()){var e=c.getProperty("event"),g=e.getState(),k=this.view.scale;if(!mxEvent.isAltDown(e.getEvent())&&null!=g)if(this.model.isEdge(g.cell))if(t=new mxPoint(e.getGraphX(),e.getGraphY()),q=this.isCellSelected(g.cell),f=g,d=e,null!=g.text&&null!=
+g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,e.getGraphX(),e.getGraphY()))l=mxEvent.LABEL_HANDLE;else{var m=this.selectionCellsHandler.getHandler(g.cell);null!=m&&null!=m.bends&&0<m.bends.length&&(l=m.getHandleForEvent(e))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(e.getEvent())&&(m=this.selectionCellsHandler.getHandler(g.cell),null==m||null==m.getHandleForEvent(e))){var n=new mxRectangle(e.getGraphX()-1,e.getGraphY()-1);n.grow(mxEvent.isTouchEvent(e.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(g.cell)&&!this.isCellSelected(g.cell)){var p=this.model.getParent(g.cell),m=this.model.getParent(p);if(!this.isCellSelected(m)){var v=this.getCellGeometry(g.cell),v=null!=v.alternateBounds?v.alternateBounds:v;if(mxUtils.intersects(n,new mxRectangle(g.x,g.y-2,v.width*k,3))&&this.model.getChildAt(m,0)!=p||mxUtils.intersects(n,new mxRectangle(g.x,g.y+v.height-2,v.width,3))||mxUtils.intersects(n,new mxRectangle(g.x-2,g.y,2,v.height*k))&&
+this.model.getChildAt(p,0)!=g.cell||mxUtils.intersects(n,new mxRectangle(g.x+v.width*k-2,g.y,2,v.height*k)))p=this.selectionCellsHandler.isHandled(m),this.selectCellForEvent(m,e.getEvent()),m=this.selectionCellsHandler.getHandler(m),null!=m&&(v=m.getHandleForEvent(e),null!=v&&(m.start(e.getGraphX(),e.getGraphY(),v),m.blockDelayedSelection=!p,e.consume()))}}for(;!e.isConsumed()&&null!=g&&(this.isTableCell(g.cell)||this.isTableRow(g.cell)||this.isTable(g.cell));)this.isSwimlane(g.cell)&&(m=this.getActualStartSize(g.cell),
+(0<m.x||0<m.width)&&mxUtils.intersects(n,new mxRectangle(g.x+(m.x-m.width-1)*k+(0==m.x?g.width:0),g.y,1,g.height))||(0<m.y||0<m.height)&&mxUtils.intersects(n,new mxRectangle(g.x,g.y+(m.y-m.height-1)*k+(0==m.y?g.height:0),g.width,1)))&&(this.selectCellForEvent(g.cell,e.getEvent()),m=this.selectionCellsHandler.getHandler(g.cell),null!=m&&(v=mxEvent.CUSTOM_HANDLE-m.customHandles.length+1,m.start(e.getGraphX(),e.getGraphY(),v),e.consume())),g=this.view.getState(this.model.getParent(g.cell))}}}));this.addMouseListener({mouseDown:function(b,
d){},mouseMove:mxUtils.bind(this,function(b,c){var e=this.selectionCellsHandler.handlers.map,g;for(g in e)if(null!=e[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(c.getEvent()))if(g=this.tolerance,null!=t&&null!=f&&null!=d){if(e=f,Math.abs(t.x-c.getGraphX())>g||Math.abs(t.y-c.getGraphY())>g){var k=this.selectionCellsHandler.getHandler(e.cell);null==k&&this.model.isEdge(e.cell)&&(k=this.createHandler(e));if(null!=k&&null!=k.bends&&0<k.bends.length){g=k.getHandleForEvent(d);
-var p=this.view.getEdgeStyle(e),q=p==mxEdgeStyle.EntityRelation;m||l!=mxEvent.LABEL_HANDLE||(g=l);if(q&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!q||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)q||g==mxEvent.LABEL_HANDLE||(q=e.absolutePoints,null!=q&&(null==p&&null==g||p==mxEdgeStyle.OrthConnector)&&(g=l,null==g&&(g=new mxRectangle(t.x,
-t.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,q[0].x,q[0].y)?g=0:mxUtils.contains(g,q[q.length-1].x,q[q.length-1].y)?g=k.bends.length-1:null!=p&&(2==q.length||3==q.length&&(0==Math.round(q[0].x-q[1].x)&&0==Math.round(q[1].x-q[2].x)||0==Math.round(q[0].y-q[1].y)&&0==Math.round(q[1].y-q[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,t.x,t.y),g=null==p?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),g),c.consume(),this.graphHandler.reset()}null!=
-k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());m=!1;t=d=f=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(g=new mxRectangle(c.getGraphX(),c.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),q=e.absolutePoints,null!=q)if(null!=e.text&&null!=e.text.boundingBox&&
-mxUtils.contains(e.text.boundingBox,c.getGraphX(),c.getGraphY()))k="move";else if(mxUtils.contains(g,q[0].x,q[0].y)||mxUtils.contains(g,q[q.length-1].x,q[q.length-1].y))k="pointer";else if(null!=e.visibleSourceState||null!=e.visibleTargetState)g=this.view.getEdgeStyle(e),k="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(e)&&(g=mxUtils.findNearestSegment(e,c.getGraphX(),c.getGraphY()),g<q.length-1&&0<=g&&(k=0==Math.round(q[g].x-q[g+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(c.getEvent())){g=
-new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);g.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(e.cell)&&(q=this.model.getParent(e.cell),p=this.model.getParent(q),!this.isCellSelected(p)))if(mxUtils.intersects(g,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(q,0)!=e.cell||mxUtils.intersects(g,new mxRectangle(e.x+e.width-2,e.y,2,e.height)))k="col-resize";else if(mxUtils.intersects(g,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(p,0)!=q||mxUtils.intersects(g,
-new mxRectangle(e.x,e.y+e.height-2,e.width,3)))k="row-resize";for(q=e;null==k&&null!=q&&(this.isTableCell(q.cell)||this.isTableRow(q.cell)||this.isTable(q.cell));){if(this.isSwimlane(q.cell)){var p=this.getActualStartSize(q.cell),n=this.view.scale;(0<p.x||0<p.width)&&mxUtils.intersects(g,new mxRectangle(q.x+(p.x-p.width-1)*n+(0==p.x?q.width*n:0),q.y,1,q.height))?k="col-resize":(0<p.y||0<p.height)&&mxUtils.intersects(g,new mxRectangle(q.x,q.y+(p.y-p.height-1)*n+(0==p.y?q.height:0),q.width,1))&&(k=
-"row-resize")}q=this.view.getState(this.model.getParent(q.cell))}}null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(b,c){l=t=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(b){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);b.view.graph.isHtmlLabel(b.cell)&&(d=1!=b.style.html?mxUtils.htmlEntities(d,!1):b.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);
-this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(b,d){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var p=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var b=p.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],f=this.graph.pageFormat,c=this.graph.pageScale,e=f.width*c,f=f.height*c,c=this.graph.view.translate,l=this.graph.view.scale,g=this.graph.getPageLayout(),m=0;m<g.width;m++)d.push(new mxRectangle(((g.x+m)*e+c.x)*l,(g.y*f+c.y)*l,e*l,f*l));for(m=1;m<g.height;m++)d.push(new mxRectangle((g.x*e+c.x)*l,((g.y+m)*f+c.y)*l,e*l,f*l));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var q=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=q.apply(this,arguments),f=new mxDictionary,c=[],e=0;e<d.length;e++){var l=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
-this.graph.isCellSelected(d[e])?this.graph.model.getParent(d[e]):this.graph.isTableRow(b)&&this.graph.isTableRow(d[e])&&this.graph.isCellSelected(d[e])?d[e]:this.graph.getCompositeParent(d[e]);null==l||f.get(l)||(f.put(l,!0),c.push(l))}return c};var v=this.graphHandler.start;this.graphHandler.start=function(b,d,f,c){var e=!1;this.graph.isTableCell(b)&&(this.graph.isCellSelected(b)?e=!0:b=this.graph.model.getParent(b));e||this.graph.isTableRow(b)&&this.graph.isCellSelected(b)||(b=this.graph.getCompositeParent(b));
-v.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var u=new mxRubberband(this);this.getRubberband=function(){return u};var y=(new Date).getTime(),x=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;D.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var C=
-this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&C.apply(this,arguments)};var G=this.isToggleEvent;this.isToggleEvent=function(b){return G.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var J=u.isForceRubberbandEvent;u.isForceRubberbandEvent=function(b){return J.apply(this,
+var m=this.view.getEdgeStyle(e),n=m==mxEdgeStyle.EntityRelation;q||l!=mxEvent.LABEL_HANDLE||(g=l);if(n&&0!=g&&g!=k.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!n||null==e.visibleSourceState&&null==e.visibleTargetState||(this.graphHandler.reset(),c.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=e.visibleSourceState||g==k.bends.length-1||null!=e.visibleTargetState)n||g==mxEvent.LABEL_HANDLE||(n=e.absolutePoints,null!=n&&(null==m&&null==g||m==mxEdgeStyle.OrthConnector)&&(g=l,null==g&&(g=new mxRectangle(t.x,
+t.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,n[0].x,n[0].y)?g=0:mxUtils.contains(g,n[n.length-1].x,n[n.length-1].y)?g=k.bends.length-1:null!=m&&(2==n.length||3==n.length&&(0==Math.round(n[0].x-n[1].x)&&0==Math.round(n[1].x-n[2].x)||0==Math.round(n[0].y-n[1].y)&&0==Math.round(n[1].y-n[2].y)))?g=2:(g=mxUtils.findNearestSegment(e,t.x,t.y),g=null==m?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),k.start(c.getGraphX(),c.getGraphX(),g),c.consume(),this.graphHandler.reset()}null!=
+k&&(this.selectionCellsHandler.isHandlerActive(k)?this.isCellSelected(e.cell)||(this.selectionCellsHandler.handlers.put(e.cell,k),this.selectCellForEvent(e.cell,c.getEvent())):this.isCellSelected(e.cell)||k.destroy());q=!1;t=d=f=l=null}}else if(e=c.getState(),null!=e&&this.isCellEditable(e.cell)){k=null;if(this.model.isEdge(e.cell)){if(g=new mxRectangle(c.getGraphX(),c.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),n=e.absolutePoints,null!=n)if(null!=e.text&&null!=e.text.boundingBox&&
+mxUtils.contains(e.text.boundingBox,c.getGraphX(),c.getGraphY()))k="move";else if(mxUtils.contains(g,n[0].x,n[0].y)||mxUtils.contains(g,n[n.length-1].x,n[n.length-1].y))k="pointer";else if(null!=e.visibleSourceState||null!=e.visibleTargetState)g=this.view.getEdgeStyle(e),k="crosshair",g!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(e)&&(g=mxUtils.findNearestSegment(e,c.getGraphX(),c.getGraphY()),g<n.length-1&&0<=g&&(k=0==Math.round(n[g].x-n[g+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(c.getEvent())){g=
+new mxRectangle(c.getGraphX()-1,c.getGraphY()-1);g.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(e.cell)&&(n=this.model.getParent(e.cell),m=this.model.getParent(n),!this.isCellSelected(m)))if(mxUtils.intersects(g,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(n,0)!=e.cell||mxUtils.intersects(g,new mxRectangle(e.x+e.width-2,e.y,2,e.height)))k="col-resize";else if(mxUtils.intersects(g,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(m,0)!=n||mxUtils.intersects(g,
+new mxRectangle(e.x,e.y+e.height-2,e.width,3)))k="row-resize";for(n=e;null==k&&null!=n&&(this.isTableCell(n.cell)||this.isTableRow(n.cell)||this.isTable(n.cell));){if(this.isSwimlane(n.cell)){var m=this.getActualStartSize(n.cell),p=this.view.scale;(0<m.x||0<m.width)&&mxUtils.intersects(g,new mxRectangle(n.x+(m.x-m.width-1)*p+(0==m.x?n.width*p:0),n.y,1,n.height))?k="col-resize":(0<m.y||0<m.height)&&mxUtils.intersects(g,new mxRectangle(n.x,n.y+(m.y-m.height-1)*p+(0==m.y?n.height:0),n.width,1))&&(k=
+"row-resize")}n=this.view.getState(this.model.getParent(n.cell))}}null!=k&&e.setCursor(k)}}),mouseUp:mxUtils.bind(this,function(b,c){l=t=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(b){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);b.view.graph.isHtmlLabel(b.cell)&&(d=1!=b.style.html?mxUtils.htmlEntities(d,!1):b.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);
+this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(b,d){return!1};this.alternateEdgeStyle="vertical";null==k&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var b=m.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],f=this.graph.pageFormat,c=this.graph.pageScale,e=f.width*c,f=f.height*c,c=this.graph.view.translate,l=this.graph.view.scale,g=this.graph.getPageLayout(),k=0;k<g.width;k++)d.push(new mxRectangle(((g.x+k)*e+c.x)*l,(g.y*f+c.y)*l,e*l,f*l));for(k=1;k<g.height;k++)d.push(new mxRectangle((g.x*e+c.x)*l,((g.y+k)*f+c.y)*l,e*l,f*l));b=d.concat(b)}return b};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+function(b,d){return null==b.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(b){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var n=this.graphHandler.getCells;this.graphHandler.getCells=function(b){for(var d=n.apply(this,arguments),f=new mxDictionary,c=[],e=0;e<d.length;e++){var l=this.graph.isTableCell(b)&&this.graph.isTableCell(d[e])&&
+this.graph.isCellSelected(d[e])?this.graph.model.getParent(d[e]):this.graph.isTableRow(b)&&this.graph.isTableRow(d[e])&&this.graph.isCellSelected(d[e])?d[e]:this.graph.getCompositeParent(d[e]);null==l||f.get(l)||(f.put(l,!0),c.push(l))}return c};var u=this.graphHandler.start;this.graphHandler.start=function(b,d,f,c){var e=!1;this.graph.isTableCell(b)&&(this.graph.isCellSelected(b)?e=!0:b=this.graph.model.getParent(b));e||this.graph.isTableRow(b)&&this.graph.isCellSelected(b)||(b=this.graph.getCompositeParent(b));
+u.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(b,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var v=new mxRubberband(this);this.getRubberband=function(){return v};var y=(new Date).getTime(),x=0,D=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var b=this.currentState;D.apply(this,arguments);b!=this.currentState?(y=(new Date).getTime(),x=0):x=(new Date).getTime()-y};var C=
+this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(b){return null!=this.currentState&&b.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&C.apply(this,arguments)};var G=this.isToggleEvent;this.isToggleEvent=function(b){return G.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};var J=v.isForceRubberbandEvent;v.isForceRubberbandEvent=function(b){return J.apply(this,
arguments)&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isControlDown(b.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==b.getState()&&mxEvent.isTouchEvent(b.getEvent())};var L=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(L=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=L)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(b){return mxEvent.isMouseEvent(b.getEvent())};var H=this.click;this.click=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);if(this.isEnabled()&&!d||b.isConsumed())return H.apply(this,arguments);var f=d?b.sourceState.cell:b.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?
this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};var K=this.tooltipHandler.show;this.tooltipHandler.show=function(){K.apply(this,arguments);if(null!=this.div)for(var b=this.div.getElementsByTagName("a"),d=0;d<b.length;d++)null!=b[d].getAttribute("href")&&null==b[d].getAttribute("target")&&b[d].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(b){return b.sourceState};
this.getCursorForMouseEvent=function(b){var d=null==b.state&&null!=b.sourceState&&this.isCellLocked(b.sourceState.cell);return this.getCursorForCell(d?b.sourceState.cell:b.getCell())};var A=this.getCursorForCell;this.getCursorForCell=function(b){if(!this.isEnabled()||this.isCellLocked(b)){if(null!=this.getClickableLinkForCell(b))return"pointer";if(this.isCellLocked(b))return"default"}return A.apply(this,arguments)};this.selectRegion=function(b,d){var f=mxEvent.isAltDown(d)?b:null,f=this.getCells(b.x,
b.y,b.width,b.height,null,null,f,function(b){return"1"==mxUtils.getValue(b.style,"locked","0")},!0);if(this.isToggleEvent(d))for(var c=0;c<f.length;c++)this.selectCellForEvent(f[c],d);else this.selectCellsForEvent(f,d);return f};var M=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(b,d,f){return this.graph.isCellSelected(b)?!1:M.apply(this,arguments)};this.isCellLocked=function(b){for(;null!=b;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(b),
"locked","0"))return!0;b=this.model.getParent(b)}return!1};var Q=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(b,d){if("mouseDown"==d.getProperty("eventName")){var f=d.getProperty("event").getState();Q=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(b,d){if(!mxEvent.isMultiTouchEvent(d)){var f=d.getProperty("event"),c=d.getProperty("cell");null==c?(f=mxUtils.convertPoint(this.container,
-mxEvent.getClientX(f),mxEvent.getClientY(f)),u.start(f.x,f.y)):null!=Q?this.addSelectionCells(Q):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);Q=null;d.consume()}}));this.connectionHandler.selectCells=function(b,d){this.graph.setSelectionCell(d||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,d){var f=b.view.graph;return d&&(f.isCellSelected(b.cell)||f.isTableRow(b.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(b.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
+mxEvent.getClientX(f),mxEvent.getClientY(f)),v.start(f.x,f.y)):null!=Q?this.addSelectionCells(Q):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);Q=null;d.consume()}}));this.connectionHandler.selectCells=function(b,d){this.graph.setSelectionCell(d||b)};this.connectionHandler.constraintHandler.isStateIgnored=function(b,d){var f=b.view.graph;return d&&(f.isCellSelected(b.cell)||f.isTableRow(b.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(b.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
mxUtils.bind(this,function(){var b=this.connectionHandler.constraintHandler;null!=b.currentFocus&&b.isStateIgnored(b.currentFocus,!0)&&(b.currentFocus=null,b.constraints=null,b.destroyIcons());b.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var T=this.updateMouseEvent;this.updateMouseEvent=function(b){b=T.apply(this,arguments);null!=b.state&&this.isCellLocked(b.getCell())&&(b.state=null);return b}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
@@ -2344,17 +2344,17 @@ Graph.createSvgImage=function(b,c,e,k,g){e=unescape(encodeURIComponent(Graph.svg
Graph.zapGremlins=function(b){for(var c=0,e=[],k=0;k<b.length;k++){var g=b.charCodeAt(k);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(e.push(b.substring(c,k)),c=k+1)}0<c&&c<b.length&&e.push(b.substring(c));return 0==e.length?b:e.join("")};Graph.stringToBytes=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=b.charCodeAt(e);return c};Graph.bytesToString=function(b){for(var c=Array(b.length),e=0;e<b.length;e++)c[e]=String.fromCharCode(b[e]);return c.join("")};
Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(b,e){return String.fromCharCode(parseInt(e,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(b){return"%"+("00"+b.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,c){var e=mxUtils.getXml(b);return Graph.compress(c?e:Graph.zapGremlins(e))};
Graph.arrayBufferToString=function(b){var c="";b=new Uint8Array(b);for(var e=b.byteLength,k=0;k<e;k++)c+=String.fromCharCode(b[k]);return c};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(b){return b.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(b,c,e){var k=c.charCodeAt(0),g=1,n=-1;for(e=e||0;e<b.byteLength;e++)if(b[e]==k){n=e;break}for(e=n+1;-1<n&&e<b.byteLength&&e<n+c.length-1;e++){if(b[e]!=c.charCodeAt(g))return Graph.arrayBufferIndexOfString(b,c,n+1);g++}return g==c.length-1?n:-1};Graph.compress=function(b,c){if(null==b||0==b.length||"undefined"===typeof pako)return b;var e=c?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(e)))};
+Graph.arrayBufferIndexOfString=function(b,c,e){var k=c.charCodeAt(0),g=1,p=-1;for(e=e||0;e<b.byteLength;e++)if(b[e]==k){p=e;break}for(e=p+1;-1<p&&e<b.byteLength&&e<p+c.length-1;e++){if(b[e]!=c.charCodeAt(g))return Graph.arrayBufferIndexOfString(b,c,p+1);g++}return g==c.length-1?p:-1};Graph.compress=function(b,c){if(null==b||0==b.length||"undefined"===typeof pako)return b;var e=c?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(e)))};
Graph.decompress=function(b,c,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));c=decodeURIComponent(c?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return e?c:Graph.zapGremlins(c)};
Graph.fadeNodes=function(b,c,e,k,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,c);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=k&&k()},g)},0)};Graph.setTransitionForNodes=function(b,c){for(var e=0;e<b.length;e++)mxUtils.setPrefixedStyle(b[e].style,"transition",c)};
Graph.setOpacityForNodes=function(b,c){for(var e=0;e<b.length;e++)b[e].style.opacity=c};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};Graph.sanitizeHtml=function(b,c){return html_sanitize(b,function(b){return null!=b&&"javascript:"!==b.toString().toLowerCase().substring(0,11)?b:null},function(b){return b})};
Graph.sanitizeSvg=function(b){for(var c=b.getElementsByTagName("*"),e=0;e<c.length;e++)for(var k=0;k<c[e].attributes.length;k++){var g=c[e].attributes[k];2<g.name.length&&"on"==g.name.toLowerCase().substring(0,2)&&c[e].removeAttribute(g.name)}for(b=b.getElementsByTagName("script");0<b.length;)b[0].parentNode.removeChild(b[0])};
-Graph.clipSvgDataUri=function(b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var c=document.createElement("div");c.style.position="absolute";c.style.visibility="hidden";var e=decodeURIComponent(escape(atob(b.substring(26)))),k=e.indexOf("<svg");if(0<=k){c.innerHTML=e.substring(k);Graph.sanitizeSvg(c);var g=c.getElementsByTagName("svg");if(0<g.length){document.body.appendChild(c);try{var n=g[0].getBBox();0<n.width&&0<n.height&&(c.getElementsByTagName("svg")[0].setAttribute("viewBox",
-n.x+" "+n.y+" "+n.width+" "+n.height),c.getElementsByTagName("svg")[0].setAttribute("width",n.width),c.getElementsByTagName("svg")[0].setAttribute("height",n.height))}catch(t){}finally{document.body.removeChild(c)}b=Editor.createSvgDataUri(mxUtils.getXml(g[0]))}}}catch(t){}return b};
+Graph.clipSvgDataUri=function(b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var c=document.createElement("div");c.style.position="absolute";c.style.visibility="hidden";var e=decodeURIComponent(escape(atob(b.substring(26)))),k=e.indexOf("<svg");if(0<=k){c.innerHTML=e.substring(k);Graph.sanitizeSvg(c);var g=c.getElementsByTagName("svg");if(0<g.length){document.body.appendChild(c);try{var p=g[0].getBBox();0<p.width&&0<p.height&&(c.getElementsByTagName("svg")[0].setAttribute("viewBox",
+p.x+" "+p.y+" "+p.width+" "+p.height),c.getElementsByTagName("svg")[0].setAttribute("width",p.width),c.getElementsByTagName("svg")[0].setAttribute("height",p.height))}catch(t){}finally{document.body.removeChild(c)}b=Editor.createSvgDataUri(mxUtils.getXml(g[0]))}}}catch(t){}return b};
Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.createRemoveIcon=function(b,c){var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",b);e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";e.style.cursor="pointer";mxEvent.addListener(e,"click",c);return e};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled=!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.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.enableFlowAnimation=!1;
Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(b,c){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var e=b.view.graph.tolerance,k=!0,t=null,d=mxUtils.bind(this,function(b){k=!0;t=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b))}),f=mxUtils.bind(this,function(b){k=k&&null!=t&&Math.abs(t.x-mxEvent.getClientX(b))<e&&Math.abs(t.y-mxEvent.getClientY(b))<e}),l=mxUtils.bind(this,function(d){if(k)for(var f=mxEvent.getSource(d);null!=
f&&f!=c.node;){if("a"==f.nodeName.toLowerCase()){b.view.graph.labelLinkClicked(b,f,d);break}f=f.parentNode}});mxEvent.addGestureListeners(c.node,d,f,l);mxEvent.addListener(c.node,"click",function(b){mxEvent.consume(b)})};if(null!=this.tooltipHandler){var c=this.tooltipHandler.init;this.tooltipHandler.init=function(){c.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);"A"==c.nodeName&&(c=c.getAttribute("href"),null!=
@@ -2362,9 +2362,9 @@ c&&this.graph.isCustomLink(c)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.getVerticesAndEdges=function(b,c){b=null!=b?b:!0;c=null!=c?c:!0;var d=this.model;return d.filterDescendants(function(f){return b&&d.isVertex(f)||c&&d.isEdge(f)},d.getRoot())};Graph.prototype.getCommonStyle=function(b){for(var c={},d=0;d<b.length;d++){var f=this.view.getState(b[d]);this.mergeStyle(f.style,c,0==d)}return c};Graph.prototype.mergeStyle=function(b,
c,d){if(null!=b){var f={},e;for(e in b){var g=b[e];null!=g&&(f[e]=!0,null==c[e]&&d?c[e]=g:c[e]!=g&&delete c[e])}for(e in c)f[e]||delete c[e]}};Graph.prototype.getStartEditingCell=function(b,c){var d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(b)&&(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b)&&(b=this.model.getChildAt(b,0),d=this.getCellStyle(b),d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(b)&&
(!this.isSwimlane(b)||0==d)&&""==this.getLabel(b)&&0<this.model.getChildCount(b))for(d=0;d<this.model.getChildCount(b);d++){var f=this.model.getChildAt(b,d);if(this.isCellEditable(f)){b=f;break}}return b};Graph.prototype.copyStyle=function(b){var c=null;if(null!=b){c=mxUtils.clone(this.getCurrentCellStyle(b));b=this.model.getStyle(b);b=null!=b?b.split(";"):[];for(var d=0;d<b.length;d++){var f=b[d],e=f.indexOf("=");if(0<=e){var g=f.substring(0,e),f=f.substring(e+1);null==c[g]&&f==mxConstants.NONE&&
-(c[g]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(b,c,d){d=null!=d?d:Graph.pasteStyles;this.model.beginUpdate();try{for(var f=0;f<c.length;f++)for(var e=this.getCurrentCellStyle(c[f]),g=0;g<d.length;g++){var k=e[d[g]],q=b[d[g]];k==q||null==k&&q==mxConstants.NONE||this.setCellStyles(d[g],q,[c[f]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
+(c[g]=mxConstants.NONE)}}}return c};Graph.prototype.pasteStyle=function(b,c,d){d=null!=d?d:Graph.pasteStyles;this.model.beginUpdate();try{for(var f=0;f<c.length;f++)for(var e=this.getCurrentCellStyle(c[f]),g=0;g<d.length;g++){var k=e[d[g]],n=b[d[g]];k==n||null==k&&n==mxConstants.NONE||this.setCellStyles(d[g],n,[c[f]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||
mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(b,c,d,f,e,g){this.useCssTransforms&&(b=b/this.currentScale-this.currentTranslate.x,c=c/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(b,c,d,f,e,g){f=null!=f?f:!0;e=null!=e?e:!0;null==d&&(d=this.getCurrentRoot(),
-null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var l=this.model.getChildCount(d)-1;0<=l;l--){var k=this.model.getChildAt(d,l),m=this.getScaledCellAt(b,c,k,f,e,g);if(null!=m)return m;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||f&&this.model.isVertex(k))&&(m=this.view.getState(k),null!=m&&(null==g||!g(m,b,c))&&this.intersects(m,b,c)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(b){return!this.isSwimlane(b.cell)&&0<this.model.getChildCount(b.cell)&&!this.isCellCollapsed(b.cell)&&
+null==d&&(d=this.getModel().getRoot()));if(null!=d)for(var l=this.model.getChildCount(d)-1;0<=l;l--){var k=this.model.getChildAt(d,l),q=this.getScaledCellAt(b,c,k,f,e,g);if(null!=q)return q;if(this.isCellVisible(k)&&(e&&this.model.isEdge(k)||f&&this.model.isVertex(k))&&(q=this.view.getState(k),null!=q&&(null==g||!g(q,b,c))&&this.intersects(q,b,c)))return k}return null};Graph.prototype.isRecursiveVertexResize=function(b){return!this.isSwimlane(b.cell)&&0<this.model.getChildCount(b.cell)&&!this.isCellCollapsed(b.cell)&&
"1"==mxUtils.getValue(b.style,"recursiveResize","1")&&null==mxUtils.getValue(b.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(b){for(var c=this.getCellGeometry(b);null!=c&&c.relative;)b=this.getModel().getParent(b),c=this.getCellGeometry(b);return b};Graph.prototype.isPart=function(b){return"1"==mxUtils.getValue(this.getCurrentCellStyle(b),"part","0")||this.isTableCell(b)||this.isTableRow(b)};Graph.prototype.getCompositeParent=function(b){for(;this.isPart(b);){var c=this.model.getParent(b);
if(!this.model.isVertex(c))break;b=c}return b};Graph.prototype.filterSelectionCells=function(b){var c=this.getSelectionCells();if(null!=b){for(var d=[],f=0;f<c.length;f++)b(c[f])||d.push(c[f]);c=d}return c};mxCellHighlight.prototype.getStrokeWidth=function(b){b=this.strokeWidth;this.graph.useCssTransforms&&(b/=this.graph.currentScale);return b};mxGraphView.prototype.getGraphBounds=function(){var b=this.graphBounds;if(this.graph.useCssTransforms)var c=this.graph.currentTranslate,d=this.graph.currentScale,
b=new mxRectangle((b.x+c.x)*d,(b.y+c.y)*d,b.width*d,b.height*d);return b};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var b=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=
@@ -2373,20 +2373,20 @@ function(b){b=e.apply(this,arguments);for(var c=[],d=0;d<b.length;d++)this.isTab
100+","+Math.round(100*this.currentTranslate.y)/100+")");c!=b.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",b.getAttribute("transform"))}else b.removeAttribute("transformOrigin"),b.removeAttribute("transform")};var k=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var b=this.graph.useCssTransforms,c=this.scale,d=this.translate;b&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);
k.apply(this,arguments);b&&(this.scale=c,this.translate=d)};var g=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(b,c,d){var f=this.useCssTransforms,e=this.view.scale,k=this.view.translate;f&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);g.apply(this,arguments);f&&(this.view.scale=e,this.view.translate=k,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(b,c,e){c=c.getAttribute("href");if(null!=c&&!this.isCustomLink(c)&&(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(c)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(c),b);mxEvent.consume(e)}};
-Graph.prototype.openLink=function(b,c,e){var k=window;try{if("_self"==c&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var g=b.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else k=window.open(b,null!=c?c:"_blank"),null==k||e||(k.opener=null)}catch(n){}return k};
+Graph.prototype.openLink=function(b,c,e){var k=window;try{if("_self"==c&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var g=b.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else k=window.open(b,null!=c?c:"_blank"),null==k||e||(k.opener=null)}catch(p){}return k};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b,c){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,c){var e=this.graph.model.getParent(b);if(c!=mxEvent.BEGIN_UPDATE||this.hasLayout(e,c)){e=this.graph.getCellStyle(b);if("stackLayout"==e.childLayout){var k=new mxStackLayout(this.graph,!0);k.resizeParentMax="1"==mxUtils.getValue(e,"resizeParentMax","1");k.horizontal="1"==mxUtils.getValue(e,
"horizontalStack","1");k.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1");k.resizeLast="1"==mxUtils.getValue(e,"resizeLast","0");k.spacing=e.stackSpacing||k.spacing;k.border=e.stackBorder||k.border;k.marginLeft=e.marginLeft||0;k.marginRight=e.marginRight||0;k.marginTop=e.marginTop||0;k.marginBottom=e.marginBottom||0;k.allowGaps=e.allowGaps||0;k.fill=!0;k.allowGaps&&(k.gridSize=parseFloat(mxUtils.getValue(e,"stackUnitSize",20)));return k}if("treeLayout"==e.childLayout)return k=new mxCompactTreeLayout(this.graph),
k.horizontal="1"==mxUtils.getValue(e,"horizontalTree","1"),k.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1"),k.groupPadding=mxUtils.getValue(e,"parentPadding",20),k.levelDistance=mxUtils.getValue(e,"treeLevelDistance",30),k.maintainParentLocation=!0,k.edgeRouting=!1,k.resetEdges=!1,k;if("flowLayout"==e.childLayout)return k=new mxHierarchicalLayout(this.graph,mxUtils.getValue(e,"flowOrientation",mxConstants.DIRECTION_EAST)),k.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1"),k.parentBorder=
mxUtils.getValue(e,"parentPadding",20),k.maintainParentLocation=!0,k.intraCellSpacing=mxUtils.getValue(e,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),k.interRankCellSpacing=mxUtils.getValue(e,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),k.interHierarchySpacing=mxUtils.getValue(e,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),k.parallelEdgeSpacing=mxUtils.getValue(e,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),
-k;if("circleLayout"==e.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==e.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==e.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=null!=b[e].value?b[e].value.attributes:null,g={};g.id=b[e].id;if(null!=k)for(var n=0;n<k.length;n++)g[k[n].nodeName]=k[n].nodeValue;else g.label=this.convertValueToString(b[e]);c.push(g)}return c};
-Graph.prototype.getNodesForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=this.view.getState(b[e]);if(null!=k){for(var g=this.cellRenderer.getShapesForState(k),n=0;n<g.length;n++)null!=g[n]&&null!=g[n].node&&c.push(g[n].node);null!=k.control&&null!=k.control.node&&c.push(k.control.node)}}return c};
+k;if("circleLayout"==e.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==e.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==e.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getDataForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=null!=b[e].value?b[e].value.attributes:null,g={};g.id=b[e].id;if(null!=k)for(var p=0;p<k.length;p++)g[k[p].nodeName]=k[p].nodeValue;else g.label=this.convertValueToString(b[e]);c.push(g)}return c};
+Graph.prototype.getNodesForCells=function(b){for(var c=[],e=0;e<b.length;e++){var k=this.view.getState(b[e]);if(null!=k){for(var g=this.cellRenderer.getShapesForState(k),p=0;p<g.length;p++)null!=g[p]&&null!=g[p].node&&c.push(g[p].node);null!=k.control&&null!=k.control.node&&c.push(k.control.node)}}return c};
Graph.prototype.createWipeAnimations=function(b,c){for(var e=[],k=0;k<b.length;k++){var g=this.view.getState(b[k]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?e.push(this.createEdgeWipeAnimation(g,c)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&e.push(this.createVertexWipeAnimation(g,c)))}return e};
-Graph.prototype.createEdgeWipeAnimation=function(b,c){var e=b.absolutePoints.slice(),k=b.segments,g=b.length,n=e.length;return{execute:mxUtils.bind(this,function(t,d){if(null!=b.shape){var f=[e[0]],l=t/d;c||(l=1-l);for(var m=g*l,p=1;p<n;p++)if(m<=k[p-1]){f.push(new mxPoint(e[p-1].x+(e[p].x-e[p-1].x)*m/k[p-1],e[p-1].y+(e[p].y-e[p-1].y)*m/k[p-1]));break}else m-=k[p-1],f.push(e[p]);b.shape.points=f;b.shape.redraw();0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+Graph.prototype.createEdgeWipeAnimation=function(b,c){var e=b.absolutePoints.slice(),k=b.segments,g=b.length,p=e.length;return{execute:mxUtils.bind(this,function(t,d){if(null!=b.shape){var f=[e[0]],l=t/d;c||(l=1-l);for(var q=g*l,m=1;m<p;m++)if(q<=k[m-1]){f.push(new mxPoint(e[m-1].x+(e[m].x-e[m-1].x)*q/k[m-1],e[m-1].y+(e[m].y-e[m-1].y)*q/k[m-1]));break}else q-=k[m-1],f.push(e[m]);b.shape.points=f;b.shape.redraw();0==t&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=l)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=e,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(b,c){var e=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(k,g){if(null!=b.shape){var n=k/g;c||(n=1-n);b.shape.bounds=new mxRectangle(e.x,e.y,e.width*n,e.height);b.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=n)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=e,b.shape.redraw(),null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};Graph.prototype.executeAnimations=function(b,c,e,k){e=null!=e?e:30;k=null!=k?k:30;var g=null,n=0,t=mxUtils.bind(this,function(){if(n==e||this.stoppingCustomActions){window.clearInterval(g);for(var d=0;d<b.length;d++)b[d].stop();null!=c&&c()}else for(d=0;d<b.length;d++)b[d].execute(n,e);n++}),g=window.setInterval(t,k);t()};
+Graph.prototype.createVertexWipeAnimation=function(b,c){var e=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(k,g){if(null!=b.shape){var p=k/g;c||(p=1-p);b.shape.bounds=new mxRectangle(e.x,e.y,e.width*p,e.height);b.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=p)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=e,b.shape.redraw(),null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),c?1:0))})}};Graph.prototype.executeAnimations=function(b,c,e,k){e=null!=e?e:30;k=null!=k?k:30;var g=null,p=0,t=mxUtils.bind(this,function(){if(p==e||this.stoppingCustomActions){window.clearInterval(g);for(var d=0;d<b.length;d++)b[d].stop();null!=c&&c()}else for(d=0;d<b.length;d++)b[d].execute(p,e);p++}),g=window.setInterval(t,k);t()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),c=this.getGraphBounds();if(0==c.width||0==c.height)return new mxRectangle(0,0,1,1);var e=Math.floor(Math.ceil(c.x/this.view.scale-this.view.translate.x)/b.width),k=Math.floor(Math.ceil(c.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(e,k,Math.ceil((Math.floor((c.x+c.width)/this.view.scale)-this.view.translate.x)/b.width)-e,Math.ceil((Math.floor((c.y+c.height)/this.view.scale)-this.view.translate.y)/b.height)-
k)};Graph.prototype.sanitizeHtml=function(b,c){return Graph.sanitizeHtml(b,c)};Graph.prototype.updatePlaceholders=function(){var b=!1,c;for(c in this.model.cells){var e=this.model.cells[c];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
@@ -2396,38 +2396,38 @@ Graph.prototype.getLabel=function(b){var c=mxGraph.prototype.getLabel.apply(this
Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var c=this.getLinkForCell(b);if(null!=c)return c;b=this.model.getParent(b)}while(null!=b);return null};
Graph.prototype.getGlobalVariable=function(b){var c=null;"date"==b?c=(new Date).toLocaleDateString():"time"==b?c=(new Date).toLocaleTimeString():"timestamp"==b?c=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),c=this.formatDate(new Date,b));return c};
Graph.prototype.formatDate=function(b,c,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var k=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,t=function(b,d){b=String(b);for(d=d||2;b.length<d;)b="0"+b;return b};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(c=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");c=String(k.masks[c]||c||k.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),e=!0);var d=e?"getUTC":"get",f=b[d+"Date"](),l=b[d+"Day"](),m=b[d+"Month"](),p=b[d+"FullYear"](),q=b[d+"Hours"](),v=b[d+"Minutes"](),u=b[d+"Seconds"](),d=b[d+"Milliseconds"](),y=e?0:b.getTimezoneOffset(),x={d:f,dd:t(f),ddd:k.i18n.dayNames[l],dddd:k.i18n.dayNames[l+7],m:m+1,mm:t(m+1),mmm:k.i18n.monthNames[m],mmmm:k.i18n.monthNames[m+
-12],yy:String(p).slice(2),yyyy:p,h:q%12||12,hh:t(q%12||12),H:q,HH:t(q),M:v,MM:t(v),s:u,ss:t(u),l:t(d,3),L:t(99<d?Math.round(d/10):d),t:12>q?"a":"p",tt:12>q?"am":"pm",T:12>q?"A":"P",TT:12>q?"AM":"PM",Z:e?"UTC":(String(b).match(g)||[""]).pop().replace(n,""),o:(0<y?"-":"+")+t(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in x?x[b]:b.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 k=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,t=function(b,d){b=String(b);for(d=d||2;b.length<d;)b="0"+b;return b};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(c=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");c=String(k.masks[c]||c||k.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),e=!0);var d=e?"getUTC":"get",f=b[d+"Date"](),l=b[d+"Day"](),q=b[d+"Month"](),m=b[d+"FullYear"](),n=b[d+"Hours"](),u=b[d+"Minutes"](),v=b[d+"Seconds"](),d=b[d+"Milliseconds"](),y=e?0:b.getTimezoneOffset(),x={d:f,dd:t(f),ddd:k.i18n.dayNames[l],dddd:k.i18n.dayNames[l+7],m:q+1,mm:t(q+1),mmm:k.i18n.monthNames[q],mmmm:k.i18n.monthNames[q+
+12],yy:String(m).slice(2),yyyy:m,h:n%12||12,hh:t(n%12||12),H:n,HH:t(n),M:u,MM:t(u),s:v,ss:t(v),l:t(d,3),L:t(99<d?Math.round(d/10):d),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(b).match(g)||[""]).pop().replace(p,""),o:(0<y?"-":"+")+t(100*Math.floor(Math.abs(y)/60)+Math.abs(y)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(b){return b in x?x[b]:b.slice(1,
b.length-1)})};Graph.prototype.getLayerForCells=function(b){var c=null;if(0<b.length){for(c=b[0];!this.model.isLayer(c);)c=this.model.getParent(c);for(var e=1;e<b.length;e++)if(!this.model.isAncestor(c,b[e])){c=null;break}}return c};
-Graph.prototype.createLayersDialog=function(b,c){var e=document.createElement("div");e.style.position="absolute";for(var k=this.getModel(),g=k.getChildCount(k.root),n=0;n<g;n++)mxUtils.bind(this,function(g){function d(){k.isVisible(g)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(l,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(l,25))}var f=this.convertValueToString(g)||mxResources.get("background")||"Background",l=document.createElement("div");l.style.overflow=
-"hidden";l.style.textOverflow="ellipsis";l.style.padding="2px";l.style.whiteSpace="nowrap";l.style.cursor="pointer";l.setAttribute("title",mxResources.get(k.isVisible(g)?"hideIt":"show",[f]));var m=document.createElement("img");m.setAttribute("draggable","false");m.setAttribute("align","absmiddle");m.setAttribute("border","0");m.style.position="relative";m.style.width="16px";m.style.padding="0px 6px 0 4px";c&&(m.style.filter="invert(100%)",m.style.top="-2px");l.appendChild(m);mxUtils.write(l,f);e.appendChild(l);
-mxEvent.addListener(l,"click",function(){k.setVisible(g,!k.isVisible(g));d();null!=b&&b(g)});d()})(k.getChildAt(k.root,n));return e};
-Graph.prototype.replacePlaceholders=function(b,c,e,k){k=[];if(null!=c){for(var g=0;match=this.placeholderPattern.exec(c);){var n=match[0];if(2<n.length&&"%label%"!=n&&"%tooltip%"!=n){var t=null;if(match.index>g&&"%"==c.charAt(match.index-1))t=n.substring(1);else{var d=n.substring(1,n.length-1);if("id"==d)t=b.id;else if(0>d.indexOf("{"))for(var f=b;null==t&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(t=f.getAttribute(d+"_"+Graph.diagramLanguage)),
-null==t&&(t=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==t&&(t=this.getGlobalVariable(d));null==t&&null!=e&&(t=e[d])}k.push(c.substring(g,match.index)+(null!=t?t:n));g=match.index+n.length}}k.push(c.substring(g))}return k.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var c=[],e=0;e<b.length;e++){var k=this.model.getCell(b[e].id);null!=k&&c.push(k)}this.setSelectionCells(c)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(b,c){var e=document.createElement("div");e.style.position="absolute";for(var k=this.getModel(),g=k.getChildCount(k.root),p=0;p<g;p++)mxUtils.bind(this,function(g){function d(){k.isVisible(g)?(q.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(l,75)):(q.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(l,25))}var f=this.convertValueToString(g)||mxResources.get("background")||"Background",l=document.createElement("div");l.style.overflow=
+"hidden";l.style.textOverflow="ellipsis";l.style.padding="2px";l.style.whiteSpace="nowrap";l.style.cursor="pointer";l.setAttribute("title",mxResources.get(k.isVisible(g)?"hideIt":"show",[f]));var q=document.createElement("img");q.setAttribute("draggable","false");q.setAttribute("align","absmiddle");q.setAttribute("border","0");q.style.position="relative";q.style.width="16px";q.style.padding="0px 6px 0 4px";c&&(q.style.filter="invert(100%)",q.style.top="-2px");l.appendChild(q);mxUtils.write(l,f);e.appendChild(l);
+mxEvent.addListener(l,"click",function(){k.setVisible(g,!k.isVisible(g));d();null!=b&&b(g)});d()})(k.getChildAt(k.root,p));return e};
+Graph.prototype.replacePlaceholders=function(b,c,e,k){k=[];if(null!=c){for(var g=0;match=this.placeholderPattern.exec(c);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var t=null;if(match.index>g&&"%"==c.charAt(match.index-1))t=p.substring(1);else{var d=p.substring(1,p.length-1);if("id"==d)t=b.id;else if(0>d.indexOf("{"))for(var f=b;null==t&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(t=f.getAttribute(d+"_"+Graph.diagramLanguage)),
+null==t&&(t=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==t&&(t=this.getGlobalVariable(d));null==t&&null!=e&&(t=e[d])}k.push(c.substring(g,match.index)+(null!=t?t:p));g=match.index+p.length}}k.push(c.substring(g))}return k.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var c=[],e=0;e<b.length;e++){var k=this.model.getCell(b[e].id);null!=k&&c.push(k)}this.setSelectionCells(c)}else this.clearSelection()};
Graph.prototype.selectCellsForConnectVertex=function(b,c,e){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=e&&(mxEvent.isTouchEvent(c)?e.update(e.getState(this.view.getState(b[1]))):e.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=c&&c.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,c,e,k,g,n,t,d){n=n?n:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),l=f?b:this.getCompositeParent(b),m=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(m.x+=l.geometry.width/2,m.y-=e):c==
-mxConstants.DIRECTION_SOUTH?(m.x+=l.geometry.width/2,m.y+=l.geometry.height+e):(m.x=c==mxConstants.DIRECTION_WEST?m.x-e:m.x+(l.geometry.width+e),m.y+=l.geometry.height/2);var p=this.view.getState(this.model.getParent(b));e=this.view.scale;var q=this.view.translate,l=q.x*e,q=q.y*e;null!=p&&this.model.isVertex(p.cell)&&(l=p.x,q=p.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);n=n?null:(new mxRectangle(l+m.x*e,q+m.y*e)).grow(40*e);n=null!=n?
-this.getCells(0,0,0,0,null,null,n,null,!0):null;var p=this.view.getState(b),v=null,u=null;if(null!=n){n=n.reverse();for(var y=0;y<n.length;y++)if(!this.isCellLocked(n[y])&&!this.model.isEdge(n[y])&&n[y]!=b)if(!this.model.isAncestor(b,n[y])&&this.isContainer(n[y])&&(null==v||n[y]==this.model.getParent(b)))v=n[y];else if(null==u&&this.isCellConnectable(n[y])&&!this.model.isAncestor(n[y],b)&&!this.isSwimlane(n[y])){var x=this.view.getState(n[y]);null==p||null==x||mxUtils.intersects(p,x)||(u=n[y])}}var D=
-!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;D&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var C=[],G=u,u=v;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==u&&f){this.model.beginUpdate();try{if(null==G&&D){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);G=null!=e?e:this.duplicateCells([g],
-!1)[0];null!=e&&this.addCells([G],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(G);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?m.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?m.y+=l.height/2:m.x=c==mxConstants.DIRECTION_WEST?m.x-l.width/2:m.x+l.width/2),l.x=m.x-l.width/2,l.y=m.y-l.height/2);null!=v?(this.addCells([G],v,null,null,null,!0),u=null):D&&!f&&this.addCells([G],this.getDefaultParent(),null,null,null,!0)}var p=mxEvent.isControlDown(k)&&
-mxEvent.isShiftDown(k)&&D||null==u&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,G,this.createCurrentEdgeStyle());if(null!=p&&this.connectionHandler.insertBeforeSource){var q=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=p.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==p.parent&&(q=e.parent.getIndex(e),this.model.add(e.parent,p,q))}null==u&&null!=G&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(q=b.parent.getIndex(b),this.model.add(b.parent,
-G,q));null!=p&&C.push(p);null==u&&null!=G&&C.push(G);null==G&&null!=p&&p.geometry.setTerminalPoint(m,!1);null!=p&&this.fireEvent(new mxEventObject("cellsInserted","cells",[p]))}finally{this.model.endUpdate()}}if(null!=d)d(C);else return C});if(null==t||null!=G||!D||null==u&&f)return g(G);t(l+m.x*e,q+m.y*e,g)};
+Graph.prototype.connectVertex=function(b,c,e,k,g,p,t,d){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),l=f?b:this.getCompositeParent(b),q=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(l.geometry.x,l.geometry.y);c==mxConstants.DIRECTION_NORTH?(q.x+=l.geometry.width/2,q.y-=e):c==
+mxConstants.DIRECTION_SOUTH?(q.x+=l.geometry.width/2,q.y+=l.geometry.height+e):(q.x=c==mxConstants.DIRECTION_WEST?q.x-e:q.x+(l.geometry.width+e),q.y+=l.geometry.height/2);var m=this.view.getState(this.model.getParent(b));e=this.view.scale;var n=this.view.translate,l=n.x*e,n=n.y*e;null!=m&&this.model.isVertex(m.cell)&&(l=m.x,n=m.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(q.x+=b.parent.geometry.x,q.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(l+q.x*e,n+q.y*e)).grow(40*e);p=null!=p?
+this.getCells(0,0,0,0,null,null,p,null,!0):null;var m=this.view.getState(b),u=null,v=null;if(null!=p){p=p.reverse();for(var y=0;y<p.length;y++)if(!this.isCellLocked(p[y])&&!this.model.isEdge(p[y])&&p[y]!=b)if(!this.model.isAncestor(b,p[y])&&this.isContainer(p[y])&&(null==u||p[y]==this.model.getParent(b)))u=p[y];else if(null==v&&this.isCellConnectable(p[y])&&!this.model.isAncestor(p[y],b)&&!this.isSwimlane(p[y])){var x=this.view.getState(p[y]);null==m||null==x||mxUtils.intersects(m,x)||(v=p[y])}}var D=
+!mxEvent.isShiftDown(k)||mxEvent.isControlDown(k)||g;D&&("1"!=urlParams.sketch||g)&&(c==mxConstants.DIRECTION_NORTH?q.y-=b.geometry.height/2:c==mxConstants.DIRECTION_SOUTH?q.y+=b.geometry.height/2:q.x=c==mxConstants.DIRECTION_WEST?q.x-b.geometry.width/2:q.x+b.geometry.width/2);var C=[],G=v,v=u;g=mxUtils.bind(this,function(e){if(null==t||null!=e||null==v&&f){this.model.beginUpdate();try{if(null==G&&D){var g=this.getAbsoluteParent(null!=e?e:b),g=f?b:this.getCompositeParent(g);G=null!=e?e:this.duplicateCells([g],
+!1)[0];null!=e&&this.addCells([G],this.model.getParent(b),null,null,null,!0);var l=this.getCellGeometry(G);null!=l&&(null!=e&&"1"==urlParams.sketch&&(c==mxConstants.DIRECTION_NORTH?q.y-=l.height/2:c==mxConstants.DIRECTION_SOUTH?q.y+=l.height/2:q.x=c==mxConstants.DIRECTION_WEST?q.x-l.width/2:q.x+l.width/2),l.x=q.x-l.width/2,l.y=q.y-l.height/2);null!=u?(this.addCells([G],u,null,null,null,!0),v=null):D&&!f&&this.addCells([G],this.getDefaultParent(),null,null,null,!0)}var m=mxEvent.isControlDown(k)&&
+mxEvent.isShiftDown(k)&&D||null==v&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,G,this.createCurrentEdgeStyle());if(null!=m&&this.connectionHandler.insertBeforeSource){var n=null;for(e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=m.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==m.parent&&(n=e.parent.getIndex(e),this.model.add(e.parent,m,n))}null==v&&null!=G&&null!=b.parent&&f&&c==mxConstants.DIRECTION_WEST&&(n=b.parent.getIndex(b),this.model.add(b.parent,
+G,n));null!=m&&C.push(m);null==v&&null!=G&&C.push(G);null==G&&null!=m&&m.geometry.setTerminalPoint(q,!1);null!=m&&this.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{this.model.endUpdate()}}if(null!=d)d(C);else return C});if(null==t||null!=G||!D||null==v&&f)return g(G);t(l+q.x*e,n+q.y*e,g)};
Graph.prototype.getIndexableText=function(){var b=document.createElement("div"),c=[],e,k;for(k in this.model.cells)if(e=this.model.cells[k],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(b.innerHTML=this.sanitizeHtml(this.getLabel(e)),e=mxUtils.extractTextWithWhitespace([b])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&c.push(e);return c.join(" ")};
Graph.prototype.convertValueToString=function(b){var c=this.model.getValue(b);if(null!=c&&"object"==typeof c){var e=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),k=b;null==e&&null!=k;)null!=k.value&&"object"==typeof k.value&&(e=k.hasAttribute(c)?null!=k.getAttribute(c)?k.getAttribute(c):"":null),k=this.model.getParent(k);else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=c.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=c.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.getCellStyle=function(b){var c=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=b&&null!=this.layoutManager){var e=this.model.getParent(b);this.model.isVertex(e)&&this.isCellCollapsed(b)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(c[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return c};
Graph.prototype.updateAlternateBounds=function(b,c,e){if(null!=b&&null!=c&&null!=this.layoutManager&&null!=c.alternateBounds){var k=this.layoutManager.getLayout(this.model.getParent(b));null!=k&&k.constructor==mxStackLayout&&(k.horizontal?c.alternateBounds.height=0:c.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,c){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(c.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,c,e,k,g){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<e.length;n++){var t=this.view.getState(e[n]),d=this.getCellGeometry(e[n]);if(null!=t&&null!=d){var f=Math.round(d.width-t.width/this.view.scale),l=Math.round(d.height-t.height/this.view.scale);if(0!=l||0!=f){var m=this.model.getParent(e[n]),p=this.layoutManager.getLayout(m);
-null==p?null!=g&&this.isMoveCellsEvent(g,t)&&this.moveSiblings(t,m,f,l):null!=g&&mxEvent.isAltDown(g)||p.constructor!=mxStackLayout||p.resizeLast||this.resizeParentStacks(m,p,f,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
-Graph.prototype.moveSiblings=function(b,c,e,k){this.model.beginUpdate();try{var g=this.getCellsBeyond(b.x,b.y,c,!0,!0);for(c=0;c<g.length;c++)if(g[c]!=b.cell){var n=this.view.getState(g[c]),t=this.getCellGeometry(g[c]);null!=n&&null!=t&&(t=t.clone(),t.translate(Math.round(e*Math.max(0,Math.min(1,(n.x-b.x)/b.width))),Math.round(k*Math.max(0,Math.min(1,(n.y-b.y)/b.height)))),this.model.setGeometry(g[c],t))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,c,e,k){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var g=c.horizontal;null!=b&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==g&&!c.resizeLast;){var n=this.getCellGeometry(b),t=this.view.getState(b);null!=t&&null!=n&&(n=n.clone(),c.horizontal?n.width+=e+Math.min(0,t.width/this.view.scale-n.width):n.height+=k+Math.min(0,t.height/this.view.scale-n.height),this.model.setGeometry(b,
-n));b=this.model.getParent(b);c=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var c=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.foldCells=function(b,c,e,k,g){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),b));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<e.length;p++){var t=this.view.getState(e[p]),d=this.getCellGeometry(e[p]);if(null!=t&&null!=d){var f=Math.round(d.width-t.width/this.view.scale),l=Math.round(d.height-t.height/this.view.scale);if(0!=l||0!=f){var q=this.model.getParent(e[p]),m=this.layoutManager.getLayout(q);
+null==m?null!=g&&this.isMoveCellsEvent(g,t)&&this.moveSiblings(t,q,f,l):null!=g&&mxEvent.isAltDown(g)||m.constructor!=mxStackLayout||m.resizeLast||this.resizeParentStacks(q,m,f,l)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(b,c,e,k){this.model.beginUpdate();try{var g=this.getCellsBeyond(b.x,b.y,c,!0,!0);for(c=0;c<g.length;c++)if(g[c]!=b.cell){var p=this.view.getState(g[c]),t=this.getCellGeometry(g[c]);null!=p&&null!=t&&(t=t.clone(),t.translate(Math.round(e*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(k*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(g[c],t))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,c,e,k){if(null!=this.layoutManager&&null!=c&&c.constructor==mxStackLayout&&!c.resizeLast){this.model.beginUpdate();try{for(var g=c.horizontal;null!=b&&null!=c&&c.constructor==mxStackLayout&&c.horizontal==g&&!c.resizeLast;){var p=this.getCellGeometry(b),t=this.view.getState(b);null!=t&&null!=p&&(p=p.clone(),c.horizontal?p.width+=e+Math.min(0,t.width/this.view.scale-p.width):p.height+=k+Math.min(0,t.height/this.view.scale-p.height),this.model.setGeometry(b,
+p));b=this.model.getParent(b);c=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var c=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=c.container:"1"==c.container};Graph.prototype.isCellConnectable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.connectable?"0"!=c.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(b){var c=this.getCurrentCellStyle(b);return null!=c.movableLabel?"0"!=c.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,c,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};
Graph.prototype.getSwimlaneAt=function(b,c,e){var k=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(k)&&(k=null);return k};Graph.prototype.isCellFoldable=function(b){var c=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&("1"==c.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=c.collapsible||!this.isContainer(b)&&"1"==c.collapsible))};
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,c){b=Math.max(.01,Math.min(this.view.scale*b,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(b,c){c=null!=c?c:10;var e=this.container.clientWidth-c,k=this.container.clientHeight-c,g=Math.floor(20*Math.min(e/b.width,k/b.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var n=this.view.translate;this.container.scrollTop=(b.y+n.y)*g-Math.max((k-b.height*g)/2+c/2,0);this.container.scrollLeft=(b.x+n.x)*g-Math.max((e-b.width*g)/2+c/2,0)}};
+Graph.prototype.fitWindow=function(b,c){c=null!=c?c:10;var e=this.container.clientWidth-c,k=this.container.clientHeight-c,g=Math.floor(20*Math.min(e/b.width,k/b.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*g-Math.max((k-b.height*g)/2+c/2,0);this.container.scrollLeft=(b.x+p.x)*g-Math.max((e-b.width*g)/2+c/2,0)}};
Graph.prototype.getTooltipForCell=function(b){var c="";if(mxUtils.isNode(b.value)){var e=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==e&&(e=b.value.getAttribute("tooltip"));if(null!=e)null!=e&&this.isReplacePlaceholders(b)&&(e=this.replacePlaceholders(b,e)),c=this.sanitizeHtml(e);else{e=this.builtInProperties;b=b.value.attributes;var k=[];this.isEnabled()&&(e.push("linkTarget"),e.push("link"));for(var g=0;g<b.length;g++)0>
mxUtils.indexOf(e,b[g].nodeName)&&0<b[g].nodeValue.length&&k.push({name:b[g].nodeName,value:b[g].nodeValue});k.sort(function(b,c){return b.name<c.name?-1:b.name>c.name?1:0});for(g=0;g<k.length;g++)"link"==k[g].name&&this.isCustomLink(k[g].value)||(c+=("link"!=k[g].name?"<b>"+k[g].name+":</b> ":"")+mxUtils.htmlEntities(k[g].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1),mxClient.IS_SVG&&(c='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+c+"</div>"))}}return c};
Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var c=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(c);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
@@ -2442,7 +2442,7 @@ HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangle
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(b){null!=b.relatedTarget&&
mxEvent.getSource(b)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(b){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(c){b.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(b,
-k){c=!1;var e=k.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var n=this.getState(k.getState());null==n&&mxEvent.isTouchEvent(e)||this.update(n)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(b,k){var e=k.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(k.getState()),k.getGraphX(),k.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,
+k){c=!1;var e=k.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var p=this.getState(k.getState());null==p&&mxEvent.isTouchEvent(e)||this.update(p)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(b,k){var e=k.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(k.getState()),k.getGraphX(),k.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(c=!0)}),mouseUp:mxUtils.bind(this,
function(b,k){var e=k.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));this.isResetEvent(e)?this.reset():this.isActive()&&!c&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),k):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(k.getGraphX(),k.getGraphY())))):mxEvent.isTouchEvent(e)||
null!=this.bbox&&mxUtils.contains(this.bbox,k.getGraphX(),k.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||this.reset();c=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,c){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
HoverIcons.prototype.createArrow=function(b,c,e){var k=null,k=mxUtils.createImage(b.src);k.style.width=b.width+"px";k.style.height=b.height+"px";k.style.padding=this.tolerance+"px";null!=c&&k.setAttribute("title",c);k.style.position="absolute";k.style.cursor=this.cssCursor;mxEvent.addGestureListeners(k,mxUtils.bind(this,function(b){null==this.currentState||this.isResetEvent(b)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),this.drag(b,
@@ -2452,98 +2452,99 @@ HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;th
HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(c){c.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(b,c,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,c,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,c=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=c&&c.setHandlesVisible(!1),c=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=c&&"orthogonalEdgeStyle"===
mxUtils.getValue(c.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),c.cell.style=mxUtils.setStyle(c.cell.style,"sourcePortConstraint",b),c.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,c,e){return this.graph.view.getState(this.graph.getCellAt(c,e))};
-HoverIcons.prototype.click=function(b,c,e){var k=e.getEvent(),g=e.getGraphX(),n=e.getGraphY(),g=this.getStateAt(b,g,n);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(k)||g.getVisibleTerminalState(!0)!=b&&g.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,c,e):(this.graph.setSelectionCell(g.cell),this.reset());e.consume()};
+HoverIcons.prototype.click=function(b,c,e){var k=e.getEvent(),g=e.getGraphX(),p=e.getGraphY(),g=this.getStateAt(b,g,p);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(k)||g.getVisibleTerminalState(!0)!=b&&g.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,c,e):(this.graph.setSelectionCell(g.cell),this.reset());e.consume()};
HoverIcons.prototype.execute=function(b,c,e){e=e.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,c,this.graph.defaultEdgeLength,e,this.graph.isCloneEvent(e),this.graph.isCloneEvent(e)),e,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
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 b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.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 e=null;null!=c&&(b.x-=c.horizontalOffset/2,b.y-=c.verticalOffset/2,b.width+=c.horizontalOffset,b.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&&
(e=c.rotationShape.boundingBox));c=mxUtils.bind(this,function(b,f,c){if(null!=e){var d=new mxRectangle(f,c,b.clientWidth,b.clientHeight);mxUtils.intersects(d,e)&&(b==this.arrowUp?c-=d.y+d.height-e.y:b==this.arrowRight?f+=e.x+e.width-d.x:b==this.arrowDown?c+=e.y+e.height-d.y:b==this.arrowLeft&&(f-=d.x+d.width-e.x))}b.style.left=f+"px";b.style.top=c+"px";mxUtils.setOpacity(b,this.inactiveOpacity)});c(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));c(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));c(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));c(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var c=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY()),
-k=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2),b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=c&&c==k&&k==g&&g==b&&(b=g=k=c=null);var n=this.graph.getCellGeometry(this.currentState.cell),t=mxUtils.bind(this,function(b,f){var d=this.graph.model.isVertex(b)&&this.graph.getCellGeometry(b);null==b||this.graph.model.isAncestor(b,
-this.currentState.cell)||this.graph.isSwimlane(b)||!(null==d||null==n||d.height<3*n.height&&d.width<3*n.width)?f.style.visibility="visible":f.style.visibility="hidden"});t(c,this.arrowRight);t(k,this.arrowLeft);t(g,this.arrowUp);t(b,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")),
+k=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2),b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=c&&c==k&&k==g&&g==b&&(b=g=k=c=null);var p=this.graph.getCellGeometry(this.currentState.cell),t=mxUtils.bind(this,function(b,f){var d=this.graph.model.isVertex(b)&&this.graph.getCellGeometry(b);null==b||this.graph.model.isAncestor(b,
+this.currentState.cell)||this.graph.isSwimlane(b)||!(null==d||null==p||d.height<3*p.height&&d.width<3*p.width)?f.style.visibility="visible":f.style.visibility="hidden"});t(c,this.arrowRight);t(k,this.arrowLeft);t(g,this.arrowUp);t(b,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 b=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==b?b=c:b.add(c))});return b};
HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var c=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(c)&&this.graph.isCellConnectable(c)&&(b=c)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
HoverIcons.prototype.update=function(b,c,e){if(!this.graph.connectionArrowsEnabled||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var k=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,k=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,c,e))}),this.updateDelay+10))):null!=this.startTime&&(k=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&k<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,c,e)?this.reset(!1):(null!=this.currentState||k>this.activationDelay)&&this.currentState!=b&&(k>this.updateDelay&&null!=b||null==this.bbox||null==c||null==e||!mxUtils.contains(this.bbox,
c,e))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.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=b};Graph.prototype.createParent=function(b,c,e,k,g){b=this.cloneCell(b);for(var n=0;n<e;n++){var t=this.cloneCell(c),d=this.getCellGeometry(t);null!=d&&(d.x+=n*k,d.y+=n*g);b.insert(t)}return b};
-Graph.prototype.createTable=function(b,c,e,k,g,n,t,d,f){e=null!=e?e:60;k=null!=k?k:40;n=null!=n?n:30;d=null!=d?d:"shape=partialRectangle;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;";f=null!=f?f:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,null,null!=g?g:"",0,0,c*e,
-b*k+(null!=g?n:0),null!=t?t:"shape=table;startSize="+(null!=g?n:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*e,k,d),this.createVertex(null,null,"",0,0,e,k,f),c,e,0),b,0,k)};Graph.prototype.setTableValues=function(b,c,e){for(var k=this.model.getChildCells(b,!0),g=0;g<k.length;g++)if(null!=e&&(k[g].value=e[g]),null!=c)for(var n=this.model.getChildCells(k[g],!0),t=0;t<n.length;t++)null!=c[g][t]&&(n[t].value=c[g][t]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,c,e,k,g,n,t,d,f){e=null!=e?e:120;k=null!=k?k:120;var l=null==g?0:40;t=null!=t?t:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+l+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";d=null!=d?d:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";f=null!=f?f:"swimlane;connectable=0;startSize="+(null==g?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
-g=this.createVertex(null,null,null!=g?g:"",0,0,c*e,b*k,null!=n?n:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+l+";"+(null==g?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");n=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=n;g.geometry.height+=n;t=this.createVertex(null,null,"",0,n,c*e+n,k,t);g.insert(this.createParent(t,this.createVertex(null,null,"",n,0,e,k,d),c,e,0));
-return 1<b?(t.geometry.y=k+n,this.createParent(g,this.createParent(t,this.createVertex(null,null,"",n,0,e,k,f),c,e,0),b-1,0,k)):g};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};
-Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var g=this.getCellGeometry(b);if(null!=g){g=g.clone();g.height+=c;k.setGeometry(b,g);var n=k.getParent(b),t=k.getChildCells(n,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var f=t[d+1],l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(f,l))}}var m=this.getCellGeometry(n);null!=m&&(e||(e=b==t[t.length-1]),e&&(m=m.clone(),m.height+=c,k.setGeometry(n,m)));
-null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}}finally{k.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),n=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(n,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),m=t[b],p=this.getCellGeometry(m);null!=p&&(p=p.clone(),p.width+=c,null!=p.alternateBounds&&(p.alternateBounds.width+=c),k.setGeometry(m,p));b<t.length-1&&(m=t[b+1],p=this.getCellGeometry(m),null!=p&&(p=p.clone(),
-p.x+=c,e||(p.width-=c,null!=p.alternateBounds&&(p.alternateBounds.width-=c)),k.setGeometry(m,p)))}if(d||e){var q=this.getCellGeometry(n);null!=q&&(q=q.clone(),q.width+=c,k.setGeometry(n,q))}null!=this.layoutManager&&this.layoutManager.executeLayout(n,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.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=b};Graph.prototype.createParent=function(b,c,e,k,g){b=this.cloneCell(b);for(var p=0;p<e;p++){var t=this.cloneCell(c),d=this.getCellGeometry(t);null!=d&&(d.x+=p*k,d.y+=p*g);b.insert(t)}return b};
+Graph.prototype.createTable=function(b,c,e,k,g,p,t,d,f){e=null!=e?e:60;k=null!=k?k:40;p=null!=p?p:30;d=null!=d?d:"shape=partialRectangle;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;";f=null!=f?f:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,null,null!=g?g:"",0,0,c*e,
+b*k+(null!=g?p:0),null!=t?t:"shape=table;startSize="+(null!=g?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*e,k,d),this.createVertex(null,null,"",0,0,e,k,f),c,e,0),b,0,k)};Graph.prototype.setTableValues=function(b,c,e){for(var k=this.model.getChildCells(b,!0),g=0;g<k.length;g++)if(null!=e&&(k[g].value=e[g]),null!=c)for(var p=this.model.getChildCells(k[g],!0),t=0;t<p.length;t++)null!=c[g][t]&&(p[t].value=c[g][t]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,c,e,k,g,p,t,d,f){e=null!=e?e:120;k=null!=k?k:120;var l=null==g?0:40;t=null!=t?t:"swimlane;horizontal=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize="+l+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";d=null!=d?d:"swimlane;connectable=0;startSize=40;collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";f=null!=f?f:"swimlane;connectable=0;startSize="+(null==g?"40":"0")+";collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;";
+g=this.createVertex(null,null,null!=g?g:"",0,0,c*e,b*k,null!=p?p:"shape=table;childLayout=tableLayout;rowLines=0;columnLines=0;startSize="+l+";"+(null==g?"fillColor=none;":"")+"collapsible=0;recursiveResize=0;expand=0;pointerEvents=0;");p=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=p;g.geometry.height+=p;t=this.createVertex(null,null,"",0,p,c*e+p,k,t);g.insert(this.createParent(t,this.createVertex(null,null,"",p,0,e,k,d),c,e,0));
+return 1<b?(t.geometry.y=k+p,this.createParent(g,this.createParent(t,this.createVertex(null,null,"",p,0,e,k,f),c,e,0),b-1,0,k)):g};Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};
+Graph.prototype.setTableRowHeight=function(b,c,e){e=null!=e?e:!0;var k=this.getModel();k.beginUpdate();try{var g=this.getCellGeometry(b);if(null!=g){g=g.clone();g.height+=c;k.setGeometry(b,g);var p=k.getParent(b),t=k.getChildCells(p,!0);if(!e){var d=mxUtils.indexOf(t,b);if(d<t.length-1){var f=t[d+1],l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.y+=c,l.height-=c,k.setGeometry(f,l))}}var q=this.getCellGeometry(p);null!=q&&(e||(e=b==t[t.length-1]),e&&(q=q.clone(),q.height+=c,k.setGeometry(p,q)));
+null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}}finally{k.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,c,e){e=null!=e?e:!1;var k=this.getModel(),g=k.getParent(b),p=k.getParent(g),t=k.getChildCells(g,!0);b=mxUtils.indexOf(t,b);var d=b==t.length-1;k.beginUpdate();try{for(var f=k.getChildCells(p,!0),l=0;l<f.length;l++){var g=f[l],t=k.getChildCells(g,!0),q=t[b],m=this.getCellGeometry(q);null!=m&&(m=m.clone(),m.width+=c,null!=m.alternateBounds&&(m.alternateBounds.width+=c),k.setGeometry(q,m));b<t.length-1&&(q=t[b+1],m=this.getCellGeometry(q),null!=m&&(m=m.clone(),
+m.x+=c,e||(m.width-=c,null!=m.alternateBounds&&(m.alternateBounds.width-=c)),k.setGeometry(q,m)))}if(d||e){var n=this.getCellGeometry(p);null!=n&&(n=n.clone(),n.width+=c,k.setGeometry(p,n))}null!=this.layoutManager&&this.layoutManager.executeLayout(p,!0)}finally{k.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,c){for(var e=0,k=0;k<b.length;k++)if(!this.isVertexIgnored(b[k])){var g=this.graph.getCellGeometry(b[k]);null!=g&&(e+=c?g.width:g.height)}return e};
-TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),g=this.getSize(e,!0),n=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var f=this.graph.getCellGeometry(e[d]);null!=f&&(k+=(null!=f.alternateBounds?f.alternateBounds.width:f.width)*n/g,t.push(Math.round(k)))}return t};
-TableLayout.prototype.layoutRow=function(b,c,e,k){var g=this.graph.getModel(),n=g.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var t=null,d=b.x,f=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var l=0;l<n.length;l++){var m=this.graph.getCellGeometry(n[l]);null!=m&&(m=m.clone(),m.y=b.y,m.height=e-b.y-b.height,null!=c?(m.x=c[l],m.width=c[l+1]-m.x,l==n.length-1&&l<c.length-2&&(m.width=k-m.x-b.x-b.width)):(m.x=d,d+=m.width,l==n.length-1?m.width=k-b.x-b.width-f:f+=m.width),m.alternateBounds=
-new mxRectangle(0,0,m.width,m.height),g.setGeometry(n[l],m));null!=t&&null!=t.geo&&(1<t.colspan?(t.colspan--,t.geo.width+=m.width,g.setVisible(n[l],!1)):g.setVisible(n[l],!0));if(null==t||1>=t.colspan)t=this.graph.getCurrentCellStyle(n[l],!0),t={colspan:null!=t?parseInt(t.colspan||1):1,style:t,cell:n[l],geo:m}}return f};
-TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),g="1"==mxUtils.getValue(k,"resizeLastRow","0"),n="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var f=e.height-c.y-c.height,l=e.width-c.x-c.width,m=t.getChildCells(b,!0),p=this.getSize(m,!1);if(0<f&&0<l&&0<m.length&&0<p){if(g){var q=this.graph.getCellGeometry(m[m.length-
-1]);null!=q&&(q=q.clone(),q.height=f-p+q.height,t.setGeometry(m[m.length-1],q))}for(var v=n?null:this.getRowLayout(m[0],l),u=c.y,y=0;y<m.length;y++)q=this.graph.getCellGeometry(m[y]),null!=q&&(q=q.clone(),q.x=c.x,q.width=l,q.y=Math.round(u),u=g||k?u+q.height:u+q.height/p*f,q.height=Math.round(u)-q.y,t.setGeometry(m[y],q)),d=Math.max(d,this.layoutRow(m[y],v,q.height,l));k&&f<p&&(e=e.clone(),e.height=u+c.height,t.setGeometry(b,e));n&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+c.x+
-Graph.minTableColumnWidth,t.setGeometry(b,e))}}finally{t.endUpdate()}}};
+TableLayout.prototype.getRowLayout=function(b,c){for(var e=this.graph.model.getChildCells(b,!0),k=this.graph.getActualStartSize(b,!0),g=this.getSize(e,!0),p=c-k.x-k.width,t=[],k=k.x,d=0;d<e.length;d++){var f=this.graph.getCellGeometry(e[d]);null!=f&&(k+=(null!=f.alternateBounds?f.alternateBounds.width:f.width)*p/g,t.push(Math.round(k)))}return t};
+TableLayout.prototype.layoutRow=function(b,c,e,k,g){var p=this.graph.getModel(),t=p.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var d=null,f=b.x,l=0;null!=c&&(c=c.slice(),c.splice(0,0,b.x));for(var q=0;q<t.length;q++){var m=this.graph.getCellGeometry(t[q]);null!=m&&(m=m.clone(),m.y=b.y,m.height=e-b.y-b.height,null!=c?(m.x=c[q],m.width=c[q+1]-m.x,q==t.length-1&&q<c.length-2&&(m.width=k-m.x-b.x-b.width)):(m.x=f,f+=m.width,q==t.length-1?m.width=k-b.x-b.width-l:l+=m.width),m.alternateBounds=
+new mxRectangle(0,0,m.width,m.height),p.setGeometry(t[q],m));var n=!0;null!=d&&null!=d.geo&&null!=d.colspan&&1<d.colspan&&(d.geo.width+=null!=m.alternateBounds?m.alternateBounds.width:m.width,n=!1,d.colspan--);var u=g[q];null!=u&&null!=u.geo&&null!=u.rowspan&&1<u.rowspan&&(u.geo.height+=null!=m.alternateBounds?m.alternateBounds.height:m.height,n=!1,u.rowspan--);p.setVisible(t[q],n);n=this.graph.getCurrentCellStyle(t[q],!0);m={style:n,cell:t[q],geo:m};if(null!=n){if(null==d||1>d.colspan)m.colspan=
+parseInt(n.colspan||0),d=m;if(null==u||1>u.rowspan)m.rowspan=parseInt(n.rowspan||0),g[q]=m}}return l};
+TableLayout.prototype.execute=function(b){if(null!=b){var c=this.graph.getActualStartSize(b,!0),e=this.graph.getCellGeometry(b),k=this.graph.getCellStyle(b),g="1"==mxUtils.getValue(k,"resizeLastRow","0"),p="1"==mxUtils.getValue(k,"resizeLast","0"),k="1"==mxUtils.getValue(k,"fixedRows","0"),t=this.graph.getModel(),d=0;t.beginUpdate();try{var f=e.height-c.y-c.height,l=e.width-c.x-c.width,q=t.getChildCells(b,!0),m=this.getSize(q,!1);if(0<f&&0<l&&0<q.length&&0<m){if(g){var n=this.graph.getCellGeometry(q[q.length-
+1]);null!=n&&(n=n.clone(),n.height=f-m+n.height,t.setGeometry(q[q.length-1],n))}for(var u=p?null:this.getRowLayout(q[0],l),v=[],y=c.y,x=0;x<q.length;x++)n=this.graph.getCellGeometry(q[x]),null!=n&&(n=n.clone(),n.x=c.x,n.width=l,n.y=Math.round(y),y=g||k?y+n.height:y+n.height/m*f,n.height=Math.round(y)-n.y,t.setGeometry(q[x],n)),d=Math.max(d,this.layoutRow(q[x],u,n.height,l,v));k&&f<m&&(e=e.clone(),e.height=y+c.height,t.setGeometry(b,e));p&&l<d+Graph.minTableColumnWidth&&(e=e.clone(),e.width=d+c.width+
+c.x+Graph.minTableColumnWidth,t.setGeometry(b,e))}}finally{t.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(b,d){d=null!=d?d:!0;var f=this.getState(b);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&!f.invalid&&this.updateLineJumps(f)&&this.graph.cellRenderer.redraw(f,!1,this.isRendering());f=c.apply(this,
arguments);null!=f&&d&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(){e.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var b=this.node.getElementsByTagName("path");if(1<b.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&b[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var d=this.state.view.graph.getFlowAnimationStyle();null!=d&&b[1].setAttribute("class",d.getAttribute("id"))}}};var k=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(b,d){return k.apply(this,arguments)||null!=b.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.routedPoints,b.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
function(b){g.apply(this,arguments);this.graph.model.isEdge(b.cell)&&1!=b.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(b)};mxGraphView.prototype.updateLineJumps=function(b){var d=b.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=b.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(b.style,"jumpStyle","none")){for(var e=function(d,f,e){var g=new mxPoint(f,e);g.type=d;c.push(g);g=null!=b.routedPoints?b.routedPoints[c.length-1]:null;return null==g||g.type!=
-d||g.x!=f||g.y!=e},g=.5*this.scale,f=!1,c=[],l=0;l<d.length-1;l++){for(var k=d[l+1],m=d[l],n=[],t=d[l+2];l<d.length-2&&mxUtils.ptSegDistSq(m.x,m.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,l++,t=d[l+2];for(var f=e(0,m.x,m.y)||f,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],K=H.absolutePoints;if(null!=K&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<K.length-1;H++){for(var A=K[H+1],M=K[H],t=K[H+2];H<K.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,A.x,A.y)<1*this.scale*this.scale;)A=
-t,H++,t=K[H+2];t=mxUtils.intersection(m.x,m.y,k.x,k.y,M.x,M.y,A.x,A.y);if(null!=t&&(Math.abs(t.x-m.x)>g||Math.abs(t.y-m.y)>g)&&(Math.abs(t.x-k.x)>g||Math.abs(t.y-k.y)>g)&&(Math.abs(t.x-M.x)>g||Math.abs(t.y-M.y)>g)&&(Math.abs(t.x-A.x)>g||Math.abs(t.y-A.y)>g)){A=t.x-m.x;M=t.y-m.y;t={distSq:A*A+M*M,x:t.x,y:t.y};for(A=0;A<n.length;A++)if(n[A].distSq>t.distSq){n.splice(A,0,t);t=null;break}null==t||0!=n.length&&n[n.length-1].x===t.x&&n[n.length-1].y===t.y||n.push(t)}}}for(H=0;H<n.length;H++)f=e(1,n[H].x,
-n[H].y)||f}t=d[d.length-1];f=e(0,t.x,t.y)||f}b.routedPoints=c;return f}return!1};var n=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(b,d,f){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)n.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
-"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),l=!0,k=null,m=null,p=[],q=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],K=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var A=!1;if(null!=k&&1==H.type){var M=this.state.routedPoints[t+1],H=M.x/this.scale-K.x,M=M.y/this.scale-K.y,H=H*H+M*M;null==q&&(q=new mxPoint(K.x-k.x,K.y-k.y),
-m=Math.sqrt(q.x*q.x+q.y*q.y),0<m?(q.x=q.x*e/m,q.y=q.y*e/m):q=null);H>e*e&&0<m&&(H=k.x-K.x,M=k.y-K.y,H=H*H+M*M,H>e*e&&(A=new mxPoint(K.x-q.x,K.y-q.y),H=new mxPoint(K.x+q.x,K.y+q.y),p.push(A),this.addPoints(b,p,f,c,!1,null,l),p=0>Math.round(q.x)||0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,l=!1,"sharp"==g?(b.lineTo(A.x-q.y*p,A.y+q.x*p),b.lineTo(H.x-q.y*p,H.y+q.x*p),b.lineTo(H.x,H.y)):"line"==g?(b.moveTo(A.x+q.y*p,A.y-q.x*p),b.lineTo(A.x-q.y*p,A.y+q.x*p),b.moveTo(H.x-q.y*p,H.y+q.x*p),b.lineTo(H.x+q.y*
-p,H.y-q.x*p),b.moveTo(H.x,H.y)):"arc"==g?(p*=1.3,b.curveTo(A.x-q.y*p,A.y+q.x*p,H.x-q.y*p,H.y+q.x*p,H.x,H.y)):(b.moveTo(H.x,H.y),l=!0),p=[H],A=!0))}else q=null;A||(p.push(K),k=K)}this.addPoints(b,p,f,c,!1,null,l);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(b,f,c,e){if(null==f||null==b||"1"!=f.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{f=this.getTerminalPort(b,f,e);var g=this.getNextPoint(b,c,e),l=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=k)var p=Math.cos(-k),q=Math.sin(-k),g=mxUtils.getRotatedPoint(g,p,q,m);p=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);p+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(f,g,0==k&&l,p);0!=k&&(p=Math.cos(k),q=Math.sin(k),g=mxUtils.getRotatedPoint(g,p,q,m));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,f,c,e,g),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,f,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=f=null;if(null!=b)for(var g=0;g<b.length;g++){var l=this.graph.getConnectionPoint(d,
+d||g.x!=f||g.y!=e},g=.5*this.scale,f=!1,c=[],l=0;l<d.length-1;l++){for(var k=d[l+1],q=d[l],p=[],t=d[l+2];l<d.length-2&&mxUtils.ptSegDistSq(q.x,q.y,t.x,t.y,k.x,k.y)<1*this.scale*this.scale;)k=t,l++,t=d[l+2];for(var f=e(0,q.x,q.y)||f,L=0;L<this.validEdges.length;L++){var H=this.validEdges[L],K=H.absolutePoints;if(null!=K&&mxUtils.intersects(b,H)&&"1"!=H.style.noJump)for(H=0;H<K.length-1;H++){for(var A=K[H+1],M=K[H],t=K[H+2];H<K.length-2&&mxUtils.ptSegDistSq(M.x,M.y,t.x,t.y,A.x,A.y)<1*this.scale*this.scale;)A=
+t,H++,t=K[H+2];t=mxUtils.intersection(q.x,q.y,k.x,k.y,M.x,M.y,A.x,A.y);if(null!=t&&(Math.abs(t.x-q.x)>g||Math.abs(t.y-q.y)>g)&&(Math.abs(t.x-k.x)>g||Math.abs(t.y-k.y)>g)&&(Math.abs(t.x-M.x)>g||Math.abs(t.y-M.y)>g)&&(Math.abs(t.x-A.x)>g||Math.abs(t.y-A.y)>g)){A=t.x-q.x;M=t.y-q.y;t={distSq:A*A+M*M,x:t.x,y:t.y};for(A=0;A<p.length;A++)if(p[A].distSq>t.distSq){p.splice(A,0,t);t=null;break}null==t||0!=p.length&&p[p.length-1].x===t.x&&p[p.length-1].y===t.y||p.push(t)}}}for(H=0;H<p.length;H++)f=e(1,p[H].x,
+p[H].y)||f}t=d[d.length-1];f=e(0,t.x,t.y)||f}b.routedPoints=c;return f}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(b,d,f){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)p.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,
+"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),l=!0,k=null,q=null,m=[],n=null;b.begin();for(var t=0;t<this.state.routedPoints.length;t++){var H=this.state.routedPoints[t],K=new mxPoint(H.x/this.scale,H.y/this.scale);0==t?K=d[0]:t==this.state.routedPoints.length-1&&(K=d[d.length-1]);var A=!1;if(null!=k&&1==H.type){var M=this.state.routedPoints[t+1],H=M.x/this.scale-K.x,M=M.y/this.scale-K.y,H=H*H+M*M;null==n&&(n=new mxPoint(K.x-k.x,K.y-k.y),
+q=Math.sqrt(n.x*n.x+n.y*n.y),0<q?(n.x=n.x*e/q,n.y=n.y*e/q):n=null);H>e*e&&0<q&&(H=k.x-K.x,M=k.y-K.y,H=H*H+M*M,H>e*e&&(A=new mxPoint(K.x-n.x,K.y-n.y),H=new mxPoint(K.x+n.x,K.y+n.y),m.push(A),this.addPoints(b,m,f,c,!1,null,l),m=0>Math.round(n.x)||0==Math.round(n.x)&&0>=Math.round(n.y)?1:-1,l=!1,"sharp"==g?(b.lineTo(A.x-n.y*m,A.y+n.x*m),b.lineTo(H.x-n.y*m,H.y+n.x*m),b.lineTo(H.x,H.y)):"line"==g?(b.moveTo(A.x+n.y*m,A.y-n.x*m),b.lineTo(A.x-n.y*m,A.y+n.x*m),b.moveTo(H.x-n.y*m,H.y+n.x*m),b.lineTo(H.x+n.y*
+m,H.y-n.x*m),b.moveTo(H.x,H.y)):"arc"==g?(m*=1.3,b.curveTo(A.x-n.y*m,A.y+n.x*m,H.x-n.y*m,H.y+n.x*m,H.x,H.y)):(b.moveTo(H.x,H.y),l=!0),m=[H],A=!0))}else n=null;A||(m.push(K),k=K)}this.addPoints(b,m,f,c,!1,null,l);b.stroke()}};var t=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(b,d,f,c){return null!=d&&"centerPerimeter"==d.style[mxConstants.STYLE_PERIMETER]?new mxPoint(d.getCenterX(),d.getCenterY()):t.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(b,f,c,e){if(null==f||null==b||"1"!=f.style.snapToPoint&&"1"!=b.style.snapToPoint)d.apply(this,arguments);else{f=this.getTerminalPort(b,f,e);var g=this.getNextPoint(b,c,e),l=this.graph.isOrthogonal(b),k=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||"0")),q=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=k)var m=Math.cos(-k),n=Math.sin(-k),g=mxUtils.getRotatedPoint(g,m,n,q);m=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);m+=parseFloat(b.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(f,g,0==k&&l,m);0!=k&&(m=Math.cos(k),n=Math.sin(k),g=mxUtils.getRotatedPoint(g,m,n,q));b.setAbsoluteTerminalPoint(this.snapToAnchorPoint(b,f,c,e,g),e)}};mxGraphView.prototype.snapToAnchorPoint=function(b,d,f,c,e){if(null!=d&&null!=b){b=this.graph.getAllConnectionConstraints(d);c=f=null;if(null!=b)for(var g=0;g<b.length;g++){var l=this.graph.getConnectionPoint(d,
b[g]);if(null!=l){var k=(l.x-e.x)*(l.x-e.x)+(l.y-e.y)*(l.y-e.y);if(null==c||k<c)f=l,c=k}}null!=f&&(e=f)}return e};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(b,d,c){var e=f.apply(this,arguments);"1"==b.getAttribute("placeholders")&&null!=c.state&&(e=c.state.view.graph.replacePlaceholders(c.state.cell,e));return e};var l=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(b){if(null!=b.style&&"undefined"!==typeof pako){var d=
-mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"string"===typeof d&&"stencil("==d.substring(0,8))try{var f=d.substring(8,d.length-1),c=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(c.documentElement))}catch(u){null!=window.console&&console.log("Error in shape: "+u)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"string"===typeof d&&"stencil("==d.substring(0,8))try{var f=d.substring(8,d.length-1),c=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(c.documentElement))}catch(v){null!=window.console&&console.log("Error in shape: "+v)}}return l.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var c=mxStencilRegistry.stencils[b];if(null==c&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(b);if(null!=e){c=mxStencilRegistry.libraries[e];if(null!=c){if(null==mxStencilRegistry.packages[e]){for(var k=0;k<c.length;k++){var g=c[k];if(!mxStencilRegistry.filesLoaded[g])if(mxStencilRegistry.filesLoaded[g]=!0,".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,
-null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var n=mxUtils.load(g);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(t){null!=window.console&&console.log("error in getStencil:",b,e,c,g,t)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);c=mxStencilRegistry.stencils[b]}}return c};
+null);else if(".js"==g.toLowerCase().substring(g.length-3,g.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(g);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(t){null!=window.console&&console.log("error in getStencil:",b,e,c,g,t)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);c=mxStencilRegistry.stencils[b]}}return c};
mxStencilRegistry.getBasenameForStencil=function(b){var c=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0]))for(var c=b[1],e=2;e<b.length-1;e++)c+="/"+b[e];return c};
-mxStencilRegistry.loadStencilSet=function(b,c,e,k){var g=mxStencilRegistry.packages[b];if(null!=e&&e||null==g){var n=!1;if(null==g)try{if(k){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(e){null!=e&&null!=e.documentElement&&(mxStencilRegistry.packages[b]=e,n=!0,mxStencilRegistry.parseStencilSet(e.documentElement,c,n))}));return}g=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=g;n=!0}catch(t){null!=window.console&&console.log("error in loadStencilSet:",b,t)}null!=g&&null!=
-g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,c,n)}};mxStencilRegistry.loadStencil=function(b,c){if(null!=c)mxUtils.get(b,mxUtils.bind(this,function(b){c(200<=b.getStatus()&&299>=b.getStatus()?b.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var c=0;c<b.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[c]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,c,e){if("stencils"==b.nodeName)for(var k=b.firstChild;null!=k;)"shapes"==k.nodeName&&mxStencilRegistry.parseStencilSet(k,c,e),k=k.nextSibling;else{e=null!=e?e:!0;var k=b.firstChild,g="";b=b.getAttribute("name");for(null!=b&&(g=b+".");null!=k;){if(k.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=k.getAttribute("name"),null!=b)){var g=g.toLowerCase(),n=b.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(g+n.toLowerCase(),new mxStencil(k));if(null!=c){var t=k.getAttribute("w"),
-d=k.getAttribute("h"),t=null==t?80:parseInt(t,10),d=null==d?80:parseInt(d,10);c(g,n,b,t,d)}}k=k.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(b,c,e,k){var g=mxStencilRegistry.packages[b];if(null!=e&&e||null==g){var p=!1;if(null==g)try{if(k){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(e){null!=e&&null!=e.documentElement&&(mxStencilRegistry.packages[b]=e,p=!0,mxStencilRegistry.parseStencilSet(e.documentElement,c,p))}));return}g=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=g;p=!0}catch(t){null!=window.console&&console.log("error in loadStencilSet:",b,t)}null!=g&&null!=
+g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,c,p)}};mxStencilRegistry.loadStencil=function(b,c){if(null!=c)mxUtils.get(b,mxUtils.bind(this,function(b){c(200<=b.getStatus()&&299>=b.getStatus()?b.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var c=0;c<b.length;c++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[c]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(b,c,e){if("stencils"==b.nodeName)for(var k=b.firstChild;null!=k;)"shapes"==k.nodeName&&mxStencilRegistry.parseStencilSet(k,c,e),k=k.nextSibling;else{e=null!=e?e:!0;var k=b.firstChild,g="";b=b.getAttribute("name");for(null!=b&&(g=b+".");null!=k;){if(k.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=k.getAttribute("name"),null!=b)){var g=g.toLowerCase(),p=b.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(g+p.toLowerCase(),new mxStencil(k));if(null!=c){var t=k.getAttribute("w"),
+d=k.getAttribute("h"),t=null==t?80:parseInt(t,10),d=null==d?80:parseInt(d,10);c(g,p,b,t,d)}}k=k.nextSibling}}};
"undefined"!=typeof mxVertexHandler&&function(){function b(){var b=document.createElement("div");b.className="geHint";b.style.whiteSpace="nowrap";b.style.position="absolute";return b}function c(b,d){switch(d){case mxConstants.POINTS:return b;case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(b/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(b){return!mxEvent.isAltDown(b)};var e=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(b){return e.apply(this,arguments)||this.graph.isTableRow(b)||this.graph.isTableCell(b)};var k=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(b){return k.apply(this,arguments)||this.graph.isEdgeIgnored(b)};var g=mxConnectionHandler.prototype.isCreateTarget;
mxConnectionHandler.prototype.isCreateTarget=function(b){return this.graph.isCloneEvent(b)||g.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var b=new mxEllipse(null,this.highlightColor,this.highlightColor,0);b.opacity=mxConstants.HIGHLIGHT_OPACITY;return b};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(b){b=this.graph.createCurrentEdgeStyle();b=this.graph.createEdge(null,
-null,null,null,null,b);b=new mxCellState(this.graph.view,b,this.graph.getCellStyle(b));for(var d in this.graph.currentEdgeStyle)b.style[d]=this.graph.currentEdgeStyle[d];return b};var n=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var b=n.apply(this,arguments);b.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return b};mxConnectionHandler.prototype.updatePreview=function(b){};var t=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+null,null,null,null,b);b=new mxCellState(this.graph.view,b,this.graph.getCellStyle(b));for(var d in this.graph.currentEdgeStyle)b.style[d]=this.graph.currentEdgeStyle[d];return b};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var b=p.apply(this,arguments);b.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return b};mxConnectionHandler.prototype.updatePreview=function(b){};var t=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
function(){var b=t.apply(this,arguments),d=b.getCell;b.getCell=mxUtils.bind(this,function(b){var f=d.apply(this,arguments);this.error=null;return f});return b};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var b="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",d="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),
f=0;f<d.length;f++)null!=this.currentEdgeStyle[d[f]]&&(b+=d[f]+"="+this.currentEdgeStyle[d[f]]+";");null!=this.currentEdgeStyle.orthogonalLoop?b+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(b+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?b+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(b+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(b+="elbow="+this.currentEdgeStyle.elbow+";");return b=null!=this.currentEdgeStyle.html?b+("html="+this.currentEdgeStyle.html+";"):b+"html=1;"};Graph.prototype.updateCellStyles=function(b,d,f){this.model.beginUpdate();try{for(var c=0;c<f.length;c++)if(this.model.isVertex(f[c])||this.model.isEdge(f[c])){this.setCellStyles(b,null,[f[c]]);var e=this.getCellStyle(f[c])[b];d!=(null==e?mxConstants.NONE:e)&&this.setCellStyles(b,
d,[f[c]])}}finally{this.model.endUpdate()}};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var b=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=b&&(new mxCodec(b.ownerDocument)).decode(b,this.getStylesheet())};Graph.prototype.createCellLookup=function(b,d){d=null!=d?d:{};for(var f=0;f<b.length;f++){var c=b[f];d[mxObjectIdentity.get(c)]=
c.getId();for(var e=this.model.getChildCount(c),g=0;g<e;g++)this.createCellLookup([this.model.getChildAt(c,g)],d)}return d};Graph.prototype.createCellMapping=function(b,d,f){f=null!=f?f:{};for(var c in b){var e=d[c];null==f[e]&&(f[e]=b[c].getId()||"")}return f};Graph.prototype.importGraphModel=function(b,d,f,c){d=null!=d?d:0;f=null!=f?f:0;var e=new mxCodec(b.ownerDocument),g=new mxGraphModel;e.decode(b,g);b=[];var e={},l={},k=g.getChildren(this.cloneCell(g.root,this.isCloneInvalidEdges(),e));if(null!=
-k){var m=this.createCellLookup([g.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<k.length;g++)p=this.model.getChildren(this.moveCells([k[g]],d,f,!1,this.model.getRoot())[0]),null!=p&&(b=b.concat(p));else{var p=g.getChildren(k[0]);null!=p&&(b=this.moveCells(p,d,f,!1,this.getDefaultParent()),l[g.getChildAt(g.root,0).getId()]=this.getDefaultParent().getId())}if(null!=b&&(this.createCellMapping(e,m,l),this.updateCustomLinks(l,b),c)){this.isGridEnabled()&&
-(d=this.snap(d),f=this.snap(f));var q=this.getBoundingBoxFromGeometry(b,!0);null!=q&&this.moveCells(b,d-q.x,f-q.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},f=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],!0);for(var g=new mxCodec,l=new mxGraphModel,k=l.getChildAt(l.getRoot(),0),e=0;e<f.length;e++){l.add(k,f[e]);var m=this.view.getState(b[e]);if(null!=m){var p=this.getCellGeometry(f[e]);null!=p&&p.relative&&!this.model.isEdge(b[e])&&
-null==c.get(this.model.getParent(b[e]))&&(p.offset=null,p.relative=!1,p.x=m.x/m.view.scale-m.view.translate.x,p.y=m.y/m.view.scale-m.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),f);return g.encode(l)};Graph.prototype.isSwimlane=function(b,d){if(null!=b&&this.model.getParent(b)!=this.model.getRoot()&&!this.model.isEdge(b)){var f=this.getCurrentCellStyle(b,d)[mxConstants.STYLE_SHAPE];return f==mxConstants.SHAPE_SWIMLANE||"table"==f}return!1};var d=Graph.prototype.isExtendParent;
-Graph.prototype.isExtendParent=function(b){var f=this.model.getParent(b);if(null!=f){var c=this.getCurrentCellStyle(f);if(null!=c.expand)return"0"!=c.expand}return d.apply(this,arguments)&&(null==f||!this.isTable(f))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(b,d,c,e,g,l,k,m){null==m&&(m=this.model.getParent(b),this.isTable(m)||this.isTableRow(m))&&(m=this.getCellAt(l,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=f.apply(this,[b,d,c,e,g,l,k,m]);this.model.setValue(c,
-"");var p=this.getChildCells(c,!0);for(d=0;d<p.length;d++){var q=this.getCellGeometry(p[d]);null!=q&&q.relative&&0<q.x&&this.model.remove(p[d])}var E=this.getChildCells(b,!0);for(d=0;d<E.length;d++)q=this.getCellGeometry(E[d]),null!=q&&q.relative&&0>=q.x&&this.model.remove(E[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
-mxConstants.NONE,[b]);var X=this.model.getTerminal(c,!1);if(null!=X){var u=this.getCurrentCellStyle(X);null!=u&&"1"==u.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(b,d,f){if(d||f)l.apply(this,arguments);
-else{var c=this.getSelectionCell(),e=null,g=[],k=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(g.push(d),d==c)e=g.length-1;else if(b&&null==c&&0<g.length||null!=e&&b&&g.length>e||!b&&0<e)return;for(var f=0;f<this.model.getChildCount(d);f++)k(this.model.getChildAt(d,f))});k(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=
-function(b,d,f,c,e,g,l){l=null!=l?l:{};if(this.isTable(e)){for(var k=[],p=0;p<b.length;p++)this.isTable(b[p])?k=k.concat(this.model.getChildCells(b[p],!0).reverse()):k.push(b[p]);b=k}this.model.beginUpdate();try{k=[];for(p=0;p<b.length;p++)if(null!=e&&this.isTableRow(b[p])){var q=this.model.getParent(b[p]),E=this.getCellGeometry(b[p]);this.isTable(q)&&k.push(q);if(null!=q&&null!=E&&this.isTable(q)&&this.isTable(e)&&(c||q!=e)){if(!c){var u=this.getCellGeometry(q);null!=u&&(u=u.clone(),u.height-=E.height,
-this.model.setGeometry(q,u))}u=this.getCellGeometry(e);null!=u&&(u=u.clone(),u.height+=E.height,this.model.setGeometry(e,u));var X=this.model.getChildCells(e,!0);if(0<X.length){b[p]=c?this.cloneCell(b[p]):b[p];var n=this.model.getChildCells(b[p],!0),v=this.model.getChildCells(X[0],!0),B=v.length-n.length;if(0<B)for(var F=0;F<B;F++){var x=this.cloneCell(n[n.length-1]);null!=x&&(x.value="",this.model.add(b[p],x))}else if(0>B)for(F=0;F>B;F--)this.model.remove(n[n.length+F-1]);n=this.model.getChildCells(b[p],
-!0);for(F=0;F<v.length;F++){var ta=this.getCellGeometry(v[F]),t=this.getCellGeometry(n[F]);null!=ta&&null!=t&&(t=t.clone(),t.width=ta.width,this.model.setGeometry(n[F],t))}}}}for(var sa=m.apply(this,arguments),p=0;p<k.length;p++)!c&&this.model.contains(k[p])&&0==this.model.getChildCount(k[p])&&this.model.remove(k[p]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),sa)}finally{this.model.endUpdate()}return sa};var p=Graph.prototype.removeCells;Graph.prototype.removeCells=
-function(b,d){var f=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),g=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(g)?0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g)&&f.push(g):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(g=this.model.getParent(b[c]),0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g))){for(var l=this.model.getChildCells(g,!0),k=0,m=0;m<l.length;m++)0<=mxUtils.indexOf(b,
-l[m])&&k++;k==l.length&&f.push(g)}f.push(b[c])}f=p.apply(this,[f,d])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(b,d,f){f=null!=f?f:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&f.updateCustomLinksForCell(b,d[c],f)};Graph.prototype.updateCustomLinksForCell=function(b,d){this.doUpdateCustomLinksForCell(b,d);for(var f=this.model.getChildCount(d),c=0;c<f;c++)this.updateCustomLinksForCell(b,this.model.getChildAt(d,c))};Graph.prototype.doUpdateCustomLinksForCell=
+k){var q=this.createCellLookup([g.root]),k=k.slice();this.model.beginUpdate();try{if(1!=k.length||this.isCellLocked(this.getDefaultParent()))for(g=0;g<k.length;g++)m=this.model.getChildren(this.moveCells([k[g]],d,f,!1,this.model.getRoot())[0]),null!=m&&(b=b.concat(m));else{var m=g.getChildren(k[0]);null!=m&&(b=this.moveCells(m,d,f,!1,this.getDefaultParent()),l[g.getChildAt(g.root,0).getId()]=this.getDefaultParent().getId())}if(null!=b&&(this.createCellMapping(e,q,l),this.updateCustomLinks(l,b),c)){this.isGridEnabled()&&
+(d=this.snap(d),f=this.snap(f));var n=this.getBoundingBoxFromGeometry(b,!0);null!=n&&this.moveCells(b,d-n.x,f-n.y)}}finally{this.model.endUpdate()}}return b};Graph.prototype.encodeCells=function(b){for(var d={},f=this.cloneCells(b,null,d),c=new mxDictionary,e=0;e<b.length;e++)c.put(b[e],!0);for(var g=new mxCodec,l=new mxGraphModel,k=l.getChildAt(l.getRoot(),0),e=0;e<f.length;e++){l.add(k,f[e]);var q=this.view.getState(b[e]);if(null!=q){var m=this.getCellGeometry(f[e]);null!=m&&m.relative&&!this.model.isEdge(b[e])&&
+null==c.get(this.model.getParent(b[e]))&&(m.offset=null,m.relative=!1,m.x=q.x/q.view.scale-q.view.translate.x,m.y=q.y/q.view.scale-q.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(b)),f);return g.encode(l)};Graph.prototype.isSwimlane=function(b,d){if(null!=b&&this.model.getParent(b)!=this.model.getRoot()&&!this.model.isEdge(b)){var f=this.getCurrentCellStyle(b,d)[mxConstants.STYLE_SHAPE];return f==mxConstants.SHAPE_SWIMLANE||"table"==f}return!1};var d=Graph.prototype.isExtendParent;
+Graph.prototype.isExtendParent=function(b){var f=this.model.getParent(b);if(null!=f){var c=this.getCurrentCellStyle(f);if(null!=c.expand)return"0"!=c.expand}return d.apply(this,arguments)&&(null==f||!this.isTable(f))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(b,d,c,e,g,l,k,q){null==q&&(q=this.model.getParent(b),this.isTable(q)||this.isTableRow(q))&&(q=this.getCellAt(l,k,null,!0,!1));c=null;this.model.beginUpdate();try{c=f.apply(this,[b,d,c,e,g,l,k,q]);this.model.setValue(c,
+"");var m=this.getChildCells(c,!0);for(d=0;d<m.length;d++){var n=this.getCellGeometry(m[d]);null!=n&&n.relative&&0<n.x&&this.model.remove(m[d])}var E=this.getChildCells(b,!0);for(d=0;d<E.length;d++)n=this.getCellGeometry(E[d]),null!=n&&n.relative&&0>=n.x&&this.model.remove(E[d]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[c]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[c]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[b]);this.setCellStyles(mxConstants.STYLE_STARTARROW,
+mxConstants.NONE,[b]);var X=this.model.getTerminal(c,!1);if(null!=X){var v=this.getCurrentCellStyle(X);null!=v&&"1"==v.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[b]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[b]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{this.model.endUpdate()}return c};var l=Graph.prototype.selectCell;Graph.prototype.selectCell=function(b,d,f){if(d||f)l.apply(this,arguments);
+else{var c=this.getSelectionCell(),e=null,g=[],k=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(g.push(d),d==c)e=g.length-1;else if(b&&null==c&&0<g.length||null!=e&&b&&g.length>e||!b&&0<e)return;for(var f=0;f<this.model.getChildCount(d);f++)k(this.model.getChildAt(d,f))});k(this.model.root);0<g.length&&(e=null!=e?mxUtils.mod(e+(b?1:-1),g.length):0,this.setSelectionCell(g[e]))}};var q=Graph.prototype.moveCells;Graph.prototype.moveCells=
+function(b,d,f,c,e,g,l){l=null!=l?l:{};if(this.isTable(e)){for(var k=[],m=0;m<b.length;m++)this.isTable(b[m])?k=k.concat(this.model.getChildCells(b[m],!0).reverse()):k.push(b[m]);b=k}this.model.beginUpdate();try{k=[];for(m=0;m<b.length;m++)if(null!=e&&this.isTableRow(b[m])){var n=this.model.getParent(b[m]),E=this.getCellGeometry(b[m]);this.isTable(n)&&k.push(n);if(null!=n&&null!=E&&this.isTable(n)&&this.isTable(e)&&(c||n!=e)){if(!c){var v=this.getCellGeometry(n);null!=v&&(v=v.clone(),v.height-=E.height,
+this.model.setGeometry(n,v))}v=this.getCellGeometry(e);null!=v&&(v=v.clone(),v.height+=E.height,this.model.setGeometry(e,v));var X=this.model.getChildCells(e,!0);if(0<X.length){b[m]=c?this.cloneCell(b[m]):b[m];var u=this.model.getChildCells(b[m],!0),p=this.model.getChildCells(X[0],!0),B=p.length-u.length;if(0<B)for(var F=0;F<B;F++){var x=this.cloneCell(u[u.length-1]);null!=x&&(x.value="",this.model.add(b[m],x))}else if(0>B)for(F=0;F>B;F--)this.model.remove(u[u.length+F-1]);u=this.model.getChildCells(b[m],
+!0);for(F=0;F<p.length;F++){var ta=this.getCellGeometry(p[F]),t=this.getCellGeometry(u[F]);null!=ta&&null!=t&&(t=t.clone(),t.width=ta.width,this.model.setGeometry(u[F],t))}}}}for(var sa=q.apply(this,arguments),m=0;m<k.length;m++)!c&&this.model.contains(k[m])&&0==this.model.getChildCount(k[m])&&this.model.remove(k[m]);c&&this.updateCustomLinks(this.createCellMapping(l,this.createCellLookup(b)),sa)}finally{this.model.endUpdate()}return sa};var m=Graph.prototype.removeCells;Graph.prototype.removeCells=
+function(b,d){var f=[];this.model.beginUpdate();try{for(var c=0;c<b.length;c++)if(this.isTableCell(b[c])){var e=this.model.getParent(b[c]),g=this.model.getParent(e);1==this.model.getChildCount(e)&&1==this.model.getChildCount(g)?0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g)&&f.push(g):this.labelChanged(b[c],"")}else{if(this.isTableRow(b[c])&&(g=this.model.getParent(b[c]),0>mxUtils.indexOf(b,g)&&0>mxUtils.indexOf(f,g))){for(var l=this.model.getChildCells(g,!0),k=0,q=0;q<l.length;q++)0<=mxUtils.indexOf(b,
+l[q])&&k++;k==l.length&&f.push(g)}f.push(b[c])}f=m.apply(this,[f,d])}finally{this.model.endUpdate()}return f};Graph.prototype.updateCustomLinks=function(b,d,f){f=null!=f?f:new Graph;for(var c=0;c<d.length;c++)null!=d[c]&&f.updateCustomLinksForCell(b,d[c],f)};Graph.prototype.updateCustomLinksForCell=function(b,d){this.doUpdateCustomLinksForCell(b,d);for(var f=this.model.getChildCount(d),c=0;c<f;c++)this.updateCustomLinksForCell(b,this.model.getChildAt(d,c))};Graph.prototype.doUpdateCustomLinksForCell=
function(b,d){};Graph.prototype.getAllConnectionConstraints=function(b,d){if(null!=b){var f=mxUtils.getValue(b.style,"points",null);if(null!=f){var c=[];try{for(var e=JSON.parse(f),f=0;f<e.length;f++){var g=e[f];c.push(new mxConnectionConstraint(new mxPoint(g[0],g[1]),2<g.length?"0"!=g[2]:!0,null,3<g.length?g[3]:0,4<g.length?g[4]:0))}}catch(xa){}return c}if(null!=b.shape&&null!=b.shape.bounds){g=b.shape.direction;e=b.shape.bounds;f=b.shape.scale;c=e.width/f;e=e.height/f;if(g==mxConstants.DIRECTION_NORTH||
g==mxConstants.DIRECTION_SOUTH)g=c,c=e,e=g;f=b.shape.getConstraints(b.style,c,e);if(null!=f)return f;if(null!=b.shape.stencil&&null!=b.shape.stencil.constraints)return b.shape.stencil.constraints;if(null!=b.shape.constraints)return b.shape.constraints}}return null};Graph.prototype.flipEdge=function(b){if(null!=b){var d=this.getCurrentCellStyle(b),d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
this.setCellStyles(mxConstants.STYLE_ELBOW,d,[b])}};Graph.prototype.isValidRoot=function(b){for(var d=this.model.getChildCount(b),f=0,c=0;c<d;c++){var e=this.model.getChildAt(b,c);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||f++)}return 0<f||this.isContainer(b)};Graph.prototype.isValidDropTarget=function(b,d,f){for(var c=this.getCurrentCellStyle(b),e=!0,g=!0,l=0;l<d.length&&g;l++)e=e&&this.isTable(d[l]),g=g&&this.isTableRow(d[l]);return("1"!=mxUtils.getValue(c,"part","0")||
this.isContainer(b))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(b))&&!this.isTableRow(b)&&(!this.isTable(b)||g||e)};Graph.prototype.createGroupCell=function(){var b=mxGraph.prototype.createGroupCell.apply(this,arguments);b.setStyle("group");return b};Graph.prototype.isExtendParentsOnAdd=function(b){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=b&&null!=this.layoutManager){var f=this.model.getParent(b);
null!=f&&(f=this.layoutManager.getLayout(f),null!=f&&f.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(b){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(b,d){var f=this.getModel(),c=[];f.beginUpdate();try{for(var e=0;e<b.length;e++){var g=b[e];if(f.isEdge(g)){var l=f.getTerminal(g,
-!0),k=f.getTerminal(g,!1);f.setTerminal(g,k,!0);f.setTerminal(g,l,!1);var m=f.getGeometry(g);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var p=m.getTerminalPoint(!0),q=m.getTerminalPoint(!1);m.setTerminalPoint(p,!1);m.setTerminalPoint(q,!0);f.setGeometry(g,m);var E=this.view.getState(g),u=this.view.getState(l),n=this.view.getState(k);if(null!=E){var X=null!=u?this.getConnectionConstraint(E,u,!0):null,v=null!=n?this.getConnectionConstraint(E,n,!1):null;this.setConnectionConstraint(g,
-l,!0,v);this.setConnectionConstraint(g,k,!1,X);var B=mxUtils.getValue(E.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(E.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,B,[g])}c.push(g)}}else if(f.isVertex(g)&&(m=this.getCellGeometry(g),null!=m)){if(!(this.isTable(g)||this.isTableRow(g)||this.isTableCell(g)||this.isSwimlane(g))){m=m.clone();m.x+=m.width/
+!0),k=f.getTerminal(g,!1);f.setTerminal(g,k,!0);f.setTerminal(g,l,!1);var m=f.getGeometry(g);if(null!=m){m=m.clone();null!=m.points&&m.points.reverse();var q=m.getTerminalPoint(!0),n=m.getTerminalPoint(!1);m.setTerminalPoint(q,!1);m.setTerminalPoint(n,!0);f.setGeometry(g,m);var E=this.view.getState(g),v=this.view.getState(l),u=this.view.getState(k);if(null!=E){var X=null!=v?this.getConnectionConstraint(E,v,!0):null,p=null!=u?this.getConnectionConstraint(E,u,!1):null;this.setConnectionConstraint(g,
+l,!0,p);this.setConnectionConstraint(g,k,!1,X);var B=mxUtils.getValue(E.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(E.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[g]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,B,[g])}c.push(g)}}else if(f.isVertex(g)&&(m=this.getCellGeometry(g),null!=m)){if(!(this.isTable(g)||this.isTableRow(g)||this.isTableCell(g)||this.isSwimlane(g))){m=m.clone();m.x+=m.width/
2-m.height/2;m.y+=m.height/2-m.width/2;var F=m.width;m.width=m.height;m.height=F;f.setGeometry(g,m)}var x=this.view.getState(g);if(null!=x){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],I=mxUtils.getValue(x.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,I)+(d?-1:1),t.length)],[g])}c.push(g)}}}finally{f.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=
-function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var q=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||this.isTableRow(b.cell))&&(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&
-(d=this.model.getParent(d));var f=this.view.getState(d);null!=f&&null!=f.shape&&(this.view.invalidate(d),f.shape.bounds=null)}q.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(b){b=this.model.getDescendants(b);if(0<b.length)for(var d=0;d<b.length;d++){var f=this.view.getState(b[d]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&
+function(b){if(null!=b&&null!=b.fgNode)for(b=b.fgNode.firstChild;null!=b;){if("text"==b.nodeName&&"1"==b.getAttribute("placeholders"))return!0;b=b.nextSibling}return!1};var n=Graph.prototype.processChange;Graph.prototype.processChange=function(b){if(b instanceof mxGeometryChange&&(this.isTableCell(b.cell)||this.isTableRow(b.cell))&&(null==b.previous&&null!=b.geometry||null!=b.previous&&!b.previous.equals(b.geometry))){var d=b.cell;this.isTableCell(d)&&(d=this.model.getParent(d));this.isTableRow(d)&&
+(d=this.model.getParent(d));var f=this.view.getState(d);null!=f&&null!=f.shape&&(this.view.invalidate(d),f.shape.bounds=null)}n.apply(this,arguments);b instanceof mxValueChange&&null!=b.cell&&null!=b.cell.value&&"object"==typeof b.cell.value&&this.invalidateDescendantsWithPlaceholders(b.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(b){b=this.model.getDescendants(b);if(0<b.length)for(var d=0;d<b.length;d++){var f=this.view.getState(b[d]);null!=f&&null!=f.shape&&null!=f.shape.stencil&&
this.stencilHasPlaceholders(f.shape.stencil)?this.removeStateForCell(b[d]):this.isReplacePlaceholders(b[d])&&this.view.invalidate(b[d],!1,!1)}};Graph.prototype.replaceElement=function(b,d){for(var f=b.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(b.attributes);attr=c.pop();)f.setAttribute(attr.nodeName,attr.nodeValue);f.innerHTML=b.innerHTML;b.parentNode.replaceChild(f,b)};Graph.prototype.processElements=function(b,d){if(null!=b)for(var f=b.getElementsByTagName("*"),c=
0;c<f.length;c++)d(f[c])};Graph.prototype.updateLabelElements=function(b,d,f){b=null!=b?b:this.getSelectionCells();for(var c=document.createElement("div"),e=0;e<b.length;e++)if(this.isHtmlLabel(b[e])){var g=this.convertValueToString(b[e]);if(null!=g&&0<g.length){c.innerHTML=g;for(var l=c.getElementsByTagName(null!=f?f:"*"),k=0;k<l.length;k++)d(l[k]);c.innerHTML!=g&&this.cellLabelChanged(b[e],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(b,d,f){d=Graph.zapGremlins(d);this.model.beginUpdate();
try{if(null!=b.value&&"object"==typeof b.value){if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder"))for(var c=b.getAttribute("placeholder"),e=b;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(c)){this.setAttributeForCell(e,c,d);break}e=this.model.getParent(e)}var g=b.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.hasAttribute("label_"+Graph.diagramLanguage)?g.setAttribute("label_"+Graph.diagramLanguage,d):
g.setAttribute("label",d);d=g}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(b){if(null!=b){for(var d=new mxDictionary,f=0;f<b.length;f++)d.put(b[f],!0);for(var c=[],f=0;f<b.length;f++){var e=this.model.getParent(b[f]);null==e||d.get(e)||(d.put(e,!0),c.push(e))}for(f=0;f<c.length;f++)if(e=this.view.getState(c[f]),null!=e&&(this.model.isEdge(e.cell)||this.model.isVertex(e.cell))&&this.isCellDeletable(e.cell)&&this.isTransparentState(e)){for(var g=
!0,l=0;l<this.model.getChildCount(e.cell)&&g;l++)d.get(this.model.getChildAt(e.cell,l))||(g=!1);g&&b.push(e.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(b){for(var d=[],f=0;f<b.length;f++)this.isCellDeletable(b[f])&&this.isTransparentState(this.view.getState(b[f]))&&d.push(b[f]);b=d;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(b,d){this.setAttributeForCell(b,"link",d)};Graph.prototype.setTooltipForCell=
function(b,d){var f="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(b.value)&&b.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(f="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(b,f,d)};Graph.prototype.getAttributeForCell=function(b,d,f){b=null!=b.value&&"object"===typeof b.value?b.value.getAttribute(d):null;return null!=b?b:f};Graph.prototype.setAttributeForCell=function(b,d,f){var c;null!=b.value&&"object"==typeof b.value?c=b.value.cloneNode(!0):(c=
-mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",b.value||""));null!=f?c.setAttribute(d,f):c.removeAttribute(d);this.model.setValue(b,c)};var v=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(b,d,f,c){this.getModel();if(mxEvent.isAltDown(d))return null;for(var e=0;e<b.length;e++){var g=this.model.getParent(b[e]);if(this.model.isEdge(g)&&0>mxUtils.indexOf(b,g))return null}for(var g=v.apply(this,arguments),l=!0,e=0;e<b.length&&l;e++)l=l&&this.isTableRow(b[e]);
+mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",b.value||""));null!=f?c.setAttribute(d,f):c.removeAttribute(d);this.model.setValue(b,c)};var u=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(b,d,f,c){this.getModel();if(mxEvent.isAltDown(d))return null;for(var e=0;e<b.length;e++){var g=this.model.getParent(b[e]);if(this.model.isEdge(g)&&0>mxUtils.indexOf(b,g))return null}for(var g=u.apply(this,arguments),l=!0,e=0;e<b.length&&l;e++)l=l&&this.isTableRow(b[e]);
l&&(this.isTableCell(g)&&(g=this.model.getParent(g)),this.isTableRow(g)&&(g=this.model.getParent(g)),this.isTable(g)||(g=null));return g};Graph.prototype.click=function(b){mxGraph.prototype.click.call(this,b);this.firstClickState=b.getState();this.firstClickSource=b.getSource()};Graph.prototype.dblClick=function(b,d){this.isEnabled()&&(d=this.insertTextForEvent(b,d),mxGraph.prototype.dblClick.call(this,b,d))};Graph.prototype.insertTextForEvent=function(b,d){var f=mxUtils.convertPoint(this.container,
mxEvent.getClientX(b),mxEvent.getClientY(b));if(null!=b&&!this.model.isVertex(d)){var c=this.model.isEdge(d)?this.view.getState(d):null,e=mxEvent.getSource(b);this.firstClickState!=c||this.firstClickSource!=e||null!=c&&null!=c.text&&null!=c.text.node&&null!=c.text.boundingBox&&(mxUtils.contains(c.text.boundingBox,f.x,f.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(b)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||!(null!=c||mxClient.IS_SVG&&
e==this.view.getCanvas().ownerSVGElement)||(null==c&&(c=this.view.getState(this.getCellAt(f.x,f.y))),d=this.addText(f.x,f.y,c))}return d};Graph.prototype.getInsertPoint=function(){var b=this.getGridSize(),d=this.container.scrollLeft/this.view.scale-this.view.translate.x,f=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var c=this.getPageLayout(),e=this.getPageSize(),d=Math.max(d,c.x*e.width),f=Math.max(f,c.y*e.height);return new mxPoint(this.snap(d+b),this.snap(f+
@@ -2558,19 +2559,19 @@ f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null!=f?this.clear():(null!=l.t
l.container.scrollLeft)<g&&Math.abs(this.scrollTop-l.container.scrollTop)<g&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(k)||mxEvent.isMiddleMouseButton(k))&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=this.currentLink?(e=l.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==d||d(k,this.currentLink),mxEvent.isConsumed(k)||(k=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(k)?"_blank":
e?l.linkTarget:"_top",l.openLink(this.currentLink,k),c.consume())):null!=f&&!c.isConsumed()&&Math.abs(this.scrollLeft-l.container.scrollLeft)<g&&Math.abs(this.scrollTop-l.container.scrollTop)<g&&Math.abs(this.startX-c.getGraphX())<g&&Math.abs(this.startY-c.getGraphY())<g&&f(c.getEvent()));this.clear()},activate:function(b){this.currentLink=l.getAbsoluteUrl(l.getLinkForCell(b.cell));null!=this.currentLink&&(this.currentTarget=l.getLinkTargetForCell(b.cell),l.container.style.cursor="pointer",null!=
this.highlight&&this.highlight.highlight(b))},clear:function(){null!=l.container&&(l.container.style.cursor=e);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=l.tooltipHandler&&l.tooltipHandler.hide()}};l.click=function(b){};l.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(b){k.clear()})};Graph.prototype.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();d=null!=d?d:!0;for(var f=0;f<b.length;f++)this.isTableCell(b[f])&&
-(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,g=[];c.beginUpdate();try{for(var l={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,l,!0),f=0;f<b.length;f++){var p=c.getParent(b[f]);if(null!=p){var q=this.moveCells([m[f]],e,e,!1)[0];g.push(q);if(d)c.add(p,m[f]);else{var E=p.getIndex(b[f]);c.add(p,m[f],E+1)}if(this.isTable(p)){var u=this.getCellGeometry(m[f]),n=this.getCellGeometry(p);null!=u&&null!=n&&(n=n.clone(),n.height+=u.height,c.setGeometry(p,
-n))}}else g.push(m[f])}this.updateCustomLinks(this.createCellMapping(l,k),m,this)}finally{c.endUpdate()}return g};Graph.prototype.insertImage=function(b,d,f){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),e=[],g=0;g<c.length;g++)e.push(c[g]);document.execCommand("insertimage",!1,b);b=this.cellEditor.textarea.getElementsByTagName("img");if(b.length==e.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=e[g-1]){b[g].setAttribute("width",d);b[g].setAttribute("height",
+(b[f]=this.model.getParent(b[f]));b=this.model.getTopmostCells(b);var c=this.getModel(),e=this.gridSize,g=[];c.beginUpdate();try{for(var l={},k=this.createCellLookup(b),m=this.cloneCells(b,!1,l,!0),f=0;f<b.length;f++){var q=c.getParent(b[f]);if(null!=q){var n=this.moveCells([m[f]],e,e,!1)[0];g.push(n);if(d)c.add(q,m[f]);else{var E=q.getIndex(b[f]);c.add(q,m[f],E+1)}if(this.isTable(q)){var v=this.getCellGeometry(m[f]),u=this.getCellGeometry(q);null!=v&&null!=u&&(u=u.clone(),u.height+=v.height,c.setGeometry(q,
+u))}}else g.push(m[f])}this.updateCustomLinks(this.createCellMapping(l,k),m,this)}finally{c.endUpdate()}return g};Graph.prototype.insertImage=function(b,d,f){if(null!=b&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),e=[],g=0;g<c.length;g++)e.push(c[g]);document.execCommand("insertimage",!1,b);b=this.cellEditor.textarea.getElementsByTagName("img");if(b.length==e.length+1)for(g=b.length-1;0<=g;g--)if(0==g||b[g]!=e[g-1]){b[g].setAttribute("width",d);b[g].setAttribute("height",
f);break}}};Graph.prototype.insertLink=function(b){if(null!=this.cellEditor.textarea)if(0==b.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),f=[],c=0;c<d.length;c++)f.push(d[c]);document.execCommand("createlink",!1,mxUtils.trim(b));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==f.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=f[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(f=d[0].parentNode;null!=
d[0].firstChild;)f.insertBefore(d[0].firstChild,d[0]);f.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(b))};Graph.prototype.isCellResizable=function(b){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),f=this.getCurrentCellStyle(b);return!this.isTableCell(b)&&!this.isTableRow(b)&&(d||"0"!=mxUtils.getValue(f,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==f[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(b,d){null==d&&(d=this.getSelectionCells());
-if(null!=d&&1<d.length){for(var f=[],c=null,e=null,g=0;g<d.length;g++)if(this.getModel().isVertex(d[g])){var l=this.view.getState(d[g]);if(null!=l){var k=b?l.getCenterX():l.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):k;f.push(l)}}if(2<f.length){f.sort(function(d,f){return b?d.x-f.x:d.y-f.y});l=this.view.translate;k=this.view.scale;e=e/k-(b?l.x:l.y);c=c/k-(b?l.x:l.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(f.length-1),c=e,g=1;g<f.length-1;g++){var p=this.view.getState(this.model.getParent(f[g].cell)),
-q=this.getCellGeometry(f[g].cell),c=c+m;null!=q&&null!=p&&(q=q.clone(),b?q.x=Math.round(c-q.width/2)-p.origin.x:q.y=Math.round(c-q.height/2)-p.origin.y,this.getModel().setGeometry(f[g].cell,q))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,d){return this.getLinkForCell(b.cell)});
-return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=function(b,d,f,c,e,g,l,k,m,p,q,E,u,n){var v=null;if(null!=n)for(v=new mxDictionary,q=0;q<n.length;q++)v.put(n[q],!0);if(n=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;
-g=null!=g?g:!0;l=null!=l?l:!0;var B="page"==u?this.view.getBackgroundPageBounds():g&&null==v||c||"diagram"==u?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),F=this.view.scale;"diagram"==u&&null!=this.backgroundImage&&B.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*F,(this.view.translate.y+this.backgroundImage.y)*F,this.backgroundImage.width*F,this.backgroundImage.height*F));if(null==B)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),
-t=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=t.style?t.style.backgroundColor=b:t.setAttribute("style","background-color:"+b));null==x.createElementNS?(t.setAttribute("xmlns",mxConstants.NS_SVG),t.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/F;var I=Math.max(1,Math.ceil(B.width*b)+2*f)+(p?5:0),y=Math.max(1,Math.ceil(B.height*b)+2*f)+(p?5:0);t.setAttribute("version",
+if(null!=d&&1<d.length){for(var f=[],c=null,e=null,g=0;g<d.length;g++)if(this.getModel().isVertex(d[g])){var l=this.view.getState(d[g]);if(null!=l){var k=b?l.getCenterX():l.getCenterY(),c=null!=c?Math.max(c,k):k,e=null!=e?Math.min(e,k):k;f.push(l)}}if(2<f.length){f.sort(function(d,f){return b?d.x-f.x:d.y-f.y});l=this.view.translate;k=this.view.scale;e=e/k-(b?l.x:l.y);c=c/k-(b?l.x:l.y);this.getModel().beginUpdate();try{for(var m=(c-e)/(f.length-1),c=e,g=1;g<f.length-1;g++){var q=this.view.getState(this.model.getParent(f[g].cell)),
+n=this.getCellGeometry(f[g].cell),c=c+m;null!=n&&null!=q&&(n=n.clone(),b?n.x=Math.round(c-n.width/2)-q.origin.x:n.y=Math.round(c-n.height/2)-q.origin.y,this.getModel().setGeometry(f[g].cell,n))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(b){return mxClient.IS_MAC&&mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)};Graph.prototype.createSvgImageExport=function(){var b=new mxImageExport;b.getLinkForCellState=mxUtils.bind(this,function(b,d){return this.getLinkForCell(b.cell)});
+return b};Graph.prototype.parseBackgroundImage=function(b){var d=null;null!=b&&0<b.length&&(b=JSON.parse(b),d=new mxImage(b.src,b.width,b.height));return d};Graph.prototype.getBackgroundImageObject=function(b){return b};Graph.prototype.getSvg=function(b,d,f,c,e,g,l,k,m,q,n,E,v,u){var p=null;if(null!=u)for(p=new mxDictionary,n=0;n<u.length;n++)p.put(u[n],!0);if(u=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{d=null!=d?d:1;f=null!=f?f:0;e=null!=e?e:!0;
+g=null!=g?g:!0;l=null!=l?l:!0;var B="page"==v?this.view.getBackgroundPageBounds():g&&null==p||c||"diagram"==v?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),F=this.view.scale;"diagram"==v&&null!=this.backgroundImage&&B.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*F,(this.view.translate.y+this.backgroundImage.y)*F,this.backgroundImage.width*F,this.backgroundImage.height*F));if(null==B)throw Error(mxResources.get("drawingEmpty"));var x=mxUtils.createXmlDocument(),
+t=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=b&&(null!=t.style?t.style.backgroundColor=b:t.setAttribute("style","background-color:"+b));null==x.createElementNS?(t.setAttribute("xmlns",mxConstants.NS_SVG),t.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):t.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);b=d/F;var I=Math.max(1,Math.ceil(B.width*b)+2*f)+(q?5:0),y=Math.max(1,Math.ceil(B.height*b)+2*f)+(q?5:0);t.setAttribute("version",
"1.1");t.setAttribute("width",I+"px");t.setAttribute("height",y+"px");t.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+I+" "+y);x.appendChild(t);var C=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");t.appendChild(C);var X=this.createSvgCanvas(C);X.foOffset=e?-.5:0;X.textOffset=e?-.5:0;X.imageOffset=e?-.5:0;X.translate(Math.floor(f/d-B.x/F),Math.floor(f/d-B.y/F));var Z=document.createElement("div"),A=X.getAlternateText;X.getAlternateText=function(b,d,f,c,e,
-g,l,k,m,p,q,z,oa){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(Z.innerHTML=g,g=mxUtils.extractTextWithWhitespace(Z.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),ua=[],Sa=0,E=0;(0==Wa||Sa<Wa)&&E<g.length;){var Ta=g.charCodeAt(E);if(10==Ta||13==Ta){if(0<Sa)break}else ua.push(g.charAt(E)),255>Ta&&Sa++;E++}ua.length<g.length&&1<g.length-ua.length&&(g=mxUtils.trim(ua.join(""))+"...");return g}catch(gb){return A.apply(this,arguments)}else return A.apply(this,arguments)};
+g,l,k,m,q,n,z,oa){if(null!=g&&0<this.state.fontSize)try{mxUtils.isNode(g)?g=g.innerText:(Z.innerHTML=g,g=mxUtils.extractTextWithWhitespace(Z.childNodes));for(var Wa=Math.ceil(2*c/this.state.fontSize),ua=[],Sa=0,E=0;(0==Wa||Sa<Wa)&&E<g.length;){var Ta=g.charCodeAt(E);if(10==Ta||13==Ta){if(0<Sa)break}else ua.push(g.charAt(E)),255>Ta&&Sa++;E++}ua.length<g.length&&1<g.length-ua.length&&(g=mxUtils.trim(ua.join(""))+"...");return g}catch(gb){return A.apply(this,arguments)}else return A.apply(this,arguments)};
var N=this.backgroundImage;if(null!=N){d=F/d;var ta=this.view.translate,ca=new mxRectangle((N.x+ta.x)*d,(N.y+ta.y)*d,N.width*d,N.height*d);mxUtils.intersects(B,ca)&&X.image(N.x+ta.x,N.y+ta.y,N.width,N.height,N.src,!0)}X.scale(b);X.textEnabled=l;k=null!=k?k:this.createSvgImageExport();var G=k.drawCellState,ba=k.getLinkForCellState;k.getLinkForCellState=function(b,d){var f=ba.apply(this,arguments);return null==f||b.view.graph.isCustomLink(f)?null:f};k.getLinkTargetForCellState=function(b,d){return b.view.graph.getLinkTargetForCell(b.cell)};
-k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=v?v.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(g&&null==v||c)&&null!=e;)c=null!=v?v.get(e):f.isCellSelected(e),e=f.model.getParent(e);(g&&null==v||c)&&G.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),X);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(X,t);return t}finally{n&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
+k.drawCellState=function(b,d){for(var f=b.view.graph,c=null!=p?p.get(b.cell):f.isCellSelected(b.cell),e=f.model.getParent(b.cell);!(g&&null==p||c)&&null!=e;)c=null!=p?p.get(e):f.isCellSelected(e),e=f.model.getParent(e);(g&&null==p||c)&&G.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),X);this.updateSvgLinks(t,m,!0);this.addForeignObjectWarning(X,t);return t}finally{u&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
function(b,d){if("0"!=urlParams["svg-warning"]&&0<d.getElementsByTagName("foreignObject").length){var f=b.createElement("switch"),c=b.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=b.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,
"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var g=b.createElement("text");g.setAttribute("text-anchor","middle");g.setAttribute("font-size","10px");g.setAttribute("x","50%");g.setAttribute("y","100%");mxUtils.write(g,Graph.foreignObjectWarningText);f.appendChild(c);e.appendChild(g);f.appendChild(e);d.appendChild(f)}};Graph.prototype.updateSvgLinks=function(b,d,f){b=b.getElementsByTagName("a");for(var c=0;c<b.length;c++)if(null==b[c].getAttribute("target")){var e=
b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&(null!=d&&/^https?:\/\//.test(e)?b[c].setAttribute("target",d):f&&this.isCustomLink(e)&&b[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(b){b=new mxSvgCanvas2D(b);b.pointerEvents=!0;return b};Graph.prototype.getSelectedElement=function(){var b=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(b=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&
@@ -2578,11 +2579,11 @@ b[c].getAttribute("href");null==e&&(e=b[c].getAttribute("xlink:href"));null!=e&&
d;){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.getParentByNames=function(b,d,f){for(;null!=b&&!(0<=mxUtils.indexOf(d,b.nodeName));){if(b==f)return null;b=b.parentNode}return b};Graph.prototype.selectNode=function(b){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var f=document.createRange();f.selectNode(b);d.removeAllRanges();d.addRange(f)}}else(d=document.selection)&&"Control"!=d.type&&(b=d.createRange(),b.collapse(!0),f=d.createRange(),
f.setEndPoint("StartToStart",b),f.select())};Graph.prototype.deleteCells=function(b,d){var f=null;if(null!=b&&0<b.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var e=this.model.getParent(b[c]);if(this.isTable(e)){var g=this.getCellGeometry(b[c]),l=this.getCellGeometry(e);null!=g&&null!=l&&(l=l.clone(),l.height-=g.height,this.model.setGeometry(e,l))}}var k=this.selectParentAfterDelete?this.model.getParents(b):null;this.removeCells(b,d)}finally{this.model.endUpdate()}if(null!=k)for(f=
[],c=0;c<k.length;c++)this.model.contains(k[c])&&(this.model.isVertex(k[c])||this.model.isEdge(k[c]))&&f.push(k[c])}return f};Graph.prototype.insertTableColumn=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=b,e=0;if(this.isTableCell(b))var g=f.getParent(b),c=f.getParent(g),e=mxUtils.indexOf(f.getChildCells(g,!0),b);else this.isTableRow(b)?c=f.getParent(b):b=f.getChildCells(c,!0)[0],d||(e=f.getChildCells(b,!0).length-1);for(var l=f.getChildCells(c,!0),k=Graph.minTableColumnWidth,g=0;g<
-l.length;g++){var m=f.getChildCells(l[g],!0)[e],p=f.cloneCell(m,!1),q=this.getCellGeometry(p);p.value=null;if(null!=q){var k=q.width,E=this.getCellGeometry(l[g]);null!=E&&(q.height=E.height)}f.add(l[g],p,e+(d?0:1))}var u=this.getCellGeometry(c);null!=u&&(u=u.clone(),u.width+=k,f.setGeometry(c,u))}finally{f.endUpdate()}};Graph.prototype.deleteLane=function(b){var d=this.getModel();d.beginUpdate();try{var f=null,f="stackLayout"==this.getCurrentCellStyle(b).childLayout?b:d.getParent(b),c=d.getChildCells(f,
+l.length;g++){var m=f.getChildCells(l[g],!0)[e],q=f.cloneCell(m,!1),n=this.getCellGeometry(q);q.value=null;if(null!=n){var k=n.width,E=this.getCellGeometry(l[g]);null!=E&&(n.height=E.height)}f.add(l[g],q,e+(d?0:1))}var v=this.getCellGeometry(c);null!=v&&(v=v.clone(),v.width+=k,f.setGeometry(c,v))}finally{f.endUpdate()}};Graph.prototype.deleteLane=function(b){var d=this.getModel();d.beginUpdate();try{var f=null,f="stackLayout"==this.getCurrentCellStyle(b).childLayout?b:d.getParent(b),c=d.getChildCells(f,
!0);0==c.length?d.remove(f):(f==b&&(b=c[c.length-1]),d.remove(b))}finally{d.endUpdate()}};Graph.prototype.insertLane=function(b,d){var f=this.getModel();f.beginUpdate();try{var c=null,e=b;if("stackLayout"==this.getCurrentCellStyle(e).childLayout)var c=e,g=f.getChildCells(c,!0),e=g[d?0:g.length-1];else c=f.getParent(e);var l=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;f.add(c,e,l+(d?0:1))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(b,d){var f=this.getModel();f.beginUpdate();
-try{var c=b,e=b;if(this.isTableCell(b))e=f.getParent(b),c=f.getParent(e);else if(this.isTableRow(b))c=f.getParent(b);else var g=f.getChildCells(c,!0),e=g[d?0:g.length-1];var l=f.getChildCells(e,!0),k=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;var m=this.getCellGeometry(e);if(null!=m){for(g=0;g<l.length;g++){b=f.cloneCell(l[g],!1);e.insert(b);b.value=null;var p=this.getCellGeometry(b);null!=p&&(p.height=m.height)}f.add(c,e,k+(d?0:1));var q=this.getCellGeometry(c);null!=q&&(q=q.clone(),q.height+=
-m.height,f.setGeometry(c,q))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(0==e.length)d.remove(f);else{this.isTableRow(c)||(c=e[0]);var g=d.getChildCells(c,!0);if(1>=g.length)d.remove(f);else{var l=g.length-1;this.isTableCell(b)&&(l=mxUtils.indexOf(g,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[l];
-d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var p=this.getCellGeometry(f);null!=p&&(p=p.clone(),p.width-=b,d.setGeometry(f,p))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(b=c=d.getParent(b));this.isTableRow(b)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(1>=e.length)d.remove(f);else{this.isTableRow(c)||(c=e[e.length-1]);d.remove(c);b=0;var g=this.getCellGeometry(c);
+try{var c=b,e=b;if(this.isTableCell(b))e=f.getParent(b),c=f.getParent(e);else if(this.isTableRow(b))c=f.getParent(b);else var g=f.getChildCells(c,!0),e=g[d?0:g.length-1];var l=f.getChildCells(e,!0),k=c.getIndex(e),e=f.cloneCell(e,!1);e.value=null;var m=this.getCellGeometry(e);if(null!=m){for(g=0;g<l.length;g++){b=f.cloneCell(l[g],!1);e.insert(b);b.value=null;var q=this.getCellGeometry(b);null!=q&&(q.height=m.height)}f.add(c,e,k+(d?0:1));var n=this.getCellGeometry(c);null!=n&&(n=n.clone(),n.height+=
+m.height,f.setGeometry(c,n))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(c=d.getParent(b));this.isTableRow(c)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(0==e.length)d.remove(f);else{this.isTableRow(c)||(c=e[0]);var g=d.getChildCells(c,!0);if(1>=g.length)d.remove(f);else{var l=g.length-1;this.isTableCell(b)&&(l=mxUtils.indexOf(g,b));for(c=b=0;c<e.length;c++){var k=d.getChildCells(e[c],!0)[l];
+d.remove(k);var m=this.getCellGeometry(k);null!=m&&(b=Math.max(b,m.width))}var q=this.getCellGeometry(f);null!=q&&(q=q.clone(),q.width-=b,d.setGeometry(f,q))}}}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=function(b){var d=this.getModel();d.beginUpdate();try{var f=b,c=b;this.isTableCell(b)&&(b=c=d.getParent(b));this.isTableRow(b)&&(f=d.getParent(c));var e=d.getChildCells(f,!0);if(1>=e.length)d.remove(f);else{this.isTableRow(c)||(c=e[e.length-1]);d.remove(c);b=0;var g=this.getCellGeometry(c);
null!=g&&(b=g.height);var l=this.getCellGeometry(f);null!=l&&(l=l.clone(),l.height-=b,d.setGeometry(f,l))}}finally{d.endUpdate()}};Graph.prototype.insertRow=function(b,d){for(var f=b.tBodies[0],c=f.rows[0].cells,e=0,g=0;g<c.length;g++)var l=c[g].getAttribute("colspan"),e=e+(null!=l?parseInt(l):1);f=f.insertRow(d);for(g=0;g<e;g++)mxUtils.br(f.insertCell(-1));return f.cells[0]};Graph.prototype.deleteRow=function(b,d){b.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(b,d){var f=b.tHead;
if(null!=f)for(var c=0;c<f.rows.length;c++){var e=document.createElement("th");f.rows[c].appendChild(e);mxUtils.br(e)}f=b.tBodies[0];for(c=0;c<f.rows.length;c++)e=f.rows[c].insertCell(d),mxUtils.br(e);return f.rows[0].cells[0<=d?d:f.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(b,d){if(0<=d)for(var f=b.tBodies[0].rows,c=0;c<f.length;c++)f[c].cells.length>d&&f[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(b){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&
d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var f=document.createElement("div");f.innerHTML=b;b=document.createDocumentFragment();for(var c;c=f.firstChild;)lastNode=b.appendChild(c);d.insertNode(b)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(b)};Graph.prototype.createLinkForHint=function(b,d){function f(b,d){b.length>d&&(b=b.substring(0,Math.round(d/2))+"..."+b.substring(b.length-Math.round(d/4)));return b}b=null!=b?b:"javascript:void(0);";if(null==d||0==d.length)d=
@@ -2593,8 +2594,8 @@ d.state.shape.node.style.cursor))}null==d.getState()&&this.isEnabled()&&(this.co
[b,e,g])})};mxCellEditor.prototype.isContentEditing=function(){var b=this.graph.view.getState(this.editingCell);return null!=b&&1==b.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var b="";window.getSelection?b=window.getSelection():document.getSelection?b=document.getSelection():document.selection&&(b=document.selection.createRange().text);
return""!=b};mxCellEditor.prototype.insertTab=function(b){var d=this.textarea.ownerDocument.defaultView.getSelection(),f=d.getRangeAt(0),c="\t";if(null!=b)for(c="";0<b;)c+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(c));f.insertNode(b);f.setStartAfter(b);f.setEndAfter(b);d.removeAllRanges();d.addRange(f)};mxCellEditor.prototype.alignText=function(b,d){var f=null!=d&&mxEvent.isShiftDown(d);if(f||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=
!0;this.graph.processElements(this.textarea,function(b){f||window.getSelection().containsNode(b,!0)?(b.removeAttribute("align"),b.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(b)}document.execCommand("justify"+b.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var b=window.getSelection();if(b.getRangeAt&&b.rangeCount){for(var d=[],f=0,c=b.rangeCount;f<c;++f)d.push(b.getRangeAt(f));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
-return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,f=b.length;d<f;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(la){}};var u=mxCellRenderer.prototype.postConfigureShape;mxCellRenderer.prototype.postConfigureShape=function(b){var d=Editor.isDarkMode()?"#ffffff":"#000000",f=b.view.graph.defaultPageBackgroundColor;this.resolveDefaultColor(b,"fill",b.shape,f);this.resolveDefaultColor(b,
-"stroke",b.shape,d);this.resolveDefaultColor(b,"laneFill",b.shape,f);this.resolveDefaultColor(b,"imageBackground",b.shape,f);this.resolveDefaultColor(b,"imageBorder",b.shape,d);this.resolveDefaultColor(b,"background",b.text,f);this.resolveDefaultColor(b,"color",b.text,d);u.apply(this,arguments)};mxCellRenderer.prototype.resolveDefaultColor=function(b,d,f,c){null!=f&&"default"==f[d]&&(f[d]=c)};var y=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(b){null!=
+return null};mxCellEditor.prototype.restoreSelection=function(b){try{if(b)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,f=b.length;d<f;++d)sel.addRange(b[d])}else document.selection&&b.select&&b.select()}catch(la){}};var v=mxCellRenderer.prototype.postConfigureShape;mxCellRenderer.prototype.postConfigureShape=function(b){var d=Editor.isDarkMode()?"#ffffff":"#000000",f=b.view.graph.defaultPageBackgroundColor;this.resolveDefaultColor(b,"fill",b.shape,f);this.resolveDefaultColor(b,
+"stroke",b.shape,d);this.resolveDefaultColor(b,"laneFill",b.shape,f);this.resolveDefaultColor(b,"imageBackground",b.shape,f);this.resolveDefaultColor(b,"imageBorder",b.shape,d);this.resolveDefaultColor(b,"background",b.text,f);this.resolveDefaultColor(b,"color",b.text,d);v.apply(this,arguments)};mxCellRenderer.prototype.resolveDefaultColor=function(b,d,f,c){null!=f&&"default"==f[d]&&(f[d]=c)};var y=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(b){null!=
b.text&&(b.text.replaceLinefeeds="0"!=mxUtils.getValue(b.style,"nl2Br","1"));y.apply(this,arguments)};var x=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(b,d){this.isKeepFocusEvent(b)||!mxEvent.isAltDown(b.getEvent())?x.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(b){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var D=mxCellEditor.prototype.startEditing;
mxCellEditor.prototype.startEditing=function(b,d){b=this.graph.getStartEditingCell(b,d);D.apply(this,arguments);var f=this.graph.view.getState(b);this.textarea.className=null!=f&&1==f.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(b);var f=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);if(this.graph.getModel().isEdge(f)&&null!=c&&c.relative||this.graph.getModel().isEdge(b))this.textarea.style.outline=
mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(b){function d(b,f){f.originalNode=b;b=b.firstChild;for(var c=f.firstChild;null!=b&&null!=c;)d(b,c),b=b.nextSibling,c=c.nextSibling;return f}function f(b,d){if(null!=b)if(d.originalNode!=b)c(b);else for(b=b.firstChild,d=d.firstChild;null!=b;){var e=b.nextSibling;null==d?c(b):(f(b,d),d=d.nextSibling);b=e}}function c(b){for(var d=
@@ -2622,10 +2623,10 @@ b.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(b,d){return this.gr
var Q=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return Q.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 T=mxVertexHandler.prototype.isParentHighlightVisible;
mxVertexHandler.prototype.isParentHighlightVisible=function(){return T.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var N=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(b){return b.tableHandle||N.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var b=0;this.graph.isTableRow(this.state.cell)?
b=1:this.graph.isTableCell(this.state.cell)&&(b=2);return b};var O=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return O.apply(this,arguments).grow(-this.getSelectionBorderInset())};var ha=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=ha.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=this.graph,f=d.model,c=this.state,e=this.selectionBorder,g=this;
-null==b&&(b=[]);var l=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<l.length){for(var k=f.getChildCells(l[0].cell,!0),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var l=d.view.getState(k[f]),m=d.getCellGeometry(k[f]),p=null!=m.alternateBounds?m.alternateBounds:m;null==l&&(l=new mxCellState(d.view,k[f],d.getCellStyle(k[f])),l.x=c.x+m.x*d.view.scale,l.y=c.y+m.y*d.view.scale,l.width=p.width*d.view.scale,l.height=p.height*d.view.scale,l.updateCachedBounds());var m=f<k.length-1?k[f+
-1]:null,m=null!=m?d.getCellGeometry(m):null,q=null!=m&&null!=m.alternateBounds?m.alternateBounds:m,m=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);m.isDashed=e.isDashed;m.svgStrokeTolerance++;l=new mxHandle(l,"col-resize",null,m);l.tableHandle=!0;var E=0;l.shape.node.parentNode.insertBefore(l.shape.node,l.shape.node.parentNode.firstChild);l.redraw=function(){if(null!=this.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==E?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+
-(p.width+E)*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var u=!1;l.setPosition=function(b,d,f){E=Math.max(Graph.minTableColumnWidth-p.width,d.x-b.x-p.width);u=mxEvent.isShiftDown(f.getEvent());null==q||u||(E=Math.min(E,q.width-Graph.minTableColumnWidth))};l.execute=function(b){if(0!=E)d.setTableColumnWidth(this.state.cell,
-E,u);else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}E=0};l.positionChanged=function(){};l.reset=function(){E=0};b.push(l)})(f);for(f=0;f<l.length;f++)mxUtils.bind(this,function(f){f=l[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,k);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,f.shape.node.parentNode.firstChild);
+null==b&&(b=[]);var l=d.view.getCellStates(f.getChildCells(this.state.cell,!0));if(0<l.length){for(var k=f.getChildCells(l[0].cell,!0),f=0;f<k.length;f++)mxUtils.bind(this,function(f){var l=d.view.getState(k[f]),m=d.getCellGeometry(k[f]),q=null!=m.alternateBounds?m.alternateBounds:m;null==l&&(l=new mxCellState(d.view,k[f],d.getCellStyle(k[f])),l.x=c.x+m.x*d.view.scale,l.y=c.y+m.y*d.view.scale,l.width=q.width*d.view.scale,l.height=q.height*d.view.scale,l.updateCachedBounds());var m=f<k.length-1?k[f+
+1]:null,m=null!=m?d.getCellGeometry(m):null,n=null!=m&&null!=m.alternateBounds?m.alternateBounds:m,m=new mxLine(new mxRectangle,mxConstants.NONE,1,!0);m.isDashed=e.isDashed;m.svgStrokeTolerance++;l=new mxHandle(l,"col-resize",null,m);l.tableHandle=!0;var E=0;l.shape.node.parentNode.insertBefore(l.shape.node,l.shape.node.parentNode.firstChild);l.redraw=function(){if(null!=this.shape){var b=d.getActualStartSize(c.cell);this.shape.stroke=0==E?mxConstants.NONE:e.stroke;this.shape.bounds.x=this.state.x+
+(q.width+E)*this.graph.view.scale;this.shape.bounds.width=1;this.shape.bounds.y=c.y+(f==k.length-1?0:b.y*this.graph.view.scale);this.shape.bounds.height=c.height-(f==k.length-1?0:(b.height+b.y)*this.graph.view.scale);this.shape.redraw()}};var v=!1;l.setPosition=function(b,d,f){E=Math.max(Graph.minTableColumnWidth-q.width,d.x-b.x-q.width);v=mxEvent.isShiftDown(f.getEvent());null==n||v||(E=Math.min(E,n.width-Graph.minTableColumnWidth))};l.execute=function(b){if(0!=E)d.setTableColumnWidth(this.state.cell,
+E,v);else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}E=0};l.positionChanged=function(){};l.reset=function(){E=0};b.push(l)})(f);for(f=0;f<l.length;f++)mxUtils.bind(this,function(f){f=l[f];var k=new mxLine(new mxRectangle,mxConstants.NONE,1);k.isDashed=e.isDashed;k.svgStrokeTolerance++;f=new mxHandle(f,"row-resize",null,k);f.tableHandle=!0;var m=0;f.shape.node.parentNode.insertBefore(f.shape.node,f.shape.node.parentNode.firstChild);
f.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.stroke=0==m?mxConstants.NONE:e.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())};f.setPosition=function(b,d,f){m=Math.max(Graph.minTableRowHeight-b.height,d.y-b.y-b.height)};f.execute=function(b){if(0!=m)d.setTableRowHeight(this.state.cell,m,!mxEvent.isShiftDown(b.getEvent()));
else if(!g.blockDelayedSelection){var f=d.getCellAt(b.getGraphX(),b.getGraphY())||c.cell;d.graphHandler.selectCellForEvent(f,b)}m=0};f.reset=function(){m=0};b.push(f)})(f)}}return null!=b?b.reverse():null};var E=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){E.apply(this,arguments);if(null!=this.moveHandles)for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].style.visibility=b?"":"hidden";if(null!=this.cornerHandles)for(d=0;d<this.cornerHandles.length;d++)this.cornerHandles[d].node.style.visibility=
b?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var b=this.graph.model;if(null!=this.moveHandles){for(var d=0;d<this.moveHandles.length;d++)this.moveHandles[d].parentNode.removeChild(this.moveHandles[d]);this.moveHandles=null}this.moveHandles=[];for(d=0;d<b.getChildCount(this.state.cell);d++)mxUtils.bind(this,function(d){if(null!=d&&b.isVertex(d.cell)){var f=mxUtils.createImage(Editor.rowMoveImage);f.style.position="absolute";f.style.cursor="pointer";f.style.width="7px";f.style.height=
@@ -2650,7 +2651,7 @@ if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigat
b.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==b.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var I=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(b,d){I.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(b){var d=b.getEvent();return mxEvent.isLeftMouseButton(d)&&
(this.useLeftButtonForPanning&&null==b.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(b){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(b.getEvent())&&mxEvent.isShiftDown(b.getEvent())&&mxEvent.isAltDown(b.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=
!0,this.reset())};mxRubberband.prototype.mouseUp=function(b,d){if(this.cancelled)this.cancelled=!1,d.consume();else{var f=null!=this.div&&"none"!=this.div.style.display,c=null,e=null,g=null,l=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,e=this.first.y,g=(this.currentX-c)/this.graph.view.scale,l=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(g=this.graph.snap(g),l=this.graph.snap(l),this.graph.isGridEnabled()||(Math.abs(g)<this.graph.tolerance&&
-(g=0),Math.abs(l)<this.graph.tolerance&&(l=0))));this.reset();if(f){if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(var k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=this.graph.view.getState(k[f]),p=this.graph.getCellGeometry(k[f]);null!=m&&null!=p&&(p=p.clone(),p.translate(g,l),this.graph.model.setGeometry(k[f],p))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,
+(g=0),Math.abs(l)<this.graph.tolerance&&(l=0))));this.reset();if(f){if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(var k=this.graph.getCellsBeyond(c,e,this.graph.getDefaultParent(),!0,!0),f=0;f<k.length;f++)if(this.graph.isCellMovable(k[f])){var m=this.graph.view.getState(k[f]),q=this.graph.getCellGeometry(k[f]);null!=m&&null!=q&&(q=q.clone(),q.translate(g,l),this.graph.model.setGeometry(k[f],q))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,
this.height),this.graph.selectRegion(g,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(b,d){if(!d.isConsumed()&&null!=this.first){var f=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);f.x-=c.x;f.y-=c.y;var c=d.getX()+f.x,f=d.getY()+f.y,e=this.first.x-c,g=this.first.y-f,l=this.graph.tolerance;if(null!=this.div||Math.abs(e)>l||Math.abs(g)>l)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,f),this.isSpaceEvent(d)?
(c=this.x+this.width,f=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=f-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=
@@ -2679,43 +2680,43 @@ d=this.cornerHandles,f=d[0].bounds.height/2;d[0].bounds.x=this.state.x-d[0].boun
function(){pa.apply(this,arguments);if(null!=this.moveHandles){for(var b=0;b<this.moveHandles.length;b++)null!=this.moveHandles[b]&&null!=this.moveHandles[b].parentNode&&this.moveHandles[b].parentNode.removeChild(this.moveHandles[b]);this.moveHandles=null}if(null!=this.cornerHandles){for(b=0;b<this.cornerHandles.length;b++)null!=this.cornerHandles[b]&&null!=this.cornerHandles[b].node&&null!=this.cornerHandles[b].node.parentNode&&this.cornerHandles[b].node.parentNode.removeChild(this.cornerHandles[b].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 aa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
function(){if(null!=this.marker&&(aa.apply(this),null!=this.state&&null!=this.linkHint)){var b=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(b=new mxRectangle(b.x,b.y,b.width,b.height),b.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(b.x+(b.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b.y+b.height+Editor.hintOffset)+"px"}};var ja=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ja.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var P=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function m(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function p(){mxActor.call(this)}function q(){mxCylinder.call(this)}
-function v(){mxCylinder.call(this)}function u(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function D(){mxActor.call(this)}function C(){mxActor.call(this)}function G(){mxActor.call(this)}function J(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
+null!=this.linkHint&&(this.linkHint.style.visibility="")};var P=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(){mxSwimlane.call(this)}function c(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function k(){mxActor.call(this)}function g(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function t(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxShape.call(this)}function l(){mxShape.call(this)}function q(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1}function m(){mxActor.call(this)}function n(){mxCylinder.call(this)}
+function u(){mxCylinder.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function D(){mxActor.call(this)}function C(){mxActor.call(this)}function G(){mxActor.call(this)}function J(){mxActor.call(this)}function L(b,d){this.canvas=b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,L.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;
this.canvas.moveTo=mxUtils.bind(this,L.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,L.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,L.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,L.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,L.prototype.arcTo)}function H(){mxRectangleShape.call(this)}function K(){mxRectangleShape.call(this)}
function A(){mxActor.call(this)}function M(){mxActor.call(this)}function Q(){mxActor.call(this)}function T(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function O(){mxCylinder.call(this)}function ha(){mxShape.call(this)}function E(){mxShape.call(this)}function B(){mxEllipse.call(this)}function F(){mxShape.call(this)}function Z(){mxShape.call(this)}function I(){mxRectangleShape.call(this)}function ba(){mxShape.call(this)}function ca(){mxShape.call(this)}function da(){mxShape.call(this)}
function ka(){mxShape.call(this)}function ma(){mxShape.call(this)}function ia(){mxCylinder.call(this)}function W(){mxCylinder.call(this)}function na(){mxRectangleShape.call(this)}function V(){mxDoubleEllipse.call(this)}function R(){mxDoubleEllipse.call(this)}function ra(){mxArrowConnector.call(this);this.spacing=0}function S(){mxArrowConnector.call(this);this.spacing=0}function fa(){mxActor.call(this)}function ga(){mxRectangleShape.call(this)}function qa(){mxActor.call(this)}function U(){mxActor.call(this)}
function pa(){mxActor.call(this)}function aa(){mxActor.call(this)}function ja(){mxActor.call(this)}function P(){mxActor.call(this)}function X(){mxActor.call(this)}function ta(){mxActor.call(this)}function sa(){mxActor.call(this)}function la(){mxActor.call(this)}function Ba(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function Fa(){mxRhombus.call(this)}function Ja(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function Ia(){mxEllipse.call(this)}
-function za(){mxEllipse.call(this)}function wa(){mxActor.call(this)}function va(){mxActor.call(this)}function Ca(){mxActor.call(this)}function Y(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ga(){mxConnector.call(this)}function Ua(b,d,f,c,e,g,l,k,m,p){l+=m;var z=c.clone();c.x-=e*(2*l+m);c.y-=g*(2*l+m);e*=l+m;g*=l+m;return function(){b.ellipse(z.x-
-e-l,z.y-g-l,2*l,2*l);p?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,f,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-f));this.paintForeground(b,
+function za(){mxEllipse.call(this)}function wa(){mxActor.call(this)}function va(){mxActor.call(this)}function Ca(){mxActor.call(this)}function Y(b,d,f,c){mxShape.call(this);this.bounds=b;this.fill=d;this.stroke=f;this.strokewidth=null!=c?c:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ga(){mxConnector.call(this)}function Ua(b,d,f,c,e,g,l,k,m,q){l+=m;var z=c.clone();c.x-=e*(2*l+m);c.y-=g*(2*l+m);e*=l+m;g*=l+m;return function(){b.ellipse(z.x-
+e-l,z.y-g-l,2*l,2*l);q?b.fillAndStroke():b.stroke()}}mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(b){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(b,d,f,c,e){0==this.getTitleSize()?mxRectangleShape.prototype.paintBackground.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),b.translate(-d,-f));this.paintForeground(b,
d,f,c,e)};b.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.state){var z=this.flipH,g=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)var l=z,z=g,g=l;b.rotate(-this.getShapeRotation(),z,g,d+c/2,f+e/2);s=this.scale;d=this.bounds.x/s;f=this.bounds.y/s;c=this.bounds.width/s;e=this.bounds.height/s;this.paintTableForeground(b,d,f,c,e)}};b.prototype.paintTableForeground=function(b,d,f,c,e){var z=this.state.view.graph,g=z.getActualStartSize(this.state.cell),
-l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),m="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),oa=z.getCellGeometry(l[0]),ua=[{y:null!=oa?oa.y+oa.height:0,cells:z.model.getChildCells(l[0],!0)}];if(k)for(k=1;k<l.length;k++){var oa=z.getCellGeometry(l[k]),p={y:0,cells:z.model.getChildCells(l[k],!0)};ua.push(p);null!=oa&&(p.y=oa.y+oa.height,b.begin(),b.moveTo(d+g.x,f+oa.y),b.lineTo(d+c-g.width,f+oa.y),b.end(),b.stroke())}if(m)for(c=
-z.model.getChildCells(l[0],!0),k=1;k<c.length;k++)if(oa=z.getCellGeometry(c[k]),null!=oa){b.begin();b.moveTo(d+oa.x+g.x,f+g.y);for(m=l=0;m<ua.length;m++)p=ua[m],null!=p&&(z.model.isVisible(p.cells[k])?l=p.y:(0<l&&b.lineTo(d+oa.x+g.x,f+l-g.height),b.moveTo(d+oa.x+g.x,f+p.y),l=0));b.lineTo(d+oa.x+g.x,f+e-g.height);b.end();b.stroke()}}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=
+l=z.model.getChildCells(this.state.cell,!0);if(0<l.length){var k="0"!=mxUtils.getValue(this.state.style,"rowLines","1"),m="0"!=mxUtils.getValue(this.state.style,"columnLines","1"),oa=z.getCellGeometry(l[0]),ua=[{y:null!=oa?oa.y+oa.height:0,cells:z.model.getChildCells(l[0],!0)}];if(k)for(k=1;k<l.length;k++){var oa=z.getCellGeometry(l[k]),q={y:0,cells:z.model.getChildCells(l[k],!0)};ua.push(q);null!=oa&&(q.y=oa.y+oa.height,b.begin(),b.moveTo(d+g.x,f+oa.y),b.lineTo(d+c-g.width,f+oa.y),b.end(),b.stroke())}if(m)for(c=
+z.model.getChildCells(l[0],!0),k=1;k<c.length;k++)if(oa=z.getCellGeometry(c[k]),null!=oa){b.begin();b.moveTo(d+oa.x+g.x,f+g.y);for(m=l=0;m<ua.length;m++)q=ua[m],null!=q&&(z.model.isVisible(q.cells[k])?l=q.y:(0<l&&b.lineTo(d+oa.x+g.x,f+l-g.height),b.moveTo(d+oa.x+g.x,f+q.y),l=0));b.lineTo(d+oa.x+g.x,f+e-g.height);b.end();b.stroke()}}};mxCellRenderer.registerShape("table",b);mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.darkOpacity=0;c.prototype.darkOpacity2=0;c.prototype.paintVertexShape=
function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),l=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(z,e);b.lineTo(0,e-z);b.lineTo(0,0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),
0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(c-z,0),b.lineTo(c,z),b.lineTo(z,z),b.close(),b.fill()),0!=l&&(b.setFillAlpha(Math.abs(l)),b.setFillColor(0>l?"#FFFFFF":"#000000"),b.begin(),b.moveTo(0,0),b.lineTo(z,z),b.lineTo(z,e),b.lineTo(0,e-z),b.close(),b.fill()),b.begin(),b.moveTo(z,e),b.lineTo(z,z),b.lineTo(0,0),b.moveTo(z,z),b.lineTo(c,z),b.end(),b.stroke())};c.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
"boundedLbl",!1)?(b=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(b,b,0,0)):null};mxCellRenderer.registerShape("cube",c);var Qa=Math.tan(mxUtils.toRadians(30)),Ha=(.5-Qa)/2;mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(e,mxCylinder);e.prototype.size=6;e.prototype.paintVertexShape=function(b,d,f,c,e){b.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;b.ellipse(d+.5*(c-z),
f+.5*(e-z),z,z);b.fill();b.setFillColor(mxConstants.NONE);b.rect(d,f,c,e);b.fill()};mxCellRenderer.registerShape("waypoint",e);mxUtils.extend(k,mxActor);k.prototype.size=20;k.prototype.redrawPath=function(b,d,f,c,e){d=Math.min(c,e/Qa);b.translate((c-d)/2,(e-d)/2+d/4);b.moveTo(0,.25*d);b.lineTo(.5*d,d*Ha);b.lineTo(d,.25*d);b.lineTo(.5*d,(.5-Ha)*d);b.lineTo(0,.25*d);b.close();b.end()};mxCellRenderer.registerShape("isoRectangle",k);mxUtils.extend(g,mxCylinder);g.prototype.size=20;g.prototype.redrawPath=
-function(b,d,f,c,e,g){d=Math.min(c,e/(.5+Qa));g?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ha)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ha)*d),b.lineTo(.5*d,(1-Ha)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ha),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ha)*d),b.lineTo(0,.75*d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(b,d,f,c,e,g){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=
-this.fill||!g&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,-d);g||(b.moveTo(0,d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};n.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/
-8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,
+function(b,d,f,c,e,g){d=Math.min(c,e/(.5+Qa));g?(b.moveTo(0,.25*d),b.lineTo(.5*d,(.5-Ha)*d),b.lineTo(d,.25*d),b.moveTo(.5*d,(.5-Ha)*d),b.lineTo(.5*d,(1-Ha)*d)):(b.translate((c-d)/2,(e-d)/2),b.moveTo(0,.25*d),b.lineTo(.5*d,d*Ha),b.lineTo(d,.25*d),b.lineTo(d,.75*d),b.lineTo(.5*d,(1-Ha)*d),b.lineTo(0,.75*d),b.close());b.end()};mxCellRenderer.registerShape("isoCube",g);mxUtils.extend(p,mxCylinder);p.prototype.redrawPath=function(b,d,f,c,e,g){d=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(g&&null!=
+this.fill||!g&&null==this.fill)b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,d/2),b.moveTo(0,d),b.curveTo(0,2*d,c,2*d,c,d),g||(b.stroke(),b.begin()),b.translate(0,-d);g||(b.moveTo(0,d),b.curveTo(0,-d/3,c,-d/3,c,d),b.lineTo(c,e-d),b.curveTo(c,e+d/3,0,e+d/3,0,e-d),b.close())};p.prototype.getLabelMargins=function(b){return new mxRectangle(0,2.5*Math.min(b.height/2,Math.round(b.height/
+8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",p);mxUtils.extend(t,mxCylinder);t.prototype.size=30;t.prototype.darkOpacity=0;t.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));b.translate(d,f);b.begin();b.moveTo(0,0);b.lineTo(c-z,0);b.lineTo(c,z);b.lineTo(c,e);b.lineTo(0,e);b.lineTo(0,
0);b.close();b.end();b.fillAndStroke();this.outline||(b.setShadow(!1),0!=g&&(b.setFillAlpha(Math.abs(g)),b.setFillColor(0>g?"#FFFFFF":"#000000"),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.close(),b.fill()),b.begin(),b.moveTo(c-z,0),b.lineTo(c-z,z),b.lineTo(c,z),b.end(),b.stroke())};mxCellRenderer.registerShape("note",t);mxUtils.extend(d,t);mxCellRenderer.registerShape("note2",d);d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,
"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,0)}return null};mxUtils.extend(f,mxShape);f.prototype.isoAngle=15;f.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,z=Math.min(c*Math.tan(z),.5*e);b.translate(d,f);b.begin();b.moveTo(.5*c,0);b.lineTo(c,z);b.lineTo(c,e-z);b.lineTo(.5*c,e);b.lineTo(0,e-z);b.lineTo(0,z);b.close();b.fillAndStroke();b.setShadow(!1);
b.begin();b.moveTo(0,z);b.lineTo(.5*c,2*z);b.lineTo(c,z);b.moveTo(.5*c,2*z);b.lineTo(.5*c,e);b.stroke()};mxCellRenderer.registerShape("isoCube2",f);mxUtils.extend(l,mxShape);l.prototype.size=15;l.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):(b.begin(),b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z),b.lineTo(c,e-z),b.arcTo(.5*c,
-z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(m,mxCylinder);m.prototype.size=15;m.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):
-(b.begin(),g?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),g&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",m);mxUtils.extend(p,mxActor);p.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/
-2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",p);mxUtils.extend(q,mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.arcSize=.1;q.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
+z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke())};mxCellRenderer.registerShape("cylinder2",l);mxUtils.extend(q,mxCylinder);q.prototype.size=15;q.prototype.paintVertexShape=function(b,d,f,c,e){var z=Math.max(0,Math.min(.5*e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"lid",!0);b.translate(d,f);0==z?(b.rect(0,0,c,e),b.fillAndStroke()):
+(b.begin(),g?(b.moveTo(0,z),b.arcTo(.5*c,z,0,0,1,.5*c,0),b.arcTo(.5*c,z,0,0,1,c,z)):(b.moveTo(0,0),b.arcTo(.5*c,z,0,0,0,.5*c,z),b.arcTo(.5*c,z,0,0,0,c,0)),b.lineTo(c,e-z),b.arcTo(.5*c,z,0,0,1,.5*c,e),b.arcTo(.5*c,z,0,0,1,0,e-z),b.close(),b.fillAndStroke(),b.setShadow(!1),g&&(b.begin(),b.moveTo(c,z),b.arcTo(.5*c,z,0,0,1,.5*c,2*z),b.arcTo(.5*c,z,0,0,1,0,z),b.stroke()))};mxCellRenderer.registerShape("cylinder3",q);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(b,d,f,c,e){b.moveTo(0,0);b.quadTo(c/
+2,.5*e,c,0);b.quadTo(.5*c,e/2,c,e);b.quadTo(c/2,.5*e,0,e);b.quadTo(.5*c,e/2,0,0);b.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.prototype.arcSize=.1;n.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));
var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),g=mxUtils.getValue(this.style,"rounded",!1),l=mxUtils.getValue(this.style,"absoluteArcSize",!1),k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));l||(k*=Math.min(c,e));k=Math.min(k,.5*c,.5*(e-f));d=Math.max(d,k);d=Math.min(c-k,d);g||(k=0);b.begin();"left"==z?(b.moveTo(Math.max(k,0),f),b.lineTo(Math.max(k,0),0),b.lineTo(d,0),b.lineTo(d,f)):(b.moveTo(c-d,f),b.lineTo(c-d,0),b.lineTo(c-Math.max(k,0),0),b.lineTo(c-Math.max(k,
-0),f));g?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",q);q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,
+0),f));g?(b.moveTo(0,k+f),b.arcTo(k,k,0,0,1,k,f),b.lineTo(c-k,f),b.arcTo(k,k,0,0,1,c,k+f),b.lineTo(c,e-k),b.arcTo(k,k,0,0,1,c-k,e),b.lineTo(k,e),b.arcTo(k,k,0,0,1,0,e-k)):(b.moveTo(0,f),b.lineTo(c,f),b.lineTo(c,e),b.lineTo(0,e));b.close();b.fillAndStroke();b.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(b.begin(),b.moveTo(c-30,f+20),b.lineTo(c-20,f+10),b.lineTo(c-10,f+20),b.close(),b.stroke())};mxCellRenderer.registerShape("folder",n);n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==
-mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};mxUtils.extend(v,mxCylinder);v.prototype.arcSize=.1;v.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);var z=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=
+mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);var z=mxUtils.getValue(this.style,"rounded",!1),g=mxUtils.getValue(this.style,"absoluteArcSize",!1);d=
parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));f=mxUtils.getValue(this.style,"umlStateConnection",null);g||(d*=Math.min(c,e));d=Math.min(d,.5*c,.5*e);z||(d=0);z=0;null!=f&&(z=10);b.begin();b.moveTo(z,d);b.arcTo(d,d,0,0,1,z+d,0);b.lineTo(c-d,0);b.arcTo(d,d,0,0,1,c,d);b.lineTo(c,e-d);b.arcTo(d,d,0,0,1,c-d,e);b.lineTo(z+d,e);b.arcTo(d,d,0,0,1,z,e-d);b.close();b.fillAndStroke();b.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(b.roundrect(c-40,e-20,
-10,10,3,3),b.stroke(),b.roundrect(c-20,e-20,10,10,3,3),b.stroke(),b.begin(),b.moveTo(c-30,e-15),b.lineTo(c-20,e-15),b.stroke());"connPointRefEntry"==f?(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke()):"connPointRefExit"==f&&(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,.5*e-5),b.lineTo(15,.5*e+5),b.moveTo(15,.5*e-5),b.lineTo(5,.5*e+5),b.stroke())};v.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",
-null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",v);mxUtils.extend(u,mxActor);u.prototype.size=30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,
-d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};y.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,
+10,10,3,3),b.stroke(),b.roundrect(c-20,e-20,10,10,3,3),b.stroke(),b.begin(),b.moveTo(c-30,e-15),b.lineTo(c-20,e-15),b.stroke());"connPointRefEntry"==f?(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke()):"connPointRefExit"==f&&(b.ellipse(0,.5*e-10,20,20),b.fillAndStroke(),b.begin(),b.moveTo(5,.5*e-5),b.lineTo(15,.5*e+5),b.moveTo(15,.5*e-5),b.lineTo(5,.5*e+5),b.stroke())};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",
+null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",u);mxUtils.extend(v,mxActor);v.prototype.size=30;v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(b,d,f,c,e){d=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,
+d)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("card",v);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,d/2);b.quadTo(c/4,1.4*d,c/2,d/2);b.quadTo(3*c/4,d*(1-1.4),c,d/2);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};y.prototype.getLabelBounds=function(b){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",this.size),f=b.width,c=b.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(b.x,b.y+d,f,c-2*d);d*=f;return new mxRectangle(b.x+d,b.y,f-2*d,c)}return b};mxCellRenderer.registerShape("tape",y);mxUtils.extend(x,mxActor);x.prototype.size=.3;x.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,
0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*b.height):null};x.prototype.redrawPath=function(b,d,f,c,e){d=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(0,0);b.lineTo(c,0);b.lineTo(c,e-d/2);b.quadTo(3*c/4,e-1.4*d,c/2,e-d/2);b.quadTo(c/4,e-d*(1-1.4),0,e-d/2);b.lineTo(0,d/2);b.close();b.end()};mxCellRenderer.registerShape("document",x);var $a=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(b,d,f,c){var e=
-mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,b.height*d),0,0)}return null};m.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,
-"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,
-"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};v.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
+mxUtils.getValue(this.style,"size");return null!=e?c*Math.max(0,Math.min(1,e)):$a.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,b.height*d),0,0)}return null};q.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,
+"lid",!0)||(d/=2);return new mxRectangle(0,Math.min(b.height*this.scale,2*d*this.scale),0,Math.max(0,.3*d*this.scale))}return null};n.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var f=mxUtils.getValue(this.style,"tabWidth",15)*this.scale,d=mxUtils.getValue(this.style,"tabHeight",15)*this.scale,c=mxUtils.getValue(this.style,"rounded",!1),e=mxUtils.getValue(this.style,
+"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(z*=Math.min(b.width,b.height));z=Math.min(z,.5*b.width,.5*(b.height-d));c||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(b.width,b.width-f),Math.min(b.height,b.height-d)):new mxRectangle(Math.min(b.width,b.width-f),0,z,Math.min(b.height,b.height-d))}return new mxRectangle(0,Math.min(b.height,d),0,0)}return null};u.prototype.getLabelMargins=function(b){return mxUtils.getValue(this.style,
"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};d.prototype.getLabelMargins=function(b){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(b.height*this.scale,d*this.scale),0,Math.max(0,d*this.scale))}return null};mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=
function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.registerShape("parallelogram",D);mxUtils.extend(C,
mxActor);C.prototype.size=.2;C.prototype.fixedSize=20;C.prototype.isRoundable=function(){return!0};C.prototype.redrawPath=function(b,d,f,c,e){d="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(d,
@@ -2738,9 +2739,9 @@ A);mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prot
"size",this.size))));f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*e),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(0,.5*e)],this.isRounded,f,!0)};mxCellRenderer.registerShape("hexagon",Q);mxUtils.extend(T,mxRectangleShape);T.prototype.isHtmlAllowed=function(){return!1};T.prototype.paintForeground=function(b,d,f,c,e){var z=Math.min(c/5,e/5)+1;b.begin();b.moveTo(d+c/2,f+z);b.lineTo(d+c/2,
f+e-z);b.moveTo(d+z,f+e/2);b.lineTo(d+c-z,f+e/2);b.end();b.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",T);var Xa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};mxRhombus.prototype.paintVertexShape=
function(b,d,f,c,e){Xa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var z=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&(b.setShadow(!1),Xa.apply(this,[b,d,f,c,e]))}};mxUtils.extend(N,mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(b){if(1==this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;
-return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};N.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=g;f+=g;c-=2*g;e-=2*g;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var g=0,z;do{z=mxCellRenderer.defaultShapes[this.style["symbol"+g]];if(null!=z){var l=this.style["symbol"+g+"Align"],
-k=this.style["symbol"+g+"VerticalAlign"],m=this.style["symbol"+g+"Width"],p=this.style["symbol"+g+"Height"],q=this.style["symbol"+g+"Spacing"]||0,oa=this.style["symbol"+g+"VSpacing"]||q,E=this.style["symbol"+g+"ArcSpacing"];null!=E&&(E*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),q+=E,oa+=E);var E=d,ua=f,E=l==mxConstants.ALIGN_CENTER?E+(c-m)/2:l==mxConstants.ALIGN_RIGHT?E+(c-m-q):E+q,ua=k==mxConstants.ALIGN_MIDDLE?ua+(e-p)/2:k==mxConstants.ALIGN_BOTTOM?ua+(e-p-oa):ua+oa;b.save();l=new z;
-l.style=this.style;z.prototype.paintVertexShape.call(l,b,E,ua,m,p);b.restore()}g++}while(null!=z)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(O,mxCylinder);O.prototype.redrawPath=function(b,d,f,c,e,g){g?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",O);mxUtils.extend(ha,mxShape);ha.prototype.paintBackground=
+return new mxRectangle(b.x+d,b.y+d,b.width-2*d,b.height-2*d)}return b};N.prototype.paintForeground=function(b,d,f,c,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var z=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=z;f+=z;c-=2*z;e-=2*z;0<c&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}b.setDashed(!1);var z=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+z]];if(null!=g){var l=this.style["symbol"+z+"Align"],
+k=this.style["symbol"+z+"VerticalAlign"],m=this.style["symbol"+z+"Width"],q=this.style["symbol"+z+"Height"],n=this.style["symbol"+z+"Spacing"]||0,oa=this.style["symbol"+z+"VSpacing"]||n,E=this.style["symbol"+z+"ArcSpacing"];null!=E&&(E*=this.getArcSize(c+this.strokewidth,e+this.strokewidth),n+=E,oa+=E);var E=d,ua=f,E=l==mxConstants.ALIGN_CENTER?E+(c-m)/2:l==mxConstants.ALIGN_RIGHT?E+(c-m-n):E+n,ua=k==mxConstants.ALIGN_MIDDLE?ua+(e-q)/2:k==mxConstants.ALIGN_BOTTOM?ua+(e-q-oa):ua+oa;b.save();l=new g;
+l.style=this.style;g.prototype.paintVertexShape.call(l,b,E,ua,m,q);b.restore()}z++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",N);mxUtils.extend(O,mxCylinder);O.prototype.redrawPath=function(b,d,f,c,e,g){g?(b.moveTo(0,0),b.lineTo(c/2,e/2),b.lineTo(c,0),b.end()):(b.moveTo(0,0),b.lineTo(c,0),b.lineTo(c,e),b.lineTo(0,e),b.close())};mxCellRenderer.registerShape("message",O);mxUtils.extend(ha,mxShape);ha.prototype.paintBackground=
function(b,d,f,c,e){b.translate(d,f);b.ellipse(c/4,0,c/2,e/4);b.fillAndStroke();b.begin();b.moveTo(c/2,e/4);b.lineTo(c/2,2*e/3);b.moveTo(c/2,e/3);b.lineTo(0,e/3);b.moveTo(c/2,e/3);b.lineTo(c,e/3);b.moveTo(c/2,2*e/3);b.lineTo(0,e);b.moveTo(c/2,2*e/3);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlActor",ha);mxUtils.extend(E,mxShape);E.prototype.getLabelMargins=function(b){return new mxRectangle(b.width/6,0,0,0)};E.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();
b.moveTo(0,e/4);b.lineTo(0,3*e/4);b.end();b.stroke();b.begin();b.moveTo(0,e/2);b.lineTo(c/6,e/2);b.end();b.stroke();b.ellipse(c/6,0,5*c/6,e);b.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",E);mxUtils.extend(B,mxEllipse);B.prototype.paintVertexShape=function(b,d,f,c,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);b.begin();b.moveTo(d+c/8,f+e);b.lineTo(d+7*c/8,f+e);b.end();b.stroke()};mxCellRenderer.registerShape("umlEntity",B);mxUtils.extend(F,mxShape);F.prototype.paintVertexShape=
function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(c,0);b.lineTo(0,e);b.moveTo(0,0);b.lineTo(c,e);b.end();b.stroke()};mxCellRenderer.registerShape("umlDestroy",F);mxUtils.extend(Z,mxShape);Z.prototype.getLabelBounds=function(b){return new mxRectangle(b.x,b.y+b.height/8,b.width,7*b.height/8)};Z.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(3*c/8,e/8*1.1);b.lineTo(5*c/8,0);b.end();b.stroke();b.ellipse(0,e/8,c,7*e/8);b.fillAndStroke()};Z.prototype.paintForeground=
@@ -2757,11 +2758,11 @@ d,f,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter
mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?C.prototype.fixedSize:C.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(.5*k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):
m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z)]);m=b.getCenterX();b=b.getCenterY();b=new mxPoint(m,b);c&&(f.x<l||f.x>l+k?b.y=f.y:b.x=f.x);return mxUtils.getPerimeterPoint(z,b,f)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?M.prototype.fixedSize:M.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,
-"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,p=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,b),new mxPoint(l,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,
-g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,b),new mxPoint(l+k,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(p,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(p,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(p,z+
-e),new mxPoint(l+k,z),new mxPoint(l+k,z+m-e),new mxPoint(p,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]);p=new mxPoint(p,b);c&&(f.x<l||f.x>l+k?p.y=f.y:p.x=f.x);return mxUtils.getPerimeterPoint(z,p,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?Q.prototype.fixedSize:Q.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,
-m=b.height,p=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(p,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(p,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e),new mxPoint(p,z)]):(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
-e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]);p=new mxPoint(p,b);c&&(f.x<l||f.x>l+k?p.y=f.y:p.x=f.x);return mxUtils.getPerimeterPoint(z,p,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ca,mxShape);ca.prototype.size=10;ca.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-g)/2,0,g,g);
+"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l,z+m),new mxPoint(l+e,b),new mxPoint(l,z)]):d==mxConstants.DIRECTION_WEST?(e=e?Math.max(0,Math.min(k,
+g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+e,z),new mxPoint(l+k,z),new mxPoint(l+k-e,b),new mxPoint(l+k,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]):d==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z+e),new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m),new mxPoint(q,z+m-e),new mxPoint(l,z+m),new mxPoint(l,z+e)]):(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(l,z),new mxPoint(q,z+
+e),new mxPoint(l+k,z),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z)]);q=new mxPoint(q,b);c&&(f.x<l||f.x>l+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(b,d,f,c){var e="0"!=mxUtils.getValue(d.style,"fixedSize","0"),g=e?Q.prototype.fixedSize:Q.prototype.size;null!=d&&(g=mxUtils.getValue(d.style,"size",g));e&&(g*=d.view.scale);var l=b.x,z=b.y,k=b.width,
+m=b.height,q=b.getCenterX();b=b.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=e?Math.max(0,Math.min(m,g)):m*Math.max(0,Math.min(1,g)),z=[new mxPoint(q,z),new mxPoint(l+k,z+e),new mxPoint(l+k,z+m-e),new mxPoint(q,z+m),new mxPoint(l,z+m-e),new mxPoint(l,z+e),new mxPoint(q,z)]):(e=e?Math.max(0,Math.min(k,g)):k*Math.max(0,Math.min(1,g)),z=[new mxPoint(l+
+e,z),new mxPoint(l+k-e,z),new mxPoint(l+k,b),new mxPoint(l+k-e,z+m),new mxPoint(l+e,z+m),new mxPoint(l,b),new mxPoint(l+e,z)]);q=new mxPoint(q,b);c&&(f.x<l||f.x>l+k?q.y=f.y:q.x=f.x);return mxUtils.getPerimeterPoint(z,q,f)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ca,mxShape);ca.prototype.size=10;ca.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));b.translate(d,f);b.ellipse((c-g)/2,0,g,g);
b.fillAndStroke();b.begin();b.moveTo(c/2,g);b.lineTo(c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("lollipop",ca);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.inset=2;da.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),l=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;b.translate(d,f);b.begin();b.moveTo(c/2,g+l);b.lineTo(c/2,e);b.end();b.stroke();b.begin();b.moveTo((c-g)/2-l,g/2);b.quadTo((c-
g)/2-l,g+l,c/2,g+l);b.quadTo((c+g)/2+l,g+l,(c+g)/2+l,g/2);b.end();b.stroke()};mxCellRenderer.registerShape("requires",da);mxUtils.extend(ka,mxShape);ka.prototype.paintBackground=function(b,d,f,c,e){b.translate(d,f);b.begin();b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.end();b.stroke()};mxCellRenderer.registerShape("requiredInterface",ka);mxUtils.extend(ma,mxShape);ma.prototype.inset=2;ma.prototype.paintBackground=function(b,d,f,c,e){var g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+
this.strokewidth;b.translate(d,f);b.ellipse(0,g,c-2*g,e-2*g);b.fillAndStroke();b.begin();b.moveTo(c/2,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,c/2,e);b.end();b.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ma);mxUtils.extend(ia,mxCylinder);ia.prototype.jettyWidth=20;ia.prototype.jettyHeight=10;ia.prototype.redrawPath=function(b,d,f,c,e,g){var l=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));
@@ -2795,58 +2796,58 @@ dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Inde
type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},
{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",
type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",
-dispName:"Fold"}]}];Y.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};Y.prototype.strictDrawShape=function(b,d,f,c,e,g){var l=g&&g.rectStyle?g.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=g&&g.absoluteCornerSize?g.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=g&&g.size?g.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),p=g&&g.rectOutline?g.rectOutline:
-mxUtils.getValue(this.style,"rectOutline",this.rectOutline),q=g&&g.indent?g.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=g&&g.dashed?g.dashed:mxUtils.getValue(this.style,"dashed",!1),E=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),u=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,q)),n=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),v=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),B=g&&g.bottom?g.bottom:
+dispName:"Fold"}]}];Y.prototype.paintVertexShape=function(b,d,f,c,e){b.translate(d,f);this.strictDrawShape(b,0,0,c,e)};Y.prototype.strictDrawShape=function(b,d,f,c,e,g){var l=g&&g.rectStyle?g.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),k=g&&g.absoluteCornerSize?g.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),m=g&&g.size?g.size:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),q=g&&g.rectOutline?g.rectOutline:
+mxUtils.getValue(this.style,"rectOutline",this.rectOutline),n=g&&g.indent?g.indent:Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),z=g&&g.dashed?g.dashed:mxUtils.getValue(this.style,"dashed",!1),E=g&&g.dashPattern?g.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),v=g&&g.relIndent?g.relIndent:Math.max(0,Math.min(50,n)),u=g&&g.top?g.top:mxUtils.getValue(this.style,"top",!0),p=g&&g.right?g.right:mxUtils.getValue(this.style,"right",!0),B=g&&g.bottom?g.bottom:
mxUtils.getValue(this.style,"bottom",!0),F=g&&g.left?g.left:mxUtils.getValue(this.style,"left",!0),x=g&&g.topLeftStyle?g.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),t=g&&g.topRightStyle?g.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),I=g&&g.bottomRightStyle?g.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),y=g&&g.bottomLeftStyle?g.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),C=g&&g.fillColor?g.fillColor:
mxUtils.getValue(this.style,"fillColor","#ffffff");g&&g.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Z=g&&g.strokeWidth?g.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),A=g&&g.fillColor2?g.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),N=g&&g.gradientColor2?g.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),ua=g&&g.gradientDirection2?g.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),oa=g&&g.opacity?g.opacity:
-mxUtils.getValue(this.style,"opacity","100"),ca=Math.max(0,Math.min(50,m));g=Y.prototype;b.setDashed(z);E&&""!=E&&b.setDashPattern(E);b.setStrokeWidth(Z);m=Math.min(.5*e,.5*c,m);k||(m=ca*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(q=Math.min(u*Math.min(c,e)/100));q=Math.min(q,.5*Math.min(c,e)-m);(n||v||B||F)&&"frame"!=p&&(b.begin(),n?g.moveNW(b,d,f,c,e,l,x,m,F):b.moveTo(0,0),n&&g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),v&&g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,
-c,e,l,I,m,B),B&&g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),F&&g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(A),z=k=oa,"none"==A&&(k=0),"none"==N&&(z=0),b.setGradient(A,N,0,0,c,e,ua,k,z),b.begin(),n?g.moveNWInner(b,d,f,c,e,l,x,m,q,n,F):b.moveTo(q,0),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),F&&B&&g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),B&&v&&g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,
-d,f,c,e,l,t,m,q,n,v),v&&n&&g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),n&&F&&g.paintNWInner(b,d,f,c,e,l,x,m,q),b.fill(),"none"==C&&(b.begin(),g.paintFolds(b,d,f,c,e,l,x,t,I,y,m,n,v,B,F),b.stroke()));n||v||B||!F?n||v||!B||F?!n&&!v&&B&&F?"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),g.paintSWInner(b,
-d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.lineNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),b.close(),b.fillAndStroke()):n||!v||B||F?!n&&v&&!B&&F?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),"double"==
-p&&(g.moveNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F)),b.stroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.lineNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),b.close(),b.fillAndStroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,
-l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),b.close(),b.fillAndStroke()):!n&&v&&B&&!F?"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,
-d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),b.close(),b.fillAndStroke()):!n&&v&&B&&F?"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),"double"==p&&(g.moveNWInner(b,
-d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.lineNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),g.paintSWInner(b,
-d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),b.close(),b.fillAndStroke()):!n||v||B||F?n&&!v&&!B&&F?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F)),b.stroke()):
-(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.lineNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),b.close(),b.fillAndStroke()):n&&!v&&B&&!F?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n)),b.stroke(),b.begin(),
-g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.lineNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),b.close(),b.fillAndStroke(),b.begin(),g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),b.close(),b.fillAndStroke()):
-n&&!v&&B&&F?"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,I,
-m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.lineNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),b.close(),b.fillAndStroke()):n&&v&&!B&&!F?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,
-v),g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,
-c,e,l,x,m,q,F,n),b.close(),b.fillAndStroke()):n&&v&&!B&&F?"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F)),b.stroke()):
-(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),b.close(),b.fillAndStroke()):n&&v&&B&&!F?"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,
-F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,
-m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),b.close(),b.fillAndStroke()):n&&v&&B&&F&&("frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,m,
-n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),b.close(),"double"==p&&(g.moveSWInner(b,d,f,c,e,l,y,m,q,F),g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,
-e,l,y,m,q,B,F),b.close()),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.paintNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),b.close(),g.moveSWInner(b,d,f,c,e,l,y,m,q,F),g.paintSWInner(b,d,f,c,e,l,y,m,q,B),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),g.paintSEInner(b,d,f,c,e,l,I,m,q),g.paintRightInner(b,d,f,c,
-e,l,t,m,q,n,v),g.paintNEInner(b,d,f,c,e,l,t,m,q),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n),g.paintNWInner(b,d,f,c,e,l,x,m,q),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),b.close(),b.fillAndStroke())):"frame"!=p?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),"double"==p&&(g.moveNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,e,l,x,m,q,F,n)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,v),g.lineNEInner(b,d,f,c,e,l,t,m,q,v),g.paintTopInner(b,d,f,c,
-e,l,x,m,q,F,n),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==p&&(g.moveSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,n),g.paintRight(b,d,f,c,e,l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,q,B),g.paintRightInner(b,d,f,c,e,l,t,m,q,n,v),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==p&&
-(g.moveSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,v),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,q,F),g.paintBottomInner(b,d,f,c,e,l,I,m,q,v,B),b.close(),b.fillAndStroke()):"frame"!=p?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,n),"double"==p&&(g.moveNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,
-d,f,c,e,l,x,m,n),g.lineNWInner(b,d,f,c,e,l,x,m,q,n,F),g.paintLeftInner(b,d,f,c,e,l,y,m,q,B,F),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,c,e,l,x,t,I,y,m,n,v,B,F);b.stroke()};Y.prototype.moveNW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,0):b.moveTo(0,m)};Y.prototype.moveNE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(c,0):b.moveTo(c-m,0)};Y.prototype.moveSE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&
+mxUtils.getValue(this.style,"opacity","100"),ca=Math.max(0,Math.min(50,m));g=Y.prototype;b.setDashed(z);E&&""!=E&&b.setDashPattern(E);b.setStrokeWidth(Z);m=Math.min(.5*e,.5*c,m);k||(m=ca*Math.min(c,e)/100);m=Math.min(m,.5*Math.min(c,e));k||(n=Math.min(v*Math.min(c,e)/100));n=Math.min(n,.5*Math.min(c,e)-m);(u||p||B||F)&&"frame"!=q&&(b.begin(),u?g.moveNW(b,d,f,c,e,l,x,m,F):b.moveTo(0,0),u&&g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),p&&g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,
+c,e,l,I,m,B),B&&g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),F&&g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),b.close(),b.fill(),b.setShadow(!1),b.setFillColor(A),z=k=oa,"none"==A&&(k=0),"none"==N&&(z=0),b.setGradient(A,N,0,0,c,e,ua,k,z),b.begin(),u?g.moveNWInner(b,d,f,c,e,l,x,m,n,u,F):b.moveTo(n,0),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),F&&B&&g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),B&&p&&g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,
+d,f,c,e,l,t,m,n,u,p),p&&u&&g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),u&&F&&g.paintNWInner(b,d,f,c,e,l,x,m,n),b.fill(),"none"==C&&(b.begin(),g.paintFolds(b,d,f,c,e,l,x,t,I,y,m,u,p,B,F),b.stroke()));u||p||B||!F?u||p||!B||F?!u&&!p&&B&&F?"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),g.paintSWInner(b,
+d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),b.close(),b.fillAndStroke()):u||!p||B||F?!u&&p&&!B&&F?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==
+q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F)),b.stroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),b.close(),b.fillAndStroke(),b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,
+l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),b.close(),b.fillAndStroke()):!u&&p&&B&&!F?"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,
+d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),b.close(),b.fillAndStroke()):!u&&p&&B&&F?"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==q&&(g.moveNWInner(b,
+d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),g.paintSWInner(b,
+d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),b.close(),b.fillAndStroke()):!u||p||B||F?u&&!p&&!B&&F?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F)),b.stroke()):
+(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.lineNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),b.close(),b.fillAndStroke()):u&&!p&&B&&!F?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u)),b.stroke(),b.begin(),
+g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.lineNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),b.close(),b.fillAndStroke(),b.begin(),g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),b.close(),b.fillAndStroke()):
+u&&!p&&B&&F?"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,I,
+m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.lineNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),b.close(),b.fillAndStroke()):u&&p&&!B&&!F?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,
+p),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,
+c,e,l,x,m,n,F,u),b.close(),b.fillAndStroke()):u&&p&&!B&&F?"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F)),b.stroke()):
+(b.begin(),g.moveSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),b.close(),b.fillAndStroke()):u&&p&&B&&!F?"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,
+F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,
+m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),b.close(),b.fillAndStroke()):u&&p&&B&&F&&("frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,m,
+u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),b.close(),"double"==q&&(g.moveSWInner(b,d,f,c,e,l,y,m,n,F),g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,
+e,l,y,m,n,B,F),b.close()),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.paintNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.paintSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.paintSW(b,d,f,c,e,l,y,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),b.close(),g.moveSWInner(b,d,f,c,e,l,y,m,n,F),g.paintSWInner(b,d,f,c,e,l,y,m,n,B),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),g.paintSEInner(b,d,f,c,e,l,I,m,n),g.paintRightInner(b,d,f,c,
+e,l,t,m,n,u,p),g.paintNEInner(b,d,f,c,e,l,t,m,n),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u),g.paintNWInner(b,d,f,c,e,l,x,m,n),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),b.close(),b.fillAndStroke())):"frame"!=q?(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),"double"==q&&(g.moveNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,e,l,x,m,n,F,u)),b.stroke()):(b.begin(),g.moveNW(b,d,f,c,e,l,x,m,F),g.paintTop(b,d,f,c,e,l,t,m,p),g.lineNEInner(b,d,f,c,e,l,t,m,n,p),g.paintTopInner(b,d,f,c,
+e,l,x,m,n,F,u),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),"double"==q&&(g.moveSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p)),b.stroke()):(b.begin(),g.moveNE(b,d,f,c,e,l,t,m,u),g.paintRight(b,d,f,c,e,l,I,m,B),g.lineSEInner(b,d,f,c,e,l,I,m,n,B),g.paintRightInner(b,d,f,c,e,l,t,m,n,u,p),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),"double"==q&&
+(g.moveSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B)),b.stroke()):(b.begin(),g.moveSE(b,d,f,c,e,l,I,m,p),g.paintBottom(b,d,f,c,e,l,y,m,F),g.lineSWInner(b,d,f,c,e,l,y,m,n,F),g.paintBottomInner(b,d,f,c,e,l,I,m,n,p,B),b.close(),b.fillAndStroke()):"frame"!=q?(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,d,f,c,e,l,x,m,u),"double"==q&&(g.moveNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F)),b.stroke()):(b.begin(),g.moveSW(b,d,f,c,e,l,x,m,B),g.paintLeft(b,
+d,f,c,e,l,x,m,u),g.lineNWInner(b,d,f,c,e,l,x,m,n,u,F),g.paintLeftInner(b,d,f,c,e,l,y,m,n,B,F),b.close(),b.fillAndStroke());b.begin();g.paintFolds(b,d,f,c,e,l,x,t,I,y,m,u,p,B,F);b.stroke()};Y.prototype.moveNW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,0):b.moveTo(0,m)};Y.prototype.moveNE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(c,0):b.moveTo(c-m,0)};Y.prototype.moveSE=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&
"square"==g||!k?b.moveTo(c,e):b.moveTo(c,e-m)};Y.prototype.moveSW=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.moveTo(0,e):b.moveTo(m,e)};Y.prototype.paintNW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,m,0)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(m,0);else b.lineTo(0,0)};Y.prototype.paintTop=
function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(c,0):b.lineTo(c-m,0)};Y.prototype.paintNE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c,m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c,m);else b.lineTo(c,0)};Y.prototype.paintRight=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==
l&&"square"==g||!k?b.lineTo(c,e):b.lineTo(c,e-m)};Y.prototype.paintLeft=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,0):b.lineTo(0,m)};Y.prototype.paintSE=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,c-m,e)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-m,e);else b.lineTo(c,
e)};Y.prototype.paintBottom=function(b,d,f,c,e,g,l,m,k){"square"==l||"default"==l&&"square"==g||!k?b.lineTo(0,e):b.lineTo(m,e)};Y.prototype.paintSW=function(b,d,f,c,e,g,l,m,k){if(k)if("rounded"==l||"default"==l&&"rounded"==g||"invRound"==l||"default"==l&&"invRound"==g){d=0;if("rounded"==l||"default"==l&&"rounded"==g)d=1;b.arcTo(m,m,0,0,d,0,e-m)}else("snip"==l||"default"==l&&"snip"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(0,e-m);else b.lineTo(0,e)};Y.prototype.paintNWInner=function(b,d,f,
-c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,k,k+m);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(k,.5*k+m);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};Y.prototype.paintTopInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(0,k):q&&!p?b.lineTo(k,0):q?"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&
+c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,k,.5*k+m);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,k,k+m);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(k,.5*k+m);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,k+m),b.lineTo(k,k+m)};Y.prototype.paintTopInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(0,k):n&&!q?b.lineTo(k,0):n?"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&
"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(m+.5*k,k):b.lineTo(m+k,k):b.lineTo(0,k):b.lineTo(0,0)};Y.prototype.paintNEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-m-.5*k,k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-m-k,k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-m-.5*k,k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,m+k),b.lineTo(c-m-k,k)};Y.prototype.paintRightInner=
-function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(c-k,0):q&&!p?b.lineTo(c,k):q?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};Y.prototype.paintLeftInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(k,e):q&&!p?b.lineTo(0,e-k):q?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
+function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(c-k,0):n&&!q?b.lineTo(c,k):n?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,m+.5*k):b.lineTo(c-k,m+k):b.lineTo(c-k,0):b.lineTo(c,0)};Y.prototype.paintLeftInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(k,e):n&&!q?b.lineTo(0,e-k):n?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
l&&"snip"==g?b.lineTo(k,e-m-.5*k):b.lineTo(k,e-m-k):b.lineTo(k,e):b.lineTo(0,e)};Y.prototype.paintSEInner=function(b,d,f,c,e,g,l,m,k){if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,c-k,e-m-.5*k);else if("invRound"==l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,c-k,e-m-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(c-k,e-m-.5*k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(c-m-k,e-m-k),b.lineTo(c-k,e-m-k)};Y.prototype.paintBottomInner=function(b,d,f,c,
-e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(c,e-k):q&&!p?b.lineTo(c-k,e):"square"==l||"default"==l&&"square"==g||!q?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};Y.prototype.paintSWInner=function(b,d,f,c,e,g,l,m,k,q){if(!q)b.lineTo(k,e);else if("square"==l||"default"==l&&"square"==g)b.lineTo(k,e-k);else if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==
-l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(m+.5*k,e-k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};Y.prototype.moveSWInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.moveTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,
-e-m-k):b.moveTo(0,e-k)};Y.prototype.lineSWInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};Y.prototype.moveSEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.moveTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==
-g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,e-m-k):b.moveTo(c-k,e)};Y.prototype.lineSEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,e-m-k):b.lineTo(c-
-k,e)};Y.prototype.moveNEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g||q?b.moveTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};Y.prototype.lineNEInner=function(b,d,f,c,e,g,l,m,k,q){q?"square"==l||"default"==l&&"square"==g||q?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
-l&&"snip"==g?b.lineTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};Y.prototype.moveNWInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.moveTo(k,0):q&&!p?b.moveTo(0,k):"square"==l||"default"==l&&"square"==g?b.moveTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,m+k):b.moveTo(0,
-0)};Y.prototype.lineNWInner=function(b,d,f,c,e,g,l,m,k,q,p){q||p?!q&&p?b.lineTo(k,0):q&&!p?b.lineTo(0,k):"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,m+k):b.lineTo(0,0)};Y.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,q,p,E,n,u,v){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==q)("fold"==l||"default"==
-l&&"fold"==g)&&E&&v&&(b.moveTo(0,p),b.lineTo(p,p),b.lineTo(p,0)),("fold"==m||"default"==m&&"fold"==g)&&E&&n&&(b.moveTo(c-p,0),b.lineTo(c-p,p),b.lineTo(c,p)),("fold"==k||"default"==k&&"fold"==g)&&u&&n&&(b.moveTo(c-p,e),b.lineTo(c-p,e-p),b.lineTo(c,e-p)),("fold"==q||"default"==q&&"fold"==g)&&u&&v&&(b.moveTo(0,e-p),b.lineTo(p,e-p),b.lineTo(p,e))};mxCellRenderer.registerShape(Y.prototype.cst.RECT2,Y);Y.prototype.constraints=null;mxUtils.extend(Ga,mxConnector);Ga.prototype.origPaintEdgeShape=Ga.prototype.paintEdgeShape;
+e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(c,e-k):n&&!q?b.lineTo(c-k,e):"square"==l||"default"==l&&"square"==g||!n?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-m-.5*k,e-k):b.lineTo(c-m-k,e-k):b.lineTo(c,e)};Y.prototype.paintSWInner=function(b,d,f,c,e,g,l,m,k,n){if(!n)b.lineTo(k,e);else if("square"==l||"default"==l&&"square"==g)b.lineTo(k,e-k);else if("rounded"==l||"default"==l&&"rounded"==g)b.arcTo(m-.5*k,m-.5*k,0,0,0,m+.5*k,e-k);else if("invRound"==
+l||"default"==l&&"invRound"==g)b.arcTo(m+k,m+k,0,0,1,m+k,e-k);else if("snip"==l||"default"==l&&"snip"==g)b.lineTo(m+.5*k,e-k);else if("fold"==l||"default"==l&&"fold"==g)b.lineTo(k+m,e-m-k),b.lineTo(k+m,e-k)};Y.prototype.moveSWInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.moveTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,
+e-m-k):b.moveTo(0,e-k)};Y.prototype.lineSWInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.lineTo(k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,e-m-k):b.lineTo(0,e-k)};Y.prototype.moveSEInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.moveTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==
+g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,e-m-k):b.moveTo(c-k,e)};Y.prototype.lineSEInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g?b.lineTo(c-k,e-k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(c-k,e-m-.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,e-m-k):b.lineTo(c-
+k,e)};Y.prototype.moveNEInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g||n?b.moveTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(c-k,m+k):b.moveTo(c,k)};Y.prototype.lineNEInner=function(b,d,f,c,e,g,l,m,k,n){n?"square"==l||"default"==l&&"square"==g||n?b.lineTo(c-k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==
+l&&"snip"==g?b.lineTo(c-k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(c-k,m+k):b.lineTo(c,k)};Y.prototype.moveNWInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.moveTo(k,0):n&&!q?b.moveTo(0,k):"square"==l||"default"==l&&"square"==g?b.moveTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.moveTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.moveTo(k,m+k):b.moveTo(0,
+0)};Y.prototype.lineNWInner=function(b,d,f,c,e,g,l,m,k,n,q){n||q?!n&&q?b.lineTo(k,0):n&&!q?b.lineTo(0,k):"square"==l||"default"==l&&"square"==g?b.lineTo(k,k):"rounded"==l||"default"==l&&"rounded"==g||"snip"==l||"default"==l&&"snip"==g?b.lineTo(k,m+.5*k):("invRound"==l||"default"==l&&"invRound"==g||"fold"==l||"default"==l&&"fold"==g)&&b.lineTo(k,m+k):b.lineTo(0,0)};Y.prototype.paintFolds=function(b,d,f,c,e,g,l,m,k,n,q,E,u,p,v){if("fold"==g||"fold"==l||"fold"==m||"fold"==k||"fold"==n)("fold"==l||"default"==
+l&&"fold"==g)&&E&&v&&(b.moveTo(0,q),b.lineTo(q,q),b.lineTo(q,0)),("fold"==m||"default"==m&&"fold"==g)&&E&&u&&(b.moveTo(c-q,0),b.lineTo(c-q,q),b.lineTo(c,q)),("fold"==k||"default"==k&&"fold"==g)&&p&&u&&(b.moveTo(c-q,e),b.lineTo(c-q,e-q),b.lineTo(c,e-q)),("fold"==n||"default"==n&&"fold"==g)&&p&&v&&(b.moveTo(0,e-q),b.lineTo(q,e-q),b.lineTo(q,e))};mxCellRenderer.registerShape(Y.prototype.cst.RECT2,Y);Y.prototype.constraints=null;mxUtils.extend(Ga,mxConnector);Ga.prototype.origPaintEdgeShape=Ga.prototype.paintEdgeShape;
Ga.prototype.paintEdgeShape=function(b,d,f){for(var c=[],e=0;e<d.length;e++)c.push(mxUtils.clone(d[e]));var e=b.state.dashed,g=b.state.fixDash;Ga.prototype.origPaintEdgeShape.apply(this,[b,c,f]);3<=b.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&(b.setStrokeColor(c),b.setStrokeWidth(b.state.strokeWidth-2),b.setDashed(e,g),Ga.prototype.origPaintEdgeShape.apply(this,[b,d,f])))};mxCellRenderer.registerShape("filledEdge",Ga);"undefined"!==typeof StyleFormatPanel&&function(){var b=
-StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),E=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-p/2-E/2,c.y-E/2+p/2);b.lineTo(c.x+E/2-3*p/2,c.y-3*E/2-p/2);b.stroke()}});mxMarker.addMarker("box",
-function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),E=g*(l+k+1),n=c.x+p/2,z=c.y+E/2;c.x-=p;c.y-=E;return function(){b.begin();b.moveTo(n-p/2-E/2,z-E/2+p/2);b.lineTo(n-p/2+E/2,z-E/2-p/2);b.lineTo(n+E/2-3*p/2,z-3*E/2-p/2);b.lineTo(n-E/2-3*p/2,z-3*E/2+p/2);b.close();q?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,g,l,m,k,q){var p=e*(l+k+1),E=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-p/2-E/2,c.y-E/2+p/2);b.lineTo(c.x+E/2-3*p/2,c.y-3*E/2-p/2);b.moveTo(c.x-p/2+E/2,c.y-
-E/2-p/2);b.lineTo(c.x-E/2-3*p/2,c.y-3*E/2+p/2);b.stroke()}});mxMarker.addMarker("circle",Ua);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,g,l,m,k,q){var p=c.clone(),E=Ua.apply(this,arguments),n=e*(l+2*k),u=g*(l+2*k);return function(){E.apply(this,arguments);b.begin();b.moveTo(p.x-e*k,p.y-g*k);b.lineTo(p.x-2*n+e*k,p.y-2*u+g*k);b.moveTo(p.x-n-u+g*k,p.y-u+n-e*k);b.lineTo(p.x+u-n-g*k,p.y-u-n+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,m,k,p){var q=e*(l+k+1),E=g*(l+
-k+1),n=c.clone();c.x-=q;c.y-=E;return function(){b.begin();b.moveTo(n.x-E,n.y+q);b.quadTo(c.x-E,c.y+q,c.x,c.y);b.quadTo(c.x+E,c.y-q,n.x+E,n.y-q);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,g,l,m,k,q){d=e*k*1.118;f=g*k*1.118;e*=l+k;g*=l+k;var p=c.clone();p.x-=d;p.y-=f;c.x+=1*-e-d;c.y+=1*-g-f;return function(){b.begin();b.moveTo(p.x,p.y);m?b.lineTo(p.x-e-g/2,p.y-g+e/2):b.lineTo(p.x+g/2-e,p.y-g-e/2);b.lineTo(p.x-e,p.y-g);b.close();q?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",
-function(b){b=null!=b?b:2;return function(d,f,c,e,g,l,m,k,p,q){g*=m+p;l*=m+p;var E=e.clone();return function(){d.begin();d.moveTo(E.x,E.y);k?d.lineTo(E.x-g-l/b,E.y-l+g/b):d.lineTo(E.x+l/b-g,E.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return La(b,["width"],d,function(d,c,e,g,l){l=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(g.x+c*d/4+e*l/2,g.y+e*d/4-c*l/2)},function(d,c,e,g,l,m){d=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));b.style.width=
-Math.round(2*d)/b.view.scale-f})},La=function(b,d,f,c,e){return ea(b,d,function(d){var e=b.absolutePoints,g=e.length-1;d=b.view.translate;var l=b.view.scale,m=f?e[0]:e[g],e=f?e[1]:e[g-1],g=e.x-m.x,k=e.y-m.y,p=Math.sqrt(g*g+k*k),m=c.call(this,p,g/p,k/p,m,e);return new mxPoint(m.x/l-d.x,m.y/l-d.y)},function(d,c,g){var l=b.absolutePoints,m=l.length-1;d=b.view.translate;var k=b.view.scale,p=f?l[0]:l[m],l=f?l[1]:l[m-1],m=l.x-p.x,q=l.y-p.y,E=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,
-E,m/E,q/E,p,l,c,g)})},Da=function(b){return function(d){return[ea(d,["arrowWidth","arrowSize"],function(d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",aa.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",aa.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,
+StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),f=b.apply(this,arguments);"umlFrame"==d.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(b,d,f,c,e,g,l,m,k,n){var q=e*(l+k+1),E=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-E/2,c.y-E/2+q/2);b.lineTo(c.x+E/2-3*q/2,c.y-3*E/2-q/2);b.stroke()}});mxMarker.addMarker("box",
+function(b,d,f,c,e,g,l,m,k,n){var q=e*(l+k+1),E=g*(l+k+1),u=c.x+q/2,z=c.y+E/2;c.x-=q;c.y-=E;return function(){b.begin();b.moveTo(u-q/2-E/2,z-E/2+q/2);b.lineTo(u-q/2+E/2,z-E/2-q/2);b.lineTo(u+E/2-3*q/2,z-3*E/2-q/2);b.lineTo(u-E/2-3*q/2,z-3*E/2+q/2);b.close();n?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("cross",function(b,d,f,c,e,g,l,m,k,n){var q=e*(l+k+1),E=g*(l+k+1);return function(){b.begin();b.moveTo(c.x-q/2-E/2,c.y-E/2+q/2);b.lineTo(c.x+E/2-3*q/2,c.y-3*E/2-q/2);b.moveTo(c.x-q/2+E/2,c.y-
+E/2-q/2);b.lineTo(c.x-E/2-3*q/2,c.y-3*E/2+q/2);b.stroke()}});mxMarker.addMarker("circle",Ua);mxMarker.addMarker("circlePlus",function(b,d,f,c,e,g,l,m,k,q){var n=c.clone(),E=Ua.apply(this,arguments),u=e*(l+2*k),p=g*(l+2*k);return function(){E.apply(this,arguments);b.begin();b.moveTo(n.x-e*k,n.y-g*k);b.lineTo(n.x-2*u+e*k,n.y-2*p+g*k);b.moveTo(n.x-u-p+g*k,n.y-p+u-e*k);b.lineTo(n.x+p-u-g*k,n.y-p-u+e*k);b.stroke()}});mxMarker.addMarker("halfCircle",function(b,d,f,c,e,g,l,m,k,n){var q=e*(l+k+1),E=g*(l+
+k+1),u=c.clone();c.x-=q;c.y-=E;return function(){b.begin();b.moveTo(u.x-E,u.y+q);b.quadTo(c.x-E,c.y+q,c.x,c.y);b.quadTo(c.x+E,c.y-q,u.x+E,u.y-q);b.stroke()}});mxMarker.addMarker("async",function(b,d,f,c,e,g,l,m,k,q){d=e*k*1.118;f=g*k*1.118;e*=l+k;g*=l+k;var n=c.clone();n.x-=d;n.y-=f;c.x+=1*-e-d;c.y+=1*-g-f;return function(){b.begin();b.moveTo(n.x,n.y);m?b.lineTo(n.x-e-g/2,n.y-g+e/2):b.lineTo(n.x+g/2-e,n.y-g-e/2);b.lineTo(n.x-e,n.y-g);b.close();q?b.fillAndStroke():b.stroke()}});mxMarker.addMarker("openAsync",
+function(b){b=null!=b?b:2;return function(d,f,c,e,g,l,m,k,n,q){g*=m+n;l*=m+n;var E=e.clone();return function(){d.begin();d.moveTo(E.x,E.y);k?d.lineTo(E.x-g-l/b,E.y-l+g/b):d.lineTo(E.x+l/b-g,E.y-l-g/b);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ya=function(b,d,f){return La(b,["width"],d,function(d,c,e,g,l){l=b.shape.getEdgeWidth()*b.view.scale+f;return new mxPoint(g.x+c*d/4+e*l/2,g.y+e*d/4-c*l/2)},function(d,c,e,g,l,m){d=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,l.x,l.y,m.x,m.y));b.style.width=
+Math.round(2*d)/b.view.scale-f})},La=function(b,d,f,c,e){return ea(b,d,function(d){var e=b.absolutePoints,g=e.length-1;d=b.view.translate;var l=b.view.scale,m=f?e[0]:e[g],e=f?e[1]:e[g-1],g=e.x-m.x,k=e.y-m.y,n=Math.sqrt(g*g+k*k),m=c.call(this,n,g/n,k/n,m,e);return new mxPoint(m.x/l-d.x,m.y/l-d.y)},function(d,c,g){var l=b.absolutePoints,m=l.length-1;d=b.view.translate;var k=b.view.scale,n=f?l[0]:l[m],l=f?l[1]:l[m-1],m=l.x-n.x,q=l.y-n.y,E=Math.sqrt(m*m+q*q);c.x=(c.x+d.x)*k;c.y=(c.y+d.y)*k;e.call(this,
+E,m/E,q/E,n,l,c,g)})},Da=function(b){return function(d){return[ea(d,["arrowWidth","arrowSize"],function(d){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",aa.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",aa.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-f)*d.height/2)},function(d,f){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-f.y)/d.height*2));this.state.style.arrowSize=Math.max(0,
Math.min(b,(d.x+d.width-f.x)/d.width))})]}},Za=function(b){return function(d){return[ea(d,["size"],function(d){var f=Math.max(0,Math.min(.5*d.height,parseFloat(mxUtils.getValue(this.state.style,"size",b))));return new mxPoint(d.x,d.y+f)},function(b,d){this.state.style.size=Math.max(0,d.y-b.y)},!0)]}},Ra=function(b,d,f){return function(c){var e=[ea(c,["size"],function(f){var c=Math.max(0,Math.min(f.width,Math.min(f.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*b;return new mxPoint(f.x+
c,f.y+c)},function(d,f){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,f.x-d.x),Math.min(d.height,f.y-d.y)))/b)},!1)];f&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(Aa(c));return e}},Ma=function(b,d,f,c,e){f=null!=f?f:.5;return function(g){var l=[ea(g,["size"],function(d){var f=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",f?e:b));return new mxPoint(d.x+Math.max(0,Math.min(.5*d.width,
c*(f?1:d.width))),d.getCenterY())},function(b,d,c){b=null!=e&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?d.x-b.x:Math.max(0,Math.min(f,(d.x-b.x)/b.width));this.state.style.size=b},!1,c)];d&&mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(Aa(g));return l}},Va=function(b,d,f){b=null!=b?b:.5;return function(c){var e=[ea(c,["size"],function(c){var e=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,g=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
@@ -2878,16 +2879,16 @@ f*b.width+c),b.y+b.height-d)},function(b,d){var f=Math.max(0,Math.min(1,mxUtils.
"dy",ga.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(Aa(b));return d},module:function(b){return[ea(b,["jettyWidth","jettyHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"jettyWidth",ia.prototype.jettyWidth))),f=Math.max(0,Math.min(b.height,
mxUtils.getValue(this.state.style,"jettyHeight",ia.prototype.jettyHeight)));return new mxPoint(b.x+d/2,b.y+2*f)},function(b,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y))/2)})]},corner:function(b){return[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",qa.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
"dy",qa.prototype.dy)));return new mxPoint(b.x+d,b.y+f)},function(b,d){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,d.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},tee:function(b){return[ea(b,["dx","dy"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",pa.prototype.dx))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",pa.prototype.dy)));return new mxPoint(b.x+(b.width+d)/2,b.y+f)},function(b,
-d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Da(1),doubleArrow:Da(.5),folder:function(b){return[ea(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,d.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},singleArrow:Da(1),doubleArrow:Da(.5),folder:function(b){return[ea(b,["tabWidth","tabHeight"],function(b){var d=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),f=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=b.width-d);return new mxPoint(b.x+d,b.y+f)},function(b,d){var f=Math.max(0,Math.min(b.width,d.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(f=b.width-f);this.state.style.tabWidth=Math.round(f);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(b.height,d.y-b.y)))},!1)]},document:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
"size",x.prototype.size))));return new mxPoint(b.x+3*b.width/4,b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},tape:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(b.getCenterX(),b.y+d*b.height/2)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-b.y)/b.height*2))},!1)]},isoCube2:function(b){return[ea(b,
-["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Za(l.prototype.size),cylinder3:Za(m.prototype.size),offPageConnector:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",la.prototype.size))));
+["isoAngle"],function(b){var d=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",f.isoAngle))))*Math.PI/200;return new mxPoint(b.x,b.y+Math.min(b.width*Math.tan(d),.5*b.height))},function(b,d){this.state.style.isoAngle=Math.max(0,50*(d.y-b.y)/b.height)},!0)]},cylinder2:Za(l.prototype.size),cylinder3:Za(q.prototype.size),offPageConnector:function(b){return[ea(b,["size"],function(b){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",la.prototype.size))));
return new mxPoint(b.getCenterX(),b.y+(1-d)*b.height)},function(b,d){this.state.style.size=Math.max(0,Math.min(1,(b.y+b.height-d.y)/b.height))},!1)]},"mxgraph.basic.rect":function(b){var d=[Graph.createHandle(b,["size"],function(b){var d=Math.max(0,Math.min(b.width/2,b.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(b.x+d,b.y+d)},function(b,d){this.state.style.size=Math.round(100*Math.max(0,Math.min(b.height/2,b.width/2,d.x-b.x)))/100})];b=Graph.createHandle(b,
["indent"],function(b){var d=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(b.x+.75*b.width,b.y+d*b.height/200)},function(b,d){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(d.y-b.y)/b.height)))/100});d.push(b);return d},step:Ma(M.prototype.size,!0,null,!0,M.prototype.fixedSize),hexagon:Ma(Q.prototype.size,!0,.5,!0,Q.prototype.fixedSize),curlyBracket:Ma(G.prototype.size,!1),display:Ma(Ca.prototype.size,!1),cube:Ra(1,
-c.prototype.size,!1),card:Ra(.5,u.prototype.size,!0),loopLimit:Ra(.5,sa.prototype.size,!0),trapezoid:Va(.5,C.prototype.size,C.prototype.fixedSize),parallelogram:Va(1,D.prototype.size,D.prototype.fixedSize)};Graph.createHandle=ea;Graph.handleFactory=Na;var eb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=eb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&
+c.prototype.size,!1),card:Ra(.5,v.prototype.size,!0),loopLimit:Ra(.5,sa.prototype.size,!0),trapezoid:Va(.5,C.prototype.size,C.prototype.fixedSize),parallelogram:Va(1,D.prototype.size,D.prototype.fixedSize)};Graph.createHandle=ea;Graph.handleFactory=Na;var eb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var b=eb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&
null==mxStencilRegistry.getStencil(d)?d=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(d=mxConstants.SHAPE_SWIMLANE);d=Na[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Na[mxConstants.SHAPE_RECTANGLE]);null!=d&&(d=d(this.state),null!=d&&(b=null==b?d:b.concat(d)))}return b};mxEdgeHandler.prototype.createCustomHandles=function(){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_CONNECTOR);
b=Na[b];return null!=b?b(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Oa=new mxPoint(1,0),Pa=new mxPoint(1,0),Da=mxUtils.toRadians(-30),Oa=mxUtils.getRotatedPoint(Oa,Math.cos(Da),Math.sin(Da)),Da=mxUtils.toRadians(-150),Pa=mxUtils.getRotatedPoint(Pa,Math.cos(Da),Math.sin(Da));mxEdgeStyle.IsometricConnector=function(b,d,f,c,e){var g=b.view;c=null!=c&&0<c.length?c[0]:null;var l=b.absolutePoints,m=l[0],l=l[l.length-1];null!=c&&(c=g.transformControlPoint(b,c));null==
-m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==l&&null!=f&&(l=new mxPoint(f.getCenterX(),f.getCenterY()));var k=Oa.x,p=Oa.y,q=Pa.x,E=Pa.y,n="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=m){b=function(b,d,f){b-=u.x;var c=d-u.y;d=(E*b-q*c)/(k*E-p*q);b=(p*b-k*c)/(p*q-k*E);n?(f&&(u=new mxPoint(u.x+k*d,u.y+p*d),e.push(u)),u=new mxPoint(u.x+q*b,u.y+E*b)):(f&&(u=new mxPoint(u.x+q*b,u.y+E*b),e.push(u)),u=new mxPoint(u.x+k*d,u.y+p*d));e.push(u)};var u=m;null==
+m&&null!=d&&(m=new mxPoint(d.getCenterX(),d.getCenterY()));null==l&&null!=f&&(l=new mxPoint(f.getCenterX(),f.getCenterY()));var k=Oa.x,n=Oa.y,q=Pa.x,E=Pa.y,u="horizontal"==mxUtils.getValue(b.style,"elbow","horizontal");if(null!=l&&null!=m){b=function(b,d,f){b-=p.x;var c=d-p.y;d=(E*b-q*c)/(k*E-n*q);b=(n*b-k*c)/(n*q-k*E);u?(f&&(p=new mxPoint(p.x+k*d,p.y+n*d),e.push(p)),p=new mxPoint(p.x+q*b,p.y+E*b)):(f&&(p=new mxPoint(p.x+q*b,p.y+E*b),e.push(p)),p=new mxPoint(p.x+k*d,p.y+n*d));e.push(p)};var p=m;null==
c&&(c=new mxPoint(m.x+(l.x-m.x)/2,m.y+(l.y-m.y)/2));b(c.x,c.y,!0);b(l.x,l.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var fb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(b,d){if(d==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(b);f.snapToTerminals=!1;return f}return fb.apply(this,arguments)};k.prototype.constraints=[];g.prototype.getConstraints=function(b,d,f){b=[];var c=Math.tan(mxUtils.toRadians(30)),e=(.5-
c)/2,c=Math.min(d,f/(.5+c));d=(d-c)/2;f=(f-c)/2;b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+c*e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.25*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,f+.75*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,f+(1-e)*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f+.75*c));return b};f.prototype.getConstraints=
function(b,d,f){b=[];var c=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,c=Math.min(d*Math.tan(c),.5*f);b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f-c));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2898,12 +2899,12 @@ d,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));b.push(
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))];Ia.prototype.constraints=mxRectangleShape.prototype.constraints;
mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;t.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};u.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};v.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return b};c.prototype.getConstraints=function(b,d,f){b=[];var c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,
"size",this.size)))));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f+c)));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};m.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d+c),f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f-.5*c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-c));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-c)));return b};q.prototype.getConstraints=function(b,d,f){b=[];d=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));b.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));b.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));b.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,d));b.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-d));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};q.prototype.getConstraints=
+0),!1,null,0,d+.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-d-.5*(.5*f-d)));b.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*d));b.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-d));b.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-d));return b};n.prototype.getConstraints=
function(b,d,f){b=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(b.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),e))):(b.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,e)),b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),e)));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));b.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,d,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(f-e)+e));b.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2916,7 +2917,7 @@ xa.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraint
.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)];ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];p.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
@@ -2939,14 +2940,14 @@ function(b,d,f){b=[];var c=Math.min(f,d),e=Math.max(0,Math.min(c,c*parseFloat(mx
0),!1,null,0,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,g));b.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,c));return b};I.prototype.constraints=null;X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
.9),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ka.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(b){g.escape();b=g.deleteCells(g.getDeletableCells(g.getSelectionCells()),b);null!=b&&g.setSelectionCells(b)}function c(){if(!g.isSelectionEmpty()){g.getModel().beginUpdate();try{for(var b=g.getSelectionCells(),d=0;d<b.length;d++)g.cellLabelChanged(b[d],"")}finally{g.getModel().endUpdate()}}}var e=this.editorUi,k=e.editor,g=k.graph,n=function(){return Action.prototype.isEnabled.apply(this,arguments)&&g.isEnabled()};this.addAction("new...",function(){g.openLink(e.getUrl())});
+Actions.prototype.init=function(){function b(b){g.escape();b=g.deleteCells(g.getDeletableCells(g.getSelectionCells()),b);null!=b&&g.setSelectionCells(b)}function c(){if(!g.isSelectionEmpty()){g.getModel().beginUpdate();try{for(var b=g.getSelectionCells(),d=0;d<b.length;d++)g.cellLabelChanged(b[d],"")}finally{g.getModel().endUpdate()}}}var e=this.editorUi,k=e.editor,g=k.graph,p=function(){return Action.prototype.isEnabled.apply(this,arguments)&&g.isEnabled()};this.addAction("new...",function(){g.openLink(e.getUrl())});
this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});this.addAction("smartFit",function(){g.popupMenuHandler.hideMenu();var b=g.view.scale,d=g.view.translate.x,c=g.view.translate.y;e.actions.get("resetView").funct();1E-5>Math.abs(b-g.view.scale)&&d==g.view.translate.x&&c==g.view.translate.y&&e.actions.get(g.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){g.isEnabled()&&(g.isSelectionEmpty()?e.actions.get("smartFit").funct():
-g.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var f=mxUtils.parseXml(b);k.graph.setSelectionCells(k.graph.importGraphModel(f.documentElement))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+p.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
-null})}).isEnabled=n;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=n;this.addAction("saveAs...",function(){e.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=n;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(e);e.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,
-320,240,!0,!0)}).isEnabled=n;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(g,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var b=null;try{b=e.copyXml(),
+g.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){e.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var f=mxUtils.parseXml(b);k.graph.setSelectionCells(k.graph.importGraphModel(f.documentElement))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+m.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
+null})}).isEnabled=p;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=p;this.addAction("saveAs...",function(){e.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=p;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var b=new EditDiagramDialog(e);e.showDialog(b.container,620,420,!0,!1);b.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,
+320,240,!0,!0)}).isEnabled=p;this.addAction("print...",function(){e.showDialog((new PrintDialog(e)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(g,null,10,10)});this.addAction("undo",function(){e.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){e.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var b=null;try{b=e.copyXml(),
null!=b&&g.removeCells(b,!1)}catch(l){}null==b&&mxClipboard.cut(g)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(f){}try{mxClipboard.copy(g)}catch(f){e.handleError(f)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{e.pasteXml(b,!0)}finally{g.getModel().endUpdate()}}else mxClipboard.paste(g)}),
b=!0)}catch(l){}b||mxClipboard.paste(g)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(b){function d(b){if(null!=b){for(var d=!0,f=0;f<b.length&&d;f++)d=d&&g.model.isEdge(b[f]);var c=g.view.translate,f=g.view.scale,e=c.x,l=c.y,c=null;if(1==b.length&&d){var m=g.getCellGeometry(b[0]);null!=m&&(c=m.getTerminalPoint(!0))}c=null!=c?c:g.getBoundingBoxFromGeometry(b,d);null!=c&&(d=Math.round(g.snap(g.popupMenuHandler.triggerX/f-e)),f=Math.round(g.snap(g.popupMenuHandler.triggerY/
-f-l)),g.cellsMoved(b,d-c.x,f-c.y))}}function f(){g.getModel().beginUpdate();try{d(mxClipboard.paste(g))}finally{g.getModel().endUpdate()}}if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{d(e.pasteXml(b,!0))}finally{g.getModel().endUpdate()}}else f()}),b=!0)}catch(p){}b||f()}});this.addAction("copySize",function(){var b=g.getSelectionCell();g.isEnabled()&&null!=b&&g.getModel().isVertex(b)&&
+f-l)),g.cellsMoved(b,d-c.x,f-c.y))}}function f(){g.getModel().beginUpdate();try{d(mxClipboard.paste(g))}finally{g.getModel().endUpdate()}}if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){b=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(b){if(null!=b){g.getModel().beginUpdate();try{d(e.pasteXml(b,!0))}finally{g.getModel().endUpdate()}}else f()}),b=!0)}catch(m){}b||f()}});this.addAction("copySize",function(){var b=g.getSelectionCell();g.isEnabled()&&null!=b&&g.getModel().isVertex(b)&&
(b=g.getCellGeometry(b),null!=b&&(e.copiedSize=new mxRectangle(b.x,b.y,b.width,b.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(){if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=e.copiedSize){g.getModel().beginUpdate();try{for(var b=g.getResizableCells(g.getSelectionCells()),d=0;d<b.length;d++)if(g.getModel().isVertex(b[d])){var c=g.getCellGeometry(b[d]);null!=c&&(c=c.clone(),c.width=e.copiedSize.width,c.height=e.copiedSize.height,g.getModel().setGeometry(b[d],c))}}finally{g.getModel().endUpdate()}}},
null,null,"Alt+Shift+V");this.addAction("copyData",function(){var b=g.getSelectionCell()||g.getModel().getRoot();g.isEnabled()&&null!=b&&(b=b.cloneValue(),null==b||isNaN(b.nodeType)||(e.copiedValue=b))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(b,d){function f(d,f){var e=c.getValue(d);f=d.cloneValue(f);f.removeAttribute("placeholders");null==e||isNaN(e.nodeType)||f.setAttribute("placeholders",e.getAttribute("placeholders"));null!=b&&mxEvent.isShiftDown(b)||f.setAttribute("label",
g.convertValueToString(d));c.setValue(d,f)}b=null!=d?d:b;var c=g.getModel();if(g.isEnabled()&&!g.isSelectionEmpty()&&null!=e.copiedValue){c.beginUpdate();try{var l=g.getEditableCells(g.getSelectionCells());if(0==l.length)f(c.getRoot(),e.copiedValue);else for(var k=0;k<l.length;k++)f(l[k],e.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(d,e){d=null!=e?e:d;null!=d&&mxEvent.isShiftDown(d)?c():b(null!=d&&(mxEvent.isControlDown(d)||mxEvent.isMetaDown(d)||
@@ -2959,13 +2960,13 @@ g.isTableRow(b[0])?(b=g.getCellsForGroup(b),1<b.length&&g.setSelectionCell(g.gro
d.length&&g.setSelectionCells(d)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(g.isEnabled()){var b=g.getSelectionCells();if(null!=b){for(var d=[],c=0;c<b.length;c++)g.isTableRow(b[c])||g.isTableCell(b[c])||d.push(b[c]);g.removeCellsFromParent(d)}}});this.addAction("edit",function(){g.isEnabled()&&g.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var b=g.getSelectionCell()||g.getModel().getRoot();e.showDataDialog(b)},null,
null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var b=g.getSelectionCell();if(g.isEnabled()&&null!=b&&g.isCellEditable(b)){var d="";if(mxUtils.isNode(b.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&b.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==c&&(c=b.value.getAttribute("tooltip"));null!=c&&(d=c)}d=new TextareaDialog(e,mxResources.get("editTooltip")+":",d,function(d){g.setTooltipForCell(b,
d)});e.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var b=g.getLinkForCell(g.getSelectionCell());null!=b&&g.openLink(b)});this.addAction("editLink...",function(){var b=g.getSelectionCell();if(g.isEnabled()&&null!=b&&g.isCellEditable(b)){var d=g.getLinkForCell(b)||"";e.showLinkDialog(d,mxResources.get("apply"),function(d,c,f){d=mxUtils.trim(d);g.setLinkForCell(b,0<d.length?d:null);g.setAttributeForCell(b,"linkTarget",f)},!0,g.getLinkTargetForCell(b))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(g.clearSelection(),e.actions.get("image").funct())})).isEnabled=n;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(b,d,c){b=mxUtils.trim(b);if(0<b.length){var f=null,e=g.getLinkTitle(b);null!=d&&0<d.length&&(f=d[0].iconUrl,
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&(g.clearSelection(),e.actions.get("image").funct())})).isEnabled=p;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(b,d,c){b=mxUtils.trim(b);if(0<b.length){var f=null,e=g.getLinkTitle(b);null!=d&&0<d.length&&(f=d[0].iconUrl,
e=d[0].name||d[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&(e=e.substring(0,30)+"..."));d=new mxCell(e,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));d.vertex=!0;f=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry([d],!0));d.geometry.x=f.x;d.geometry.y=f.y;g.setAttributeForCell(d,"linkTarget",c);g.setLinkForCell(d,b);g.cellSizeUpdated(d,
-!0);g.getModel().beginUpdate();try{d=g.addCell(d),g.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{g.getModel().endUpdate()}g.setSelectionCell(d);g.scrollCellToVisible(g.getSelectionCell())}},!0)})).isEnabled=n;this.addAction("link...",mxUtils.bind(this,function(){if(g.isEnabled())if(g.cellEditor.isContentEditing()){var b=g.getSelectedElement(),d=g.getParentByName(b,"A",g.cellEditor.textarea),c="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var k=b.getElementsByTagName("a"),
-q=0;q<k.length&&null==d;q++)k[q].textContent==b.textContent&&(d=k[q]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",g.selectNode(d));var n=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(n);null!=b&&g.insertLink(b)}))}else g.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=n;this.addAction("autosize",function(){var b=g.getSelectionCells();if(null!=b){g.getModel().beginUpdate();
-try{for(var d=0;d<b.length;d++){var c=b[d];0<g.getModel().getChildCount(c)?g.updateGroupBounds([c],0,!0):g.updateCellSize(c)}}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){g.stopEditing();var b=g.getCommonStyle(g.getSelectionCells()),b="1"==mxUtils.getValue(b,"html","0")?null:"1";g.getModel().beginUpdate();try{for(var d=g.getEditableCells(g.getSelectionCells()),c=0;c<d.length;c++)if(state=g.getView().getState(d[c]),null!=state){var k=
-mxUtils.getValue(state.style,"html","0");if("1"==k&&null==b){var q=g.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(q=q.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var n=document.createElement("div");n.innerHTML=g.sanitizeHtml(q);q=mxUtils.extractTextWithWhitespace(n.childNodes);g.cellLabelChanged(state.cell,q);g.setCellStyles("html",b,[d[c]])}else"0"==k&&"1"==b&&(q=mxUtils.htmlEntities(g.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
-"1")&&(q=q.replace(/\n/g,"<br/>")),g.cellLabelChanged(state.cell,g.sanitizeHtml(q)),g.setCellStyles("html",b,[d[c]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=b?b:"0"],"cells",d))}finally{g.getModel().endUpdate()}});this.addAction("wordWrap",function(){var b=g.getView().getState(g.getSelectionCell()),d="wrap";g.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);g.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",
+!0);g.getModel().beginUpdate();try{d=g.addCell(d),g.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{g.getModel().endUpdate()}g.setSelectionCell(d);g.scrollCellToVisible(g.getSelectionCell())}},!0)})).isEnabled=p;this.addAction("link...",mxUtils.bind(this,function(){if(g.isEnabled())if(g.cellEditor.isContentEditing()){var b=g.getSelectedElement(),d=g.getParentByName(b,"A",g.cellEditor.textarea),c="";if(null==d&&null!=b&&null!=b.getElementsByTagName)for(var m=b.getElementsByTagName("a"),
+k=0;k<m.length&&null==d;k++)m[k].textContent==b.textContent&&(d=m[k]);null!=d&&"A"==d.nodeName&&(c=d.getAttribute("href")||"",g.selectNode(d));var p=g.cellEditor.saveSelection();e.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(b){g.cellEditor.restoreSelection(p);null!=b&&g.insertLink(b)}))}else g.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=p;this.addAction("autosize",function(){var b=g.getSelectionCells();if(null!=b){g.getModel().beginUpdate();
+try{for(var d=0;d<b.length;d++){var c=b[d];0<g.getModel().getChildCount(c)?g.updateGroupBounds([c],0,!0):g.updateCellSize(c)}}finally{g.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){g.stopEditing();var b=g.getCommonStyle(g.getSelectionCells()),b="1"==mxUtils.getValue(b,"html","0")?null:"1";g.getModel().beginUpdate();try{for(var d=g.getEditableCells(g.getSelectionCells()),c=0;c<d.length;c++)if(state=g.getView().getState(d[c]),null!=state){var m=
+mxUtils.getValue(state.style,"html","0");if("1"==m&&null==b){var k=g.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(k=k.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var p=document.createElement("div");p.innerHTML=g.sanitizeHtml(k);k=mxUtils.extractTextWithWhitespace(p.childNodes);g.cellLabelChanged(state.cell,k);g.setCellStyles("html",b,[d[c]])}else"0"==m&&"1"==b&&(k=mxUtils.htmlEntities(g.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br",
+"1")&&(k=k.replace(/\n/g,"<br/>")),g.cellLabelChanged(state.cell,g.sanitizeHtml(k)),g.setCellStyles("html",b,[d[c]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=b?b:"0"],"cells",d))}finally{g.getModel().endUpdate()}});this.addAction("wordWrap",function(){var b=g.getView().getState(g.getSelectionCell()),d="wrap";g.stopEditing();null!=b&&"wrap"==b.style[mxConstants.STYLE_WHITE_SPACE]&&(d=null);g.setCellStyles(mxConstants.STYLE_WHITE_SPACE,d)});this.addAction("rotation",
function(){var b="0",d=g.getView().getState(g.getSelectionCell());null!=d&&(b=d.style[mxConstants.STYLE_ROTATION]||b);b=new FilenameDialog(e,b,mxResources.get("apply"),function(b){null!=b&&0<b.length&&g.setCellStyles(mxConstants.STYLE_ROTATION,b)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(b.container,375,80,!0,!0);b.init()});this.addAction("resetView",function(){g.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(b){g.isFastZoomEnabled()?
g.lazyZoom(!0,!0,e.buttonZoomDelay):g.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(b){g.isFastZoomEnabled()?g.lazyZoom(!1,!0,e.buttonZoomDelay):g.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var b=g.isSelectionEmpty()?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells()),d=g.view.translate,c=g.view.scale;b.x=b.x/c-d.x;b.y=b.y/c-d.y;b.width/=c;b.height/=c;null!=g.backgroundImage&&
b.add(new mxRectangle(0,0,g.backgroundImage.width,g.backgroundImage.height));0==b.width||0==b.height?(g.zoomTo(1),e.resetScrollbars()):(d=Editor.fitWindowBorders,null!=d&&(b.x-=d.x,b.y-=d.y,b.width+=d.width+d.x,b.height+=d.height+d.y),g.fitWindow(b))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){g.pageVisible||this.get("pageView").funct();var b=g.pageFormat,d=g.pageScale;g.zoomTo(Math.floor(20*Math.min((g.container.clientWidth-10)/b.width/d,(g.container.clientHeight-
@@ -2974,10 +2975,10 @@ d))/20);mxUtils.hasScrollbars(g.container)&&(b=g.getPagePadding(),g.container.sc
g.getPagePadding();g.container.scrollLeft=Math.min(b.x*g.view.scale,(g.container.scrollWidth-g.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.editorUi,parseInt(100*g.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(b){b=parseInt(b);!isNaN(b)&&0<b&&g.zoomTo(b/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(b.container,300,80,!0,!0);b.init()}),null,null,
Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var b=new FilenameDialog(this.editorUi,parseInt(100*g.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(b){b=parseInt(b);!isNaN(b)&&0<b&&(b=new ChangePageSetup(e,null,null,null,b/100),b.ignoreColor=!0,b.ignoreImage=!0,g.model.execute(b))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(b.container,300,80,!0,!0);b.init()}));var t=null,t=this.addAction("grid",function(){g.setGridEnabled(!g.isGridEnabled());
e.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");t.setToggleAction(!0);t.setSelectedCallback(function(){return g.isGridEnabled()});t.setEnabled(!1);t=this.addAction("guides",function(){g.graphHandler.guidesEnabled=!g.graphHandler.guidesEnabled;e.fireEvent(new mxEventObject("guidesEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.graphHandler.guidesEnabled});t.setEnabled(!1);t=this.addAction("tooltips",function(){g.tooltipHandler.setEnabled(!g.tooltipHandler.isEnabled());
-e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.tooltipHandler.isEnabled()});t=this.addAction("collapseExpand",function(){var b=new ChangePageSetup(e);b.ignoreColor=!0;b.ignoreImage=!0;b.foldingEnabled=!g.foldingEnabled;g.model.execute(b)});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.foldingEnabled});t.isEnabled=n;t=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});t.setToggleAction(!0);
+e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.tooltipHandler.isEnabled()});t=this.addAction("collapseExpand",function(){var b=new ChangePageSetup(e);b.ignoreColor=!0;b.ignoreImage=!0;b.foldingEnabled=!g.foldingEnabled;g.model.execute(b)});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.foldingEnabled});t.isEnabled=p;t=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});t.setToggleAction(!0);
t.setSelectedCallback(function(){return g.scrollbars});t=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!g.pageVisible)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return g.pageVisible});t=this.addAction("connectionArrows",function(){g.connectionArrowsEnabled=!g.connectionArrowsEnabled;e.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");t.setToggleAction(!0);t.setSelectedCallback(function(){return g.connectionArrowsEnabled});t=
this.addAction("connectionPoints",function(){g.setConnectable(!g.connectionHandler.isEnabled());e.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");t.setToggleAction(!0);t.setSelectedCallback(function(){return g.connectionHandler.isEnabled()});t=this.addAction("copyConnect",function(){g.connectionHandler.setCreateTarget(!g.connectionHandler.isCreateTarget());e.fireEvent(new mxEventObject("copyConnectChanged"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return g.connectionHandler.isCreateTarget()});
-t.isEnabled=n;t=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});t.setToggleAction(!0);t.setSelectedCallback(function(){return e.editor.autosave});t.isEnabled=n;t.visible=!1;this.addAction("help",function(){var b="";mxResources.isLanguageSupported(mxClient.language)&&(b="_"+mxClient.language);g.openLink(RESOURCES_PATH+"/help"+b+".html")});var d=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){d||(e.showDialog((new AboutDialog(e)).container,
+t.isEnabled=p;t=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});t.setToggleAction(!0);t.setSelectedCallback(function(){return e.editor.autosave});t.isEnabled=p;t.visible=!1;this.addAction("help",function(){var b="";mxResources.isLanguageSupported(mxClient.language)&&(b="_"+mxClient.language);g.openLink(RESOURCES_PATH+"/help"+b+".html")});var d=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){d||(e.showDialog((new AboutDialog(e)).container,
320,280,!0,!0,function(){d=!1}),d=!0)}));t=mxUtils.bind(this,function(b,d,c,e){return this.addAction(b,function(){if(null!=c&&g.cellEditor.isContentEditing())c();else{g.stopEditing(!1);g.getModel().beginUpdate();try{var b=g.getEditableCells(g.getSelectionCells());g.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,d,b);(d&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?g.updateLabelElements(b,function(b){b.style.fontWeight=null;"B"==b.nodeName&&g.replaceElement(b)}):(d&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
g.updateLabelElements(b,function(b){b.style.fontStyle=null;"I"==b.nodeName&&g.replaceElement(b)}):(d&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&g.updateLabelElements(b,function(b){b.style.textDecoration=null;"U"==b.nodeName&&g.replaceElement(b)});for(var f=0;f<b.length;f++)0==g.model.getChildCount(b[f])&&g.autoSizeCell(b[f],!1)}finally{g.getModel().endUpdate()}}},null,null,e)});t("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");t("italic",
mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");t("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){e.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){e.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){e.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});
@@ -2989,41 +2990,41 @@ g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("shar
c);g.setCellStyles(mxConstants.STYLE_CURVED,null);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}}});this.addAction("curved",function(){g.getModel().beginUpdate();try{g.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),g.setCellStyles(mxConstants.STYLE_CURVED,"1"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
"values",["0","1"],"cells",g.getSelectionCells()))}finally{g.getModel().endUpdate()}});this.addAction("collapsible",function(){var b=g.view.getState(g.getSelectionCell()),d="1";null!=b&&null!=g.getFoldingImage(b)&&(d="0");g.setCellStyles("collapsible",d);e.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[d],"cells",g.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var b=g.getEditableCells(g.getSelectionCells());if(null!=b&&0<b.length){var d=
g.getModel(),d=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",d.getStyle(b[0])||"",function(d){null!=d&&g.setCellStyle(mxUtils.trim(d),b)},null,null,400,220);this.editorUi.showDialog(d.container,420,300,!0,!0);d.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){g.isEnabled()&&!g.isSelectionEmpty()&&e.setDefaultStyle(g.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){g.isEnabled()&&e.clearDefaultStyle()},
-null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var b=g.getSelectionCell();if(null!=b&&g.getModel().isEdge(b)){var d=k.graph.selectionCellsHandler.getHandler(b);if(d instanceof mxEdgeHandler){for(var c=g.view.translate,e=g.view.scale,q=c.x,c=c.y,b=g.getModel().getParent(b),n=g.getCellGeometry(b);g.getModel().isVertex(b)&&null!=n;)q+=n.x,c+=n.y,b=g.getModel().getParent(b),n=g.getCellGeometry(b);q=Math.round(g.snap(g.popupMenuHandler.triggerX/e-q));e=Math.round(g.snap(g.popupMenuHandler.triggerY/
-e-c));d.addPointAt(d.state,q,e)}}});this.addAction("removeWaypoint",function(){var b=e.actions.get("removeWaypoint");null!=b.handler&&b.handler.removePoint(b.handler.state,b.index)});this.addAction("clearWaypoints",function(b,d){b=null!=d?d:b;var c=g.getSelectionCells();if(null!=c){c=g.getEditableCells(g.addAllEdges(c));g.getModel().beginUpdate();try{for(var f=0;f<c.length;f++){var e=c[f];if(g.getModel().isEdge(e)){var l=g.getCellGeometry(e);mxEvent.isShiftDown(b)?(g.setCellStyles(mxConstants.STYLE_EXIT_X,
+null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var b=g.getSelectionCell();if(null!=b&&g.getModel().isEdge(b)){var d=k.graph.selectionCellsHandler.getHandler(b);if(d instanceof mxEdgeHandler){for(var c=g.view.translate,e=g.view.scale,n=c.x,c=c.y,b=g.getModel().getParent(b),p=g.getCellGeometry(b);g.getModel().isVertex(b)&&null!=p;)n+=p.x,c+=p.y,b=g.getModel().getParent(b),p=g.getCellGeometry(b);n=Math.round(g.snap(g.popupMenuHandler.triggerX/e-n));e=Math.round(g.snap(g.popupMenuHandler.triggerY/
+e-c));d.addPointAt(d.state,n,e)}}});this.addAction("removeWaypoint",function(){var b=e.actions.get("removeWaypoint");null!=b.handler&&b.handler.removePoint(b.handler.state,b.index)});this.addAction("clearWaypoints",function(b,d){b=null!=d?d:b;var c=g.getSelectionCells();if(null!=c){c=g.getEditableCells(g.addAllEdges(c));g.getModel().beginUpdate();try{for(var f=0;f<c.length;f++){var e=c[f];if(g.getModel().isEdge(e)){var l=g.getCellGeometry(e);mxEvent.isShiftDown(b)?(g.setCellStyles(mxConstants.STYLE_EXIT_X,
null,[e]),g.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[e]),g.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[e]),g.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[e])):null!=l&&(l=l.clone(),l.points=null,l.x=0,l.y=0,l.offset=null,g.getModel().setGeometry(e,l))}}}finally{g.getModel().endUpdate()}}},null,null,"Alt+Shift+C");t=this.addAction("subscript",mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");t=this.addAction("superscript",
-mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=g.getView().getState(g.getSelectionCell()),c="";null!=d&&(c=d.style[mxConstants.STYLE_IMAGE]||c);var k=g.cellEditor.saveSelection();e.showImageDialog(b,c,function(b,d,c){if(g.cellEditor.isContentEditing())g.cellEditor.restoreSelection(k),
+mxUtils.bind(this,function(){g.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())){var b=mxResources.get("image")+" ("+mxResources.get("url")+"):",d=g.getView().getState(g.getSelectionCell()),c="";null!=d&&(c=d.style[mxConstants.STYLE_IMAGE]||c);var m=g.cellEditor.saveSelection();e.showImageDialog(b,c,function(b,d,c){if(g.cellEditor.isContentEditing())g.cellEditor.restoreSelection(m),
g.insertImage(b,d,c);else{var f=g.getSelectionCells();if(null!=b&&(0<b.length||0<f.length)){var e=null;g.getModel().beginUpdate();try{if(0==f.length){var f=[g.insertVertex(g.getDefaultParent(),null,"",0,0,d,c,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")],l=g.getCenterInsertPoint(g.getBoundingBoxFromGeometry(f,!0));f[0].geometry.x=l.x;f[0].geometry.y=l.y;e=f;g.fireEvent(new mxEventObject("cellsInserted","cells",e))}g.setCellStyles(mxConstants.STYLE_IMAGE,
-0<b.length?b:null,f);var m=g.getCurrentCellStyle(f[0]);"image"!=m[mxConstants.STYLE_SHAPE]&&"label"!=m[mxConstants.STYLE_SHAPE]?g.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==b.length&&g.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==g.getSelectionCount()&&null!=d&&null!=c){var p=f[0],q=g.getModel().getGeometry(p);null!=q&&(q=q.clone(),q.width=d,q.height=c,g.getModel().setGeometry(p,q))}}finally{g.getModel().endUpdate()}null!=e&&(g.setSelectionCells(e),g.scrollCellToVisible(e[0]))}}},
-g.cellEditor.isContentEditing(),!g.cellEditor.isContentEditing())}}).isEnabled=n;t=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),
+0<b.length?b:null,f);var k=g.getCurrentCellStyle(f[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?g.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==b.length&&g.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==g.getSelectionCount()&&null!=d&&null!=c){var n=f[0],q=g.getModel().getGeometry(n);null!=q&&(q=q.clone(),q.width=d,q.height=c,g.getModel().setGeometry(n,q))}}finally{g.getModel().endUpdate()}null!=e&&(g.setSelectionCells(e),g.scrollCellToVisible(e[0]))}}},
+g.cellEditor.isContentEditing(),!g.cellEditor.isContentEditing())}}).isEnabled=p;t=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(e,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("layers")),
this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));t=this.addAction("formatPanel",mxUtils.bind(this,function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));
t=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(e,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){e.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),e.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
-null,null,Editor.ctrlKey+"+Shift+O");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(b,c,e,k,g){var n;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),n=mxResources.get(b)+"..."):n=mxResources.get(b);return this.put(b,new Action(n,c,e,k,g))};Actions.prototype.put=function(b,c){return this.actions[b]=c};Actions.prototype.get=function(b){return this.actions[b]};
+null,null,Editor.ctrlKey+"+Shift+O");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(b,c,e,k,g){var p;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),p=mxResources.get(b)+"..."):p=mxResources.get(b);return this.put(b,new Action(p,c,e,k,g))};Actions.prototype.put=function(b,c){return this.actions[b]=c};Actions.prototype.get=function(b){return this.actions[b]};
function Action(b,c,e,k,g){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(c);this.enabled=null!=e?e:!0;this.iconCls=k;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,c){mxEventSource.call(this);this.ui=b;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.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;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(b,c){this.savingFile?null!=c&&c({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(b,c):this.updateFile(b,c)};
-DrawioFile.prototype.updateFile=function(b,c,e,k){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,b,c,k):this.reloadFile(b,c))}catch(n){null!=c&&c(n)}}),c))};
-DrawioFile.prototype.mergeFile=function(b,c,e,k){var g=!0;try{this.stats.fileMerged++;var n=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(n,this.ui.pages):null;var d=[this.ui.diffPages(null!=k?k:n,this.shadowPages)];if(!this.ignorePatches(d)){var f=this.ui.patchPages(n,
-d[0]);k={};var l=this.ui.getHashValueForPages(f,k),n={},m=this.ui.getHashValueForPages(this.shadowPages,n);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",m==l,l);if(null!=l&&l!=m){var p=this.compressReportData(this.getAnonymizedXmlForPages(t)),q=this.compressReportData(this.getAnonymizedXmlForPages(f)),v=this.ui.hashValue(b.getCurrentEtag()),u=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
-"\nChecksum: "+l+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(n)+"\nFrom: "+v+"\nTo: "+u+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+q,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+DrawioFile.prototype.updateFile=function(b,c,e,k){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=c&&c():null!=g?this.mergeFile(g,b,c,k):this.reloadFile(b,c))}catch(p){null!=c&&c(p)}}),c))};
+DrawioFile.prototype.mergeFile=function(b,c,e,k){var g=!0;try{this.stats.fileMerged++;var p=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),t=this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement);if(null!=t&&0<t.length){this.shadowPages=t;this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;var d=[this.ui.diffPages(null!=k?k:p,this.shadowPages)];if(!this.ignorePatches(d)){var f=this.ui.patchPages(p,
+d[0]);k={};var l=this.ui.getHashValueForPages(f,k),p={},q=this.ui.getHashValueForPages(this.shadowPages,p);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",d,"checksum",q==l,l);if(null!=l&&l!=q){var m=this.compressReportData(this.getAnonymizedXmlForPages(t)),n=this.compressReportData(this.getAnonymizedXmlForPages(f)),u=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,d,"Shadow Details: "+JSON.stringify(k)+
+"\nChecksum: "+l+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(p)+"\nFrom: "+u+"\nTo: "+v+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+n,null,"mergeFile");return}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=c&&c()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
null!=e&&e(D);try{if(g)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(C){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var c=new mxCodec(mxUtils.createXmlDocument()),e=c.document.createElement("mxfile");if(null!=b)for(var k=0;k<b.length;k++){var g=c.encode(new mxGraphModel(b[k].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",b[k].getId());b[k].viewState&&this.ui.editor.graph.saveViewState(b[k].viewState,g,!0);e.appendChild(g)}return mxUtils.getPrettyXml(e)};
DrawioFile.prototype.compressReportData=function(b,c,e){c=null!=c?c:1E4;null!=e&&null!=b&&b.length>e?b=b.substring(0,e)+"[...]":null!=b&&b.length>c&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,c,e,k,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=c)for(b=0;b<c.length;b++)this.ui.anonymizePatch(c[b]);var n=mxUtils.bind(this,function(b){var d=this.compressReportData(JSON.stringify(c,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==k?n(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==k?n(b):n(null)}),function(){})}else{var t=this.getCurrentUser(),d=null!=t?t.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+DrawioFile.prototype.checksumError=function(b,c,e,k,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=c)for(b=0;b<c.length;b++)this.ui.anonymizePatch(c[b]);var p=mxUtils.bind(this,function(b){var d=this.compressReportData(JSON.stringify(c,null,2));b=null!=b?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(b.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+g+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=b?"\n\nRemote:\n"+b:""),null,7E4)});null==k?p(null):this.getLatestVersion(mxUtils.bind(this,function(b){null!=b&&b.getCurrentEtag()==k?p(b):p(null)}),function(){})}else{var t=this.getCurrentUser(),d=null!=t?t.id:"unknown";EditorUi.logError("Checksum Error in "+g+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:g,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(f){}}}catch(f){}};
-DrawioFile.prototype.sendErrorReport=function(b,c,e,k){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),d=null!=t?this.ui.hashValue(t.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),m=l.lastIndexOf("."),t="xml";0<m&&(t=l.substring(m));var p=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+DrawioFile.prototype.sendErrorReport=function(b,c,e,k){try{var g=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),t=this.getCurrentUser(),d=null!=t?this.ui.hashValue(t.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",l=this.getTitle(),q=l.lastIndexOf("."),t="xml";0<q&&(t=l.substring(q));var m=null!=e?e.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+t+")\nUser="+d+f+"\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!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+p+"\n\nShadow:\n"+g+"\n\nData:\n"+n,k)}catch(q){}};
-DrawioFile.prototype.reloadFile=function(b,c){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),e=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,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var g=this.ui.getCurrentFile();null!=g&&(g.stats=this.stats);null!=b&&
+"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+m+"\n\nShadow:\n"+g+"\n\nData:\n"+p,k)}catch(n){}};
+DrawioFile.prototype.reloadFile=function(b,c){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;var c=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),p=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(p,c,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var g=this.ui.getCurrentFile();null!=g&&(g.stats=this.stats);null!=b&&
b()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(k){null!=c&&c(k)}};DrawioFile.prototype.copyFile=function(b,c){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
DrawioFile.prototype.ignorePatches=function(b){for(var c=!0,e=0;e<b.length&&c;e++)c=c&&0==Object.keys(b[e]).length;return c};
-DrawioFile.prototype.patch=function(b,c,e){var k=this.ui.editor.undoManager,g=k.history.slice(),n=k.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=e;var f=t.foldingEnabled,l=t.mathEnabled,m=t.cellRenderer.redraw;t.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());m.apply(this,arguments)};t.model.beginUpdate();try{for(var p=
-0;p<b.length;p++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[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{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=m;this.changeListenerEnabled=d;e||(k.history=g,k.indexOfNextAdd=n,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
+DrawioFile.prototype.patch=function(b,c,e){var k=this.ui.editor.undoManager,g=k.history.slice(),p=k.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=e;var f=t.foldingEnabled,l=t.mathEnabled,q=t.cellRenderer.redraw;t.cellRenderer.redraw=function(b){b.view.graph.isEditing(b.cell)&&(b.view.graph.scrollCellToVisible(b.cell),b.view.graph.cellEditor.resize());q.apply(this,arguments)};t.model.beginUpdate();try{for(var m=
+0;m<b.length;m++)this.ui.pages=this.ui.patchPages(this.ui.pages,b[m],!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{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=q;this.changeListenerEnabled=d;e||(k.history=g,k.indexOfNextAdd=p,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)l!=
t.mathEnabled?(this.ui.editor.updateGraphComponents(),t.refresh()):(f!=t.foldingEnabled?t.view.revalidate():t.view.validate(),t.sizeDidChange());this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}};
-DrawioFile.prototype.save=function(b,c,e,k,g,n){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};
+DrawioFile.prototype.save=function(b,c,e,k,g,p){try{if(this.isEditable())if(!g&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=c&&c();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(t){if(null!=e)e(t);else throw t;}};
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 b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,c,e){};DrawioFile.prototype.saveFile=function(b,c,e,k){};
DrawioFile.prototype.getPublicUrl=function(b){b(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(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};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(b,c,e){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,c,e){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -3053,27 +3054,27 @@ window.location.href=e});null==b&&this.isModified()?this.ui.confirm(mxResources.
g)}};DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():b?(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(b,c){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(b,c);else if(this.isModified()&&this.addUnsavedStatus(b),c)this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var e=this.getErrorMessage(b);null!=e&&60<e.length&&(e=e.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=
e?" ("+mxUtils.htmlEntities(e)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(b,c){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),k=mxUtils.bind(this,function(b){this.handleFileError(b,!0)}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,k,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.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(this.savingSpinnerKey))&&this.save(!0,e,k,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),k)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,k,g):this.invalidChecksum?this.showRefreshDialog(e,k,this.getErrorMessage(b)):c?this.showConflictDialog(g,n):this.addConflictStatus(mxUtils.bind(this,
+DrawioFile.prototype.handleConflictError=function(b,c){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),k=mxUtils.bind(this,function(b){this.handleFileError(b,!0)}),g=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,e,k,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=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(this.savingSpinnerKey))&&this.save(!0,e,k,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),k)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,k,g):this.invalidChecksum?this.showRefreshDialog(e,k,this.getErrorMessage(b)):c?this.showConflictDialog(g,p):this.addConflictStatus(mxUtils.bind(this,
function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));this.synchronizeFile(e,k)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var c=null!=b?null!=b.error?b.error.message:b.message:null;null==c&&null!=b&&b.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()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.sendFileChanges(),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(b){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(b){this.handleFileError(b)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};DrawioFile.prototype.isOptimisticSync=function(){return!1};
DrawioFile.prototype.createSecret=function(b){var c=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(c):this.sync.createToken(c,mxUtils.bind(this,function(e){b(c,e)}),mxUtils.bind(this,function(){b(c)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.isOptimisticSync()&&this.sync.fileSaving();"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaving",[this])};
DrawioFile.prototype.sendFileChanges=function(){try{null!=this.p2pCollab&&null!=this.sync&&(this.updateFileData(),this.sync.sendFileChanges(this.ui.getPagesForNode(mxUtils.parseXml(this.getData()).documentElement),this.desc),"1"==urlParams.test&&EditorUi.debug("DrawioFile.sendFileChanges",[this]))}catch(b){console.log(b)}};
DrawioFile.prototype.fileSaved=function(b,c,e,k,g){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync||this.isOptimisticSync()?(this.shadowData=b,this.shadowPages=null,null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread()),null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(b).documentElement),c,e,k,g)}catch(d){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=k&&k(d);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,d);else{var n=this.getCurrentUser(),t=null!=n?n.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),t,d)}}catch(f){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
+!0;this.descriptorChanged();null!=k&&k(d);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,d);else{var p=this.getCurrentUser(),t=null!=p?p.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),t,d)}}catch(f){}}"1"==urlParams.test&&EditorUi.debug("DrawioFile.fileSaved",[this])};
DrawioFile.prototype.autosave=function(b,c,e,k){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<c?b:0;this.clearAutosave();var g=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==g&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var b=this.isAutosaveRevision();b&&(this.lastAutosaveRevision=(new Date).getTime());this.save(b,mxUtils.bind(this,function(b){this.autosaveCompleted();null!=e&&e(b)}),mxUtils.bind(this,
function(b){null!=k&&k(b)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),b);this.autosaveThread=g};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-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(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,c){if(null!=b&&null!=c){var e=b.lastIndexOf("."),k=0<e?b.substring(e):"",e=c.lastIndexOf(".");return k===(0<e?c.substring(e):"")}return b==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(b,c){b([])};DrawioFile.prototype.addComment=function(b,c,e){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,c){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};LocalFile=function(b,c,e,k,g,n){DrawioFile.call(this,b,c);this.title=e;this.mode=k?null:App.MODE_DEVICE;this.fileHandle=g;this.desc=n};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&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(b,c){b([])};DrawioFile.prototype.addComment=function(b,c,e){c(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,c){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};LocalFile=function(b,c,e,k,g,p){DrawioFile.call(this,b,c);this.title=e;this.mode=k?null:App.MODE_DEVICE;this.fileHandle=g;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&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!0};LocalFile.prototype.save=function(b,c,e){this.saveAs(this.title,c,e)};LocalFile.prototype.saveAs=function(b,c,e){this.saveFile(b,!1,c,e)};LocalFile.prototype.saveAs=function(b,c,e){this.saveFile(b,!1,c,e)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,c){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,c)};
-LocalFile.prototype.saveFile=function(b,c,e,k,g){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;g||this.updateFileData();var n=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var t=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),f=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
-function(b){this.savingFile=!1;null!=k&&k({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(e){this.invalidFileHandle=null;this.desc.lastModified==e.lastModified?b.write(n?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=
-b;this.fileSaved(t,c,d,f);this.removeDraft()}catch(x){f(x)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;f(b)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,n?"image/png":"text/xml",n);else if(c.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf("."),e=0<e?b.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(n?"&binary=1":""))).simulate(document,
-"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));d()}});n?(c=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){f(b)}),k,this.ui.getCurrentFile()!=this?t:null,c.scale,c.border)):f(t)};LocalFile.prototype.rename=function(b,c,e){this.title=b;this.descriptorChanged();null!=c&&c()};
+LocalFile.prototype.saveFile=function(b,c,e,k,g){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;g||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var t=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=e&&e()}),f=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var f=mxUtils.bind(this,
+function(b){this.savingFile=!1;null!=k&&k({error:b})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(b){this.fileHandle.getFile().then(mxUtils.bind(this,function(e){this.invalidFileHandle=null;this.desc.lastModified==e.lastModified?b.write(p?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){b.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(b){try{var c=this.desc;this.savingFile=!1;this.desc=
+b;this.fileSaved(t,c,d,f);this.removeDraft()}catch(x){f(x)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(b){this.invalidFileHandle=!0;f(b)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,p?"image/png":"text/xml",p);else if(c.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf("."),e=0<e?b.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,
+"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));d()}});p?(c=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){f(b)}),k,this.ui.getCurrentFile()!=this?t:null,c.scale,c.border)):f(t)};LocalFile.prototype.rename=function(b,c,e){this.title=b;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,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/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"},
@@ -3106,21 +3107,21 @@ d){return"1"==mxUtils.getValue(b.style,"sketch","1"==urlParams.rough?"1":"0")}}]
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(b){return"orthogonalEdgeStyle"==mxUtils.getValue(b.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:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",
-defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(b,d){var c=d.editorUi.editor.graph;return"1"==urlParams.test&&1==b.vertices.length&&0==b.edges.length&&c.isTableCell(b.vertices[0])}},{type:"separator"},
-{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLastRow","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==
-b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLast","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.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:"block",dispName:"Block"},{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(b,d){return d.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,d){return 1==b.vertices.length&&
-0==b.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"},{val:"centerPerimeter",dispName:"Center"}]},{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(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isSwimlane(c)||0<f.model.getChildCount(c))},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&
-0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isContainer(c)&&"0"!=b.style.collapsible||!f.isContainer(c)&&"1"==b.style.collapsible)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length&&!d.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",
-dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,d){var c=d.editorUi.editor.graph.model;return 0<b.vertices.length?c.isVertex(c.getParent(b.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(b,d){var c=0<b.vertices.length?d.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=c&&!c.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(b,d){var c=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==c||c==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
-type:"bool",defVal:!1,isVisible:function(b,d){return 0<b.vertices.length&&d.editorUi.editor.graph.isContainer(b.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## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\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## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\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## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\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\nTessa 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-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa 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\nAlison Donovan,System Admin,rdo,Office 3,Tessa 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\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var f=0;f<c.length;f++){var e=c[f];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,f){var e=b.state.strokeColor,g=b.state.strokeWidth,l=b.state.strokeAlpha,k=b.state.dashed,m=f.fillWeight;
-0>m&&(m=f.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(f.fill||"");b.setStrokeWidth(m);b.setDashed(!1);this._drawToContext(d,c,f);b.setDashed(k);b.setStrokeWidth(g);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var f=0;f<d.ops.length;f++){var e=d.ops[f],g=e.data;switch(e.op){case "move":b.moveTo(g[0],g[1]);break;case "bcurveTo":b.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":b.lineTo(g[0],g[1])}}b.end();"fillPath"===d.type&&
+defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(b,d){var c=d.editorUi.editor.graph;return"1"==urlParams.test&&1==b.vertices.length&&0==b.edges.length&&c.isTableCell(b.vertices[0])}},{name:"rowspan",
+dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(b,d){var c=d.editorUi.editor.graph;return"1"==urlParams.test&&1==b.vertices.length&&0==b.edges.length&&c.isTableCell(b.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLastRow","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;
+return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(b,d){var c=d.editorUi.editor.graph.getCellStyle(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null);return"1"==mxUtils.getValue(c,"resizeLast","0")},isVisible:function(b,d){var c=d.editorUi.editor.graph;return 1==b.vertices.length&&0==b.edges.length&&c.isTable(b.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:"block",dispName:"Block"},{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(b,d){return d.editorUi.editor.graph.isCellConnectable(1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.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"},{val:"centerPerimeter",dispName:"Center"}]},{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(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=
+c&&(f.isSwimlane(c)||0<f.model.getChildCount(c))},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(b,d){var c=1==b.vertices.length&&0==b.edges.length?b.vertices[0]:null,f=d.editorUi.editor.graph;return null!=c&&(f.isContainer(c)&&"0"!=b.style.collapsible||!f.isContainer(c)&&"1"==b.style.collapsible)},isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length}},{name:"recursiveResize",
+dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(b,d){return 1==b.vertices.length&&0==b.edges.length&&!d.editorUi.editor.graph.isSwimlane(b.vertices[0])&&null==mxUtils.getValue(b.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(b,d){var c=d.editorUi.editor.graph.model;return 0<b.vertices.length?c.isVertex(c.getParent(b.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(b,d){var c=0<b.vertices.length?d.editorUi.editor.graph.getCellGeometry(b.vertices[0]):null;return null!=c&&!c.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(b,d){var c=mxUtils.getValue(b.style,mxConstants.STYLE_FILLCOLOR,null);return d.editorUi.editor.graph.isSwimlane(b.vertices[0])||null==c||c==mxConstants.NONE||null!=b.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(b,d){return 0<b.vertices.length&&d.editorUi.editor.graph.isContainer(b.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## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\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## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\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## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\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\nTessa 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-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa 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\nAlison Donovan,System Admin,rdo,Office 3,Tessa 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\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(b){var d=rough.canvas({getContext:function(){return b}});d.draw=function(d){var c=d.sets||[];d=d.options||this.getDefaultOptions();for(var f=0;f<c.length;f++){var e=c[f];switch(e.type){case "path":null!=d.stroke&&this._drawToContext(b,e,d);break;case "fillPath":this._drawToContext(b,e,d);break;case "fillSketch":this.fillSketch(b,e,d)}}};d.fillSketch=function(d,c,f){var e=b.state.strokeColor,g=b.state.strokeWidth,l=b.state.strokeAlpha,m=b.state.dashed,k=f.fillWeight;
+0>k&&(k=f.strokeWidth/2);b.setStrokeAlpha(b.state.fillAlpha);b.setStrokeColor(f.fill||"");b.setStrokeWidth(k);b.setDashed(!1);this._drawToContext(d,c,f);b.setDashed(m);b.setStrokeWidth(g);b.setStrokeColor(e);b.setStrokeAlpha(l)};d._drawToContext=function(b,d,c){b.begin();for(var f=0;f<d.ops.length;f++){var e=d.ops[f],g=e.data;switch(e.op){case "move":b.moveTo(g[0],g[1]);break;case "bcurveTo":b.curveTo(g[0],g[1],g[2],g[3],g[4],g[5]);break;case "lineTo":b.lineTo(g[0],g[1])}}b.end();"fillPath"===d.type&&
c.filled?b.fill():b.stroke()};return d};(function(){function b(d,c,f){this.canvas=d;this.rc=c;this.shape=f;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,b.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,b.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,b.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,b.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,b.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,b.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,b.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,b.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
b.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,b.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,b.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,b.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,b.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,b.prototype.fillAndStroke);
@@ -3130,20 +3131,20 @@ mxUtils.getValue(this.shape.style,"simplification",f.simplification);c.disableMu
"zigzagOffset",g);g=mxUtils.getValue(this.shape.style,"fillWeight",-1);c.fillWeight="auto"==g?-1:g;g=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==g&&(g=null!=this.shape.state?this.shape.state.view.graph.defaultPageBackgroundColor:"#ffffff",g=null!=c.fill&&(null!=e||null!=g&&c.fill.toLowerCase()==g.toLowerCase())?"solid":f.fillStyle);c.fillStyle=g;return c};b.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};b.prototype.end=function(){this.passThrough&&
this.originalEnd.apply(this.canvas,arguments)};b.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};b.prototype.lineTo=function(b,d){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,b,d),this.lastX=b,this.lastY=d)};b.prototype.moveTo=
function(b,d){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,b,d),this.lastX=b,this.lastY=d,this.firstX=b,this.firstY=d)};b.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};b.prototype.quadTo=function(b,d,c,f){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,b,d,c,f),this.lastX=c,this.lastY=f)};b.prototype.curveTo=function(b,d,c,f,e,g){this.passThrough?
-this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,f,e,g),this.lastX=e,this.lastY=g)};b.prototype.arcTo=function(b,d,c,f,e,g,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var k=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,f,e,g,l);if(null!=k)for(var m=0;m<k.length;m+=6)this.curveTo(k[m],k[m+1],k[m+2],k[m+3],k[m+4],k[m+5]);this.lastX=g;this.lastY=l}};b.prototype.rect=function(b,d,c,f){this.passThrough?this.originalRect.apply(this.canvas,
+this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,b,d,c,f,e,g),this.lastX=e,this.lastY=g)};b.prototype.arcTo=function(b,d,c,f,e,g,l){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var m=mxUtils.arcToCurves(this.lastX,this.lastY,b,d,c,f,e,g,l);if(null!=m)for(var k=0;k<m.length;k+=6)this.curveTo(m[k],m[k+1],m[k+2],m[k+3],m[k+4],m[k+5]);this.lastX=g;this.lastY=l}};b.prototype.rect=function(b,d,c,f){this.passThrough?this.originalRect.apply(this.canvas,
arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(b,d,c,f,this.getStyle(!0,!0)))};b.prototype.ellipse=function(b,d,c,f){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(b+c/2,d+f/2,c,f,this.getStyle(!0,!0)))};b.prototype.roundrect=function(b,d,c,f,e,g){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(b+e,d),this.lineTo(b+c-e,d),this.quadTo(b+c,d,b+c,d+g),this.lineTo(b+
c,d+f-g),this.quadTo(b+c,d+f,b+c-e,d+f),this.lineTo(b+e,d+f),this.quadTo(b,d+f,b,d+f-g),this.lineTo(b,d+g),this.quadTo(b,d,b+e,d))};b.prototype.drawPath=function(b){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),b)}catch(ca){}this.passThrough=!1}else if(null!=this.nextShape){for(var d in b)this.nextShape.options[d]=b[d];null==b.stroke&&delete this.nextShape.options.stroke;b.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);
this.passThrough=!1}};b.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};b.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};b.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};b.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;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;
this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(d){return new b(d,Editor.createRoughCanvas(d),this)};var d=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(b){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0")?d.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(b):this.createRoughCanvas(b)};var c=mxShape.prototype.paint;
-mxShape.prototype.paint=function(d){var f=d.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=d.handJiggle&&d.handJiggle.constructor==b&&!this.outline){d.save();var g=this.fill,l=this.stroke;this.stroke=this.fill=null;var k=this.configurePointerEvents,m=d.setStrokeColor;d.setStrokeColor=function(){};var p=d.setFillColor;d.setFillColor=function(){};e||null==g||(this.configurePointerEvents=function(){});d.handJiggle.passThrough=!0;
-c.apply(this,arguments);d.handJiggle.passThrough=!1;d.setFillColor=p;d.setStrokeColor=m;this.configurePointerEvents=k;this.stroke=l;this.fill=g;d.restore();e&&null!=g&&(d.addTolerance=function(){})}c.apply(this,arguments);d.addTolerance=f};var f=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(d,c,e,g,l,k){null!=d.handJiggle&&d.handJiggle.constructor==b?(d.handJiggle.passThrough=!0,f.apply(this,arguments),d.handJiggle.passThrough=!1):f.apply(this,arguments)}})();Editor.fastCompress=
+mxShape.prototype.paint=function(d){var f=d.addTolerance,e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=d.handJiggle&&d.handJiggle.constructor==b&&!this.outline){d.save();var g=this.fill,l=this.stroke;this.stroke=this.fill=null;var m=this.configurePointerEvents,k=d.setStrokeColor;d.setStrokeColor=function(){};var n=d.setFillColor;d.setFillColor=function(){};e||null==g||(this.configurePointerEvents=function(){});d.handJiggle.passThrough=!0;
+c.apply(this,arguments);d.handJiggle.passThrough=!1;d.setFillColor=n;d.setStrokeColor=k;this.configurePointerEvents=m;this.stroke=l;this.fill=g;d.restore();e&&null!=g&&(d.addTolerance=function(){})}c.apply(this,arguments);d.addTolerance=f};var f=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(d,c,e,g,l,m){null!=d.handJiggle&&d.handJiggle.constructor==b?(d.handJiggle.passThrough=!0,f.apply(this,arguments),d.handJiggle.passThrough=!1):f.apply(this,arguments)}})();Editor.fastCompress=
function(b){return null==b||0==b.length||"undefined"===typeof pako?b:Graph.arrayBufferToString(pako.deflateRaw(b))};Editor.fastDecompress=function(b){return null==b||0==b.length||"undefined"===typeof pako?b:pako.inflateRaw(Graph.stringToArrayBuffer(atob(b)),{to:"string"})};Editor.extractGraphModel=function(b,d,c){if(null!=b&&"undefined"!==typeof pako){var f=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=f&&0<f.length)for(var g=0;g<f.length;g++)if("mxgraph"==f[g].getAttribute("class")){e.push(f[g]);
break}0<e.length&&(f=e[0].getAttribute("data-mxgraph"),null!=f?(e=JSON.parse(f),null!=e&&null!=e.xml&&(b=mxUtils.parseXml(e.xml),b=b.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(f=mxUtils.getTextContent(e[0]),f=Graph.decompress(f,null,c),0<f.length&&(b=mxUtils.parseXml(f),b=b.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(f=b.getAttribute("content"),null!=f&&"<"!=f.charAt(0)&&"%"!=f.charAt(0)&&(f=unescape(window.atob?atob(f):Base64.decode(cont,f))),null!=f&&"%"==f.charAt(0)&&
(f=decodeURIComponent(f)),null!=f&&0<f.length)b=mxUtils.parseXml(f).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||d||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(f=b.getElementsByTagName("diagram"),0<f.length&&(e=f[Math.max(0,Math.min(f.length-1,urlParams.page||0))])),null!=e&&(b=Editor.parseDiagramNode(e,c)));null==b||"mxGraphModel"==b.nodeName||d&&"mxfile"==b.nodeName||(b=null);return b};Editor.parseDiagramNode=function(b,d){var c=mxUtils.trim(mxUtils.getTextContent(b)),
f=null;0<c.length?(c=Graph.decompress(c,null,d),null!=c&&0<c.length&&(f=mxUtils.parseXml(c).documentElement)):(c=mxUtils.getChildNodes(b),0<c.length&&(f=mxUtils.createXmlDocument(),f.appendChild(f.importNode(c[0],!0)),f=f.documentElement));return f};Editor.getDiagramNodeXml=function(b){var d=mxUtils.getTextContent(b),c=null;0<d.length?c=Graph.decompress(d):null!=b.firstChild&&(c=mxUtils.getXml(b.firstChild));return c};Editor.extractGraphModelFromPdf=function(b){b=b.substring(b.indexOf(",")+1);b=window.atob&&
-!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",f=0,e=0,g=[],l=null;e<b.length;){var k=b.charCodeAt(e),e=e+1;10!=k&&(d+=String.fromCharCode(k));k=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==
-f){var m=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(m>e){c=b.substring(e,m);break}}10==k&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],g[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(g));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<
+!mxClient.IS_SF?atob(b):Base64.decode(b,!0);if("%PDF-1.7"==b.substring(0,8)){var d=b.indexOf("EmbeddedFile");if(-1<d){var c=b.indexOf("stream",d)+9;if(0<b.substring(d,c).indexOf("application#2Fvnd.jgraph.mxfile"))return d=b.indexOf("endstream",c-1),pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(c,d)),{to:"string"})}return null}for(var c=null,d="",f=0,e=0,g=[],l=null;e<b.length;){var m=b.charCodeAt(e),e=e+1;10!=m&&(d+=String.fromCharCode(m));m=="/Subject (%3Cmxfile".charCodeAt(f)?f++:f=0;if(19==
+f){var k=b.indexOf("%3C%2Fmxfile%3E)",e)+15,e=e-9;if(k>e){c=b.substring(e,k);break}}10==m&&("endobj"==d?l=null:"obj"==d.substring(d.length-3,d.length)||"xref"==d||"trailer"==d?(l=[],g[d.split(" ")[0]]=l):null!=l&&l.push(d),d="")}null==c&&(c=Editor.extractGraphModelFromXref(g));null!=c&&(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(b){var d=b.trailer,c=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<
d.length&&(d=b[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(b=b[d[1]],null!=b&&(b=b.join("\n"),c=b.substring(1,b.length-1))))));return c};Editor.extractGraphModelFromPng=function(b){var d=null;try{var c=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(f,mxUtils.bind(this,function(b,c,e){b=f.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=pako.inflateRaw(Graph.stringToArrayBuffer(b.substring(e+
2)),{to:"string"}).replace(/\+/g," "),null!=b&&0<b.length&&(d=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&("mxGraphModel"==b[0]||"mxfile"==b[0])&&(d=b[1]));if(null!=d||"IDAT"==c)return!0}))}catch(I){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(b,d){var c=null,f=null!=b?b.getElementsByTagName("parsererror"):null;null!=f&&0<f.length&&(c=d||mxResources.get("invalidChars"),f=f[0].getElementsByTagName("div"),
0<f.length&&(c=mxUtils.getTextContent(f[0])));return null!=c?mxUtils.trim(c):c};Editor.addRetryToError=function(b,d){if(null!=b){var c=null!=b.error?b.error:b;null==c.retry&&(c.retry=d)}};Editor.configure=function(b,d){if(null!=b){Editor.config=b;Editor.configVersion=b.version;Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;
@@ -3172,30 +3173,30 @@ function(b,c,f,e){void 0!==c?d.push(c.replace(/\\'/g,"'")):void 0!==f?d.push(f.r
"https://raw.githubusercontent.com/"===b.substring(0,34)};Editor.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var d=b.convert,c=this;b.convert=function(f){if(null!=f){var e="http://"==f.substring(0,7)||"https://"==f.substring(0,8);e&&!navigator.onLine?f=Editor.svgBrokenImage.src:!e||f.substring(0,b.baseUrl.length)==b.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(f)?"chrome-extension://"==f.substring(0,19)||mxClient.IS_CHROMEAPP||(f=d.apply(this,arguments)):
f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return b};Editor.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};Editor.prototype.convertImageToDataUri=function(b,d){try{var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;d(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){window.clearTimeout(f);c&&d(Editor.createSvgDataUri(b.getText()))}),function(){window.clearTimeout(f);
c&&d(Editor.svgBrokenImage.src)});else{var e=new Image;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(f);if(c)try{var b=document.createElement("canvas"),g=b.getContext("2d");b.height=e.height;b.width=e.width;g.drawImage(e,0,0);d(b.toDataURL())}catch(da){d(Editor.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(f);c&&d(Editor.svgBrokenImage.src)};e.src=b}}catch(ba){d(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(b,d,
-c,f){null==f&&(f=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,function(c,l){for(var k=b.getElementsByTagName(c),m=0;m<k.length;m++)mxUtils.bind(this,function(c){try{if(null!=c){var k=f.convert(c.getAttribute(l));if(null!=k&&"data:"!=k.substring(0,5)){var m=g[k];null==m?(e++,this.convertImageToDataUri(k,function(f){null!=f&&(g[k]=f,c.setAttribute(l,f));e--;0==e&&d(b)})):c.setAttribute(l,m)}else null!=k&&c.setAttribute(l,k)}}catch(V){}})(k[m])});c("image","xlink:href");c("img",
+c,f){null==f&&(f=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,function(c,l){for(var m=b.getElementsByTagName(c),k=0;k<m.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var m=f.convert(c.getAttribute(l));if(null!=m&&"data:"!=m.substring(0,5)){var k=g[m];null==k?(e++,this.convertImageToDataUri(m,function(f){null!=f&&(g[m]=f,c.setAttribute(l,f));e--;0==e&&d(b)})):c.setAttribute(l,k)}else null!=m&&c.setAttribute(l,m)}}catch(V){}})(m[k])});c("image","xlink:href");c("img",
"src");0==e&&d(b)};Editor.base64Encode=function(b){for(var d="",c=0,f=b.length,e,g,l;c<f;){e=b.charCodeAt(c++)&255;if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}g=b.charCodeAt(c++);if(c==f){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<
4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);d+="=";break}l=b.charCodeAt(c++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return d};
-Editor.prototype.loadUrl=function(b,d,c,f,e,g,l,k){try{var m=!l&&(f||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var p=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=d){var f=b.getText();if(m){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
-for(var f=Array(b.length),e=0;e<b.length;e++)f[e]=String.fromCharCode(b[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+Editor.base64Encode(f)}d(f)}}else null!=c&&(0==b.getStatus()?c({message:mxResources.get("accessDenied")},b):c({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=c&&c({message:mxResources.get("error")+" "+b.getStatus()})},m,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:p})},k)});p()}catch(ia){null!=c&&c(ia)}};Editor.prototype.absoluteCssFonts=
+Editor.prototype.loadUrl=function(b,d,c,f,e,g,l,m){try{var k=!l&&(f||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.pdf)($|\?)/i.test(b));e=null!=e?e:!0;var n=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=d){var f=b.getText();if(k){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();
+for(var f=Array(b.length),e=0;e<b.length;e++)f[e]=String.fromCharCode(b[e]);f=f.join("")}g=null!=g?g:"data:image/png;base64,";f=g+Editor.base64Encode(f)}d(f)}}else null!=c&&(0==b.getStatus()?c({message:mxResources.get("accessDenied")},b):c({message:mxResources.get("error")+" "+b.getStatus()},b))}),function(b){null!=c&&c({message:mxResources.get("error")+" "+b.getStatus()})},k,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:n})},m)});n()}catch(ia){null!=c&&c(ia)}};Editor.prototype.absoluteCssFonts=
function(b){var d=null;if(null!=b){var c=b.split("url(");if(0<c.length){d=[c[0]];b=window.location.pathname;var f=null!=b?b.lastIndexOf("/"):-1;0<=f&&(b=b.substring(0,f+1));var f=document.getElementsByTagName("base"),e=null;null!=f&&0<f.length&&(e=f[0].getAttribute("href"));for(var g=1;g<c.length;g++)if(f=c[g].indexOf(")"),0<f){var l=Editor.trimCssUrl(c[g].substring(0,f));this.graph.isRelativeUrl(l)&&(l=null!=e?e+l:window.location.protocol+"//"+window.location.hostname+("/"==l.charAt(0)?"":b)+l);
d.push('url("'+l+'"'+c[g].substring(f))}else d.push(c[g])}else d=[b]}return null!=d?d.join(""):null};Editor.prototype.embedCssFonts=function(b,d){var c=b.split("url("),f=0;null==this.cachedFonts&&(this.cachedFonts={});var e=mxUtils.bind(this,function(){if(0==f){for(var b=[c[0]],e=1;e<c.length;e++){var g=c[e].indexOf(")");b.push('url("');b.push(this.cachedFonts[Editor.trimCssUrl(c[e].substring(0,g))]);b.push('"'+c[e].substring(g))}d(b.join(""))}});if(0<c.length){for(var g=1;g<c.length;g++){var l=c[g].indexOf(")"),
-k=null,m=c[g].indexOf("format(",l);0<m&&(k=Editor.trimCssUrl(c[g].substring(m+7,c[g].indexOf(")",m))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;f++;var d="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(b))d="image/svg+xml";else if("otf"==k||"embedded-opentype"==k||/(\.otf)($|\?)/i.test(b))d="application/x-font-opentype";else if("woff"==k||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==k||/(\.woff2)($|\?)/i.test(b))d="application/font-woff2";
-else if("eot"==k||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";else if("sfnt"==k||/(\.sfnt)($|\?)/i.test(b))d="application/font-sfnt";var c=b;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(c,mxUtils.bind(this,function(d){this.cachedFonts[b]=d;f--;e()}),mxUtils.bind(this,function(b){f--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[g].substring(0,l)),k)}e()}else d(b)};Editor.prototype.loadFonts=
+m=null,k=c[g].indexOf("format(",l);0<k&&(m=Editor.trimCssUrl(c[g].substring(k+7,c[g].indexOf(")",k))));mxUtils.bind(this,function(b){if(null==this.cachedFonts[b]){this.cachedFonts[b]=b;f++;var d="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(b))d="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(b))d="application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(b))d="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(b))d="application/font-woff2";
+else if("eot"==m||/(\.eot)($|\?)/i.test(b))d="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.sfnt)($|\?)/i.test(b))d="application/font-sfnt";var c=b;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(c,mxUtils.bind(this,function(d){this.cachedFonts[b]=d;f--;e()}),mxUtils.bind(this,function(b){f--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(Editor.trimCssUrl(c[g].substring(0,l)),m)}e()}else d(b)};Editor.prototype.loadFonts=
function(b){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(d){this.resolvedFontCss=d;b()})):b()};Editor.prototype.embedExtFonts=function(b){var d=this.graph.getCustomFonts();if(0<d.length){var c="",f=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==f&&this.embedCssFonts(c,b)}),g=0;g<d.length;g++)mxUtils.bind(this,function(b,d){Graph.isCssFontUrl(d)?null==this.cachedGoogleFonts[d]?(f++,this.loadUrl(d,
mxUtils.bind(this,function(b){this.cachedGoogleFonts[d]=b;c+=b;f--;e()}),mxUtils.bind(this,function(b){f--;c+="@import url("+d+");";e()}))):c+=this.cachedGoogleFonts[d]:c+='@font-face {font-family: "'+b+'";src: url("'+d+'")}'})(d[g].name,d[g].url);e()}else b()};Editor.prototype.addMathCss=function(b){b=b.getElementsByTagName("defs");if(null!=b&&0<b.length)for(var d=document.getElementsByTagName("style"),c=0;c<d.length;c++)0<mxUtils.getTextContent(d[c]).indexOf("MathJax")&&b[0].appendChild(d[c].cloneNode(!0))};
Editor.prototype.addFontCss=function(b,d){d=null!=d?d:this.absoluteCssFonts(this.fontCss);if(null!=d){var c=b.getElementsByTagName("defs"),f=b.ownerDocument;0==c.length?(c=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):c=c[0];f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"style"):f.createElement("style");f.setAttribute("type","text/css");mxUtils.setTextContent(f,d);c.appendChild(f)}};
-Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,k,m,p,q,n,u,v,x,t,y,C){try{g=null!=g?g:!0;l=null!=l?l:!0;n=null!=n?n:this.graph;u=null!=u?u:0;var E=m?null:n.background;E==mxConstants.NONE&&(E=null);null==E&&(E=f);null==E&&0==m&&(E=t?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(n.getSvg(null,null,u,v,null,l,null,null,null,p,null,t,y,C),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(f,0,0);b(m,c)},0):(v.drawImage(f,0,0),b(m,c))},m=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));k=null!=k?k:1;null!=d&&(k=g?Math.min(1,Math.min(3*d/(4*q),d/p)):d/p);k=this.getMaxCanvasScale(p,q,k);p=
-Math.ceil(k*p);q=Math.ceil(k*q);m.setAttribute("width",p);m.setAttribute("height",q);var v=m.getContext("2d");null!=E&&(v.beginPath(),v.rect(0,0,p,q),v.fillStyle=E,v.fill());1!=k&&v.scale(k,k);if(x){var t=n.view,y=t.scale;t.scale=1;var B=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var B="data:image/svg+xml;base64,"+B,C=n.gridSize*t.gridSteps*k,F=n.getGraphBounds(),A=t.translate.x*y,N=t.translate.y*y,I=A+(F.x-A)/y-u,G=N+(F.y-N)/y-u,D=new Image;D.onload=function(){try{for(var b=
--Math.round(C-mxUtils.mod((A-I)*k,C)),d=-Math.round(C-mxUtils.mod((N-G)*k,C));b<p;b+=C)for(var c=d;c<q;c+=C)v.drawImage(D,b/k,c/k);l()}catch(Y){null!=e&&e(Y)}};D.onerror=function(b){null!=e&&e(b)};D.src=B}else l()}catch(wa){null!=e&&e(wa)}});f.onerror=function(b){null!=e&&e(b)};p&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(aa){null!=
-e&&e(aa)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ja){null!=e&&e(ja)}}))}catch(aa){null!=e&&e(aa)}}),c,q)}catch(qa){null!=e&&e(qa)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var n=g,t=0;8>t;t++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[g]=n;Editor.updateCRC=function(b,d,c,f){for(var e=0;e<f;e++)b=Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>
-8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,f,e){function g(b,d){var c=m;m+=d;return b.substring(c,m)}function l(b){b=g(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function k(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var m=0;if(g(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
-10))null!=e&&e();else if(g(b,4),"IHDR"!=g(b,4))null!=e&&e();else{g(b,17);e=b.substring(0,m);do{var p=l(b);if("IDAT"==g(b,4)){e=b.substring(0,m-8);"pHYs"==d&&"dpi"==c?(c=Math.round(f/.0254),c=k(c)+k(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,d,0,4);f=Editor.updateCRC(f,c,0,c.length);e+=k(c.length)+d+c+k(f^4294967295);e+=b.substring(m-8,b.length);break}e+=b.substring(m-8,m-4+p);g(b,p);g(b,4)}while(p);return"data:image/png;base64,"+
+Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(b,d,c){var f=mxClient.IS_FF?8192:16384;return Math.min(c,Math.min(f/b,f/d))};Editor.prototype.exportToCanvas=function(b,d,c,f,e,g,l,m,k,n,q,p,u,v,x,t,y,C){try{g=null!=g?g:!0;l=null!=l?l:!0;p=null!=p?p:this.graph;u=null!=u?u:0;var E=k?null:p.background;E==mxConstants.NONE&&(E=null);null==E&&(E=f);null==E&&0==k&&(E=t?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(p.getSvg(null,null,u,v,null,l,null,null,null,n,null,t,y,C),mxUtils.bind(this,function(c){try{var f=new Image;f.onload=mxUtils.bind(this,function(){try{var l=function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(f,0,0);b(k,c)},0):(v.drawImage(f,0,0),b(k,c))},k=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),q=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=d&&(m=g?Math.min(1,Math.min(3*d/(4*q),d/n)):d/n);m=this.getMaxCanvasScale(n,q,m);n=
+Math.ceil(m*n);q=Math.ceil(m*q);k.setAttribute("width",n);k.setAttribute("height",q);var v=k.getContext("2d");null!=E&&(v.beginPath(),v.rect(0,0,n,q),v.fillStyle=E,v.fill());1!=m&&v.scale(m,m);if(x){var t=p.view,y=t.scale;t.scale=1;var B=btoa(unescape(encodeURIComponent(t.createSvgGrid(t.gridColor))));t.scale=y;var B="data:image/svg+xml;base64,"+B,C=p.gridSize*t.gridSteps*m,F=p.getGraphBounds(),A=t.translate.x*y,N=t.translate.y*y,I=A+(F.x-A)/y-u,G=N+(F.y-N)/y-u,D=new Image;D.onload=function(){try{for(var b=
+-Math.round(C-mxUtils.mod((A-I)*m,C)),d=-Math.round(C-mxUtils.mod((N-G)*m,C));b<n;b+=C)for(var c=d;c<q;c+=C)v.drawImage(D,b/m,c/m);l()}catch(Y){null!=e&&e(Y)}};D.onerror=function(b){null!=e&&e(b)};D.src=B}else l()}catch(wa){null!=e&&e(wa)}});f.onerror=function(b){null!=e&&e(b)};n&&this.graph.addSvgShadow(c);this.graph.mathEnabled&&this.addMathCss(c);var l=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(c,this.resolvedFontCss),f.src=Editor.createSvgDataUri(mxUtils.getXml(c))}catch(aa){null!=
+e&&e(aa)}});this.embedExtFonts(mxUtils.bind(this,function(b){try{null!=b&&this.addFontCss(c,b),this.loadFonts(l)}catch(ja){null!=e&&e(ja)}}))}catch(aa){null!=e&&e(aa)}}),c,q)}catch(qa){null!=e&&e(qa)}};Editor.crcTable=[];for(var g=0;256>g;g++)for(var p=g,t=0;8>t;t++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[g]=p;Editor.updateCRC=function(b,d,c,f){for(var e=0;e<f;e++)b=Editor.crcTable[(b^d.charCodeAt(c+e))&255]^b>>>8;return b};Editor.crc32=function(b){for(var d=-1,c=0;c<b.length;c++)d=d>>>
+8^Editor.crcTable[(d^b.charCodeAt(c))&255];return(d^-1)>>>0};Editor.writeGraphModelToPng=function(b,d,c,f,e){function g(b,d){var c=k;k+=d;return b.substring(c,k)}function l(b){b=g(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function m(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var k=0;if(g(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
+10))null!=e&&e();else if(g(b,4),"IHDR"!=g(b,4))null!=e&&e();else{g(b,17);e=b.substring(0,k);do{var n=l(b);if("IDAT"==g(b,4)){e=b.substring(0,k-8);"pHYs"==d&&"dpi"==c?(c=Math.round(f/.0254),c=m(c)+m(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+f;f=4294967295;f=Editor.updateCRC(f,d,0,4);f=Editor.updateCRC(f,c,0,c.length);e+=m(c.length)+d+c+m(f^4294967295);e+=b.substring(k-8,b.length);break}e+=b.substring(k-8,k-4+n);g(b,n);g(b,4)}while(n);return"data:image/png;base64,"+
(window.btoa?btoa(e):Base64.encode(e,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,c){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&
-(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),
-function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.enableShadowOption||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));b.appendChild(f)}return b};var q=DiagramFormatPanel.prototype.addOptions;
-DiagramFormatPanel.prototype.addOptions=function(b){b=q.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var f=d.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);d.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
+(EditDataDialog.getDisplayIdForCell=function(b,d){var c=null;null!=b.editor.graph.getModel().getParent(d)?c=d.getId():null!=b.currentPage&&(c=b.currentPage.getId());return c});if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var b=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=b&&b.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(b){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(b){b=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,c=d.editor.graph,f=this.createOption(mxResources.get("shadow"),
+function(){return c.shadowVisible},function(b){var f=new ChangePageSetup(d);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=b;c.model.execute(f)},{install:function(b){this.listener=function(){b(c.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.enableShadowOption||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));b.appendChild(f)}return b};var n=DiagramFormatPanel.prototype.addOptions;
+DiagramFormatPanel.prototype.addOptions=function(b){b=n.apply(this,arguments);var d=this.editorUi,c=d.editor.graph;if(c.isEnabled()){var f=d.getCurrentFile();if(null!=f&&f.isAutosaveOptional()){var e=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(b){d.editor.setAutosave(b);d.editor.autosave&&f.isModified()&&f.fileChanged()},{install:function(b){this.listener=function(){b(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
b.appendChild(e)}}if(this.isMathOptionVisible()&&c.isEnabled()&&"undefined"!==typeof MathJax){e=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(b){d.actions.get("mathematicalTypesetting").funct()},{install:function(b){this.listener=function(){b(c.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});e.style.paddingTop="5px";b.appendChild(e);var g=d.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");
g.style.position="relative";g.style.marginLeft="6px";g.style.top="2px";e.appendChild(g)}return b};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
@@ -3220,37 +3221,37 @@ 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(b,d,c){if(null!=d){var f=function(b){if(null!=b)if(c)for(var f=
0;f<b.length;f++)d[b[f].name]=b[f];else for(var e in d){for(var g=!1,f=0;f<b.length;f++)if(b[f].name==e&&b[f].type==d[e].type){g=!0;break}g||delete d[e]}},e=this.editorUi.editor.graph.view.getState(b);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)),
-f(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{f(JSON.parse(b))}catch(ba){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},c=b.vertices,f=b.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],d,0==
-e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],d,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,b))}};var u=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var d=this.format.getSelectionState(),c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",
+f(e.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{f(JSON.parse(b))}catch(ba){}}};var u=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var b=this.format.getSelectionState();"image"!=b.style.shape&&!b.containsLabel&&0<b.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));u.apply(this,arguments);if(Editor.enableCustomProperties){for(var d={},c=b.vertices,f=b.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],d,0==
+e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],d,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(d).length&&this.container.appendChild(this.addProperties(this.createPanel(),d,b))}};var v=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var d=this.format.getSelectionState(),c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",
mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="104px";c.style.marginRight="2px";b.appendChild(c);0<d.cells.length?(c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("pasteStyle").funct()})),c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")"),c.style.marginBottom="2px",c.style.width="104px",b.appendChild(c)):
-c.style.width="210px";mxUtils.br(b);return u.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,d,c){function f(b,d,c,f){n.getModel().beginUpdate();try{var e=[],g=[];if(null!=c.index){for(var l=[],k=c.parentRow.nextSibling;k&&k.getAttribute("data-pName")==b;)l.push(k.getAttribute("data-pValue")),k=k.nextSibling;c.index<l.length?null!=f?l.splice(f,1):l[c.index]=d:l.push(d);null!=c.size&&l.length>c.size&&(l=l.slice(0,c.size));d=l.join(",");
-null!=c.countProperty&&(n.setCellStyles(c.countProperty,l.length,n.getSelectionCells()),e.push(c.countProperty),g.push(l.length))}n.setCellStyles(b,d,n.getSelectionCells());e.push(b);g.push(d);if(null!=c.dependentProps)for(b=0;b<c.dependentProps.length;b++){var m=c.dependentPropsDefVal[b],p=c.dependentPropsVals[b];if(p.length>d)p=p.slice(0,d);else for(var u=p.length;u<d;u++)p.push(m);p=p.join(",");n.setCellStyles(c.dependentProps[b],p,n.getSelectionCells());e.push(c.dependentProps[b]);g.push(p)}if("function"==
-typeof c.onChange)c.onChange(n,d);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}}function e(d,c,f){var e=mxUtils.getOffset(b,!0),g=mxUtils.getOffset(d,!0);c.style.position="absolute";c.style.left=g.x-e.x+"px";c.style.top=g.y-e.y+"px";c.style.width=d.offsetWidth+"px";c.style.height=d.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function g(b,d,c){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(q,function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;f(b,d,c)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function l(b,d,c,e,g,l,k){null!=d&&(d=d.split(","),u.push({name:b,
-values:d,type:c,defVal:e,countProperty:g,parentRow:l,isDeletable:!0,flipBkg:k}));btn=mxUtils.button("+",mxUtils.bind(q,function(d){for(var m=l,q=0;null!=m.nextSibling;)if(m.nextSibling.getAttribute("data-pName")==b)m=m.nextSibling,q++;else break;var n={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,countProperty:g},q=p(b,"",n,0==q%2,k);f(b,e,n);m.parentNode.insertBefore(q,m.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
-function k(b,d,c,f,e,g,l){if(0<e){var k=Array(e);d=null!=d?d.split(","):[];for(var m=0;m<e;m++)k[m]=null!=d[m]?d[m]:null!=f?f:"";u.push({name:b,values:k,type:c,defVal:f,parentRow:g,flipBkg:l,size:e})}return document.createElement("div")}function m(b,d,c){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){f(b,e.checked?"1":"0",c)});return e}function p(d,c,p,n,u){var v=p.dispName,x=p.type,t=document.createElement("tr");t.className="gePropRow"+
-(u?"Dark":"")+(n?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",d);t.setAttribute("data-pValue",c);n=!1;null!=p.index&&(t.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",n=!0);var y=document.createElement("td");y.className="gePropRowCell";v=mxResources.get(v,null,v);mxUtils.write(y,v);y.setAttribute("title",v);n&&(y.style.textAlign="right");t.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(g(d,c,p));else if("bool"==
-x||"boolean"==x)y.appendChild(m(d,c,p));else if("enum"==x){var C=p.enumList;for(u=0;u<C.length;u++)if(v=C[u],v.val==c){mxUtils.write(y,mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(q,function(){var g=document.createElement("select");e(y,g);for(var l=0;l<C.length;l++){var k=C[l],m=document.createElement("option");m.value=mxUtils.htmlEntities(k.val);mxUtils.write(m,mxResources.get(k.dispName,null,k.dispName));g.appendChild(m)}g.value=c;b.appendChild(g);
-mxEvent.addListener(g,"change",function(){var b=mxUtils.htmlEntities(g.value);f(d,b,p)});g.focus();mxEvent.addListener(g,"blur",function(){b.removeChild(g)})}))}else"dynamicArr"==x?y.appendChild(l(d,c,p.subType,p.subDefVal,p.countProperty,t,u)):"staticArr"==x?y.appendChild(k(d,c,p.subType,p.subDefVal,p.size,t,u)):"readOnly"==x?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=c,u.style.width="96px",u.style.borderWidth="0px",y.appendChild(u)):(y.innerHTML=c,mxEvent.addListener(y,
-"click",mxUtils.bind(q,function(){function g(){var b=l.value,b=0==b.length&&"string"!=x?0:b;p.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=p.min&&b<p.min?b=p.min:null!=p.max&&b>p.max&&(b=p.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):b)+"");f(d,b,p)}var l=document.createElement("input");e(y,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||p.allowAuto||(l.type="number",l.step="int"==x?"1":"any",null!=p.min&&
-(l.min=parseFloat(p.min)),null!=p.max&&(l.max=parseFloat(p.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&g()});l.focus();mxEvent.addListener(l,"blur",function(){g()})})));p.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(b){f(d,"",p,p.index);mxEvent.consume(b)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",y.appendChild(u));t.appendChild(y);return t}var q=this,n=this.editorUi.editor.graph,u=[];b.style.position=
+c.style.width="210px";mxUtils.br(b);return v.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(b,d,c){function f(b,d,c,f){p.getModel().beginUpdate();try{var e=[],g=[];if(null!=c.index){for(var l=[],m=c.parentRow.nextSibling;m&&m.getAttribute("data-pName")==b;)l.push(m.getAttribute("data-pValue")),m=m.nextSibling;c.index<l.length?null!=f?l.splice(f,1):l[c.index]=d:l.push(d);null!=c.size&&l.length>c.size&&(l=l.slice(0,c.size));d=l.join(",");
+null!=c.countProperty&&(p.setCellStyles(c.countProperty,l.length,p.getSelectionCells()),e.push(c.countProperty),g.push(l.length))}p.setCellStyles(b,d,p.getSelectionCells());e.push(b);g.push(d);if(null!=c.dependentProps)for(b=0;b<c.dependentProps.length;b++){var k=c.dependentPropsDefVal[b],n=c.dependentPropsVals[b];if(n.length>d)n=n.slice(0,d);else for(var u=n.length;u<d;u++)n.push(k);n=n.join(",");p.setCellStyles(c.dependentProps[b],n,p.getSelectionCells());e.push(c.dependentProps[b]);g.push(n)}if("function"==
+typeof c.onChange)c.onChange(p,d);q.editorUi.fireEvent(new mxEventObject("styleChanged","keys",e,"values",g,"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}function e(d,c,f){var e=mxUtils.getOffset(b,!0),g=mxUtils.getOffset(d,!0);c.style.position="absolute";c.style.left=g.x-e.x+"px";c.style.top=g.y-e.y+"px";c.style.width=d.offsetWidth+"px";c.style.height=d.offsetHeight-(f?4:0)+"px";c.style.zIndex=5}function g(b,d,c){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(q,function(g){this.editorUi.pickColor(d,function(d){e.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;f(b,d,c)});mxEvent.consume(g)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(e);return btn}function l(b,d,c,e,g,l,m){null!=d&&(d=d.split(","),u.push({name:b,
+values:d,type:c,defVal:e,countProperty:g,parentRow:l,isDeletable:!0,flipBkg:m}));btn=mxUtils.button("+",mxUtils.bind(q,function(d){for(var k=l,q=0;null!=k.nextSibling;)if(k.nextSibling.getAttribute("data-pName")==b)k=k.nextSibling,q++;else break;var p={type:c,parentRow:l,index:q,isDeletable:!0,defVal:e,countProperty:g},q=n(b,"",p,0==q%2,m);f(b,e,p);k.parentNode.insertBefore(q,k.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}
+function m(b,d,c,f,e,g,l){if(0<e){var m=Array(e);d=null!=d?d.split(","):[];for(var k=0;k<e;k++)m[k]=null!=d[k]?d[k]:null!=f?f:"";u.push({name:b,values:m,type:c,defVal:f,parentRow:g,flipBkg:l,size:e})}return document.createElement("div")}function k(b,d,c){var e=document.createElement("input");e.type="checkbox";e.checked="1"==d;mxEvent.addListener(e,"change",function(){f(b,e.checked?"1":"0",c)});return e}function n(d,c,n,p,u){var v=n.dispName,x=n.type,t=document.createElement("tr");t.className="gePropRow"+
+(u?"Dark":"")+(p?"Alt":"")+" gePropNonHeaderRow";t.setAttribute("data-pName",d);t.setAttribute("data-pValue",c);p=!1;null!=n.index&&(t.setAttribute("data-index",n.index),v=(null!=v?v:"")+"["+n.index+"]",p=!0);var y=document.createElement("td");y.className="gePropRowCell";v=mxResources.get(v,null,v);mxUtils.write(y,v);y.setAttribute("title",v);p&&(y.style.textAlign="right");t.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==x)y.appendChild(g(d,c,n));else if("bool"==
+x||"boolean"==x)y.appendChild(k(d,c,n));else if("enum"==x){var C=n.enumList;for(u=0;u<C.length;u++)if(v=C[u],v.val==c){mxUtils.write(y,mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(q,function(){var g=document.createElement("select");e(y,g);for(var l=0;l<C.length;l++){var m=C[l],k=document.createElement("option");k.value=mxUtils.htmlEntities(m.val);mxUtils.write(k,mxResources.get(m.dispName,null,m.dispName));g.appendChild(k)}g.value=c;b.appendChild(g);
+mxEvent.addListener(g,"change",function(){var b=mxUtils.htmlEntities(g.value);f(d,b,n)});g.focus();mxEvent.addListener(g,"blur",function(){b.removeChild(g)})}))}else"dynamicArr"==x?y.appendChild(l(d,c,n.subType,n.subDefVal,n.countProperty,t,u)):"staticArr"==x?y.appendChild(m(d,c,n.subType,n.subDefVal,n.size,t,u)):"readOnly"==x?(u=document.createElement("input"),u.setAttribute("readonly",""),u.value=c,u.style.width="96px",u.style.borderWidth="0px",y.appendChild(u)):(y.innerHTML=c,mxEvent.addListener(y,
+"click",mxUtils.bind(q,function(){function g(){var b=l.value,b=0==b.length&&"string"!=x?0:b;n.allowAuto&&(null!=b.trim&&"auto"==b.trim().toLowerCase()?(b="auto",x="string"):(b=parseFloat(b),b=isNaN(b)?0:b));null!=n.min&&b<n.min?b=n.min:null!=n.max&&b>n.max&&(b=n.max);b=mxUtils.htmlEntities(("int"==x?parseInt(b):b)+"");f(d,b,n)}var l=document.createElement("input");e(y,l,!0);l.value=c;l.className="gePropEditor";"int"!=x&&"float"!=x||n.allowAuto||(l.type="number",l.step="int"==x?"1":"any",null!=n.min&&
+(l.min=parseFloat(n.min)),null!=n.max&&(l.max=parseFloat(n.max)));b.appendChild(l);mxEvent.addListener(l,"keypress",function(b){13==b.keyCode&&g()});l.focus();mxEvent.addListener(l,"blur",function(){g()})})));n.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(q,function(b){f(d,"",n,n.index);mxEvent.consume(b)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",y.appendChild(u));t.appendChild(y);return t}var q=this,p=this.editorUi.editor.graph,u=[];b.style.position=
"relative";b.style.padding="0";var v=document.createElement("table");v.className="geProperties";v.style.whiteSpace="nowrap";v.style.width="100%";var x=document.createElement("tr");x.className="gePropHeader";var t=document.createElement("th");t.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;y.style.verticalAlign="middle";t.appendChild(y);mxUtils.write(t,mxResources.get("property"));x.style.cursor="pointer";var C=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),
c;if(q.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;c="none";for(var f=b.childNodes.length-1;0<=f;f--)try{var e=b.childNodes[f],g=e.nodeName.toUpperCase();"INPUT"!=g&&"SELECT"!=g||b.removeChild(e)}catch(xa){}}else y.src=Sidebar.prototype.expandedImage,c="";for(f=0;f<d.length;f++)d[f].style.display=c};mxEvent.addListener(x,"click",function(){q.editorUi.propertiesCollapsed=!q.editorUi.propertiesCollapsed;C()});x.appendChild(t);t=document.createElement("th");t.className="gePropHeaderCell";
-t.innerHTML=mxResources.get("value");x.appendChild(t);v.appendChild(x);var E=!1,B=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&v.appendChild(p("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(x=d[A],"function"!=typeof x.isVisible||x.isVisible(c,this)){var F=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==
-x.type)B=!B;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var N=x.dependentProps,G=[],D=[],t=0;t<N.length;t++){var Q=c.style[N[t]];D.push(d[N[t]].subDefVal);G.push(null!=Q?Q.split(","):[])}x.dependentPropsDefVal=D;x.dependentPropsVals=G}v.appendChild(p(A,F,x,E,B));E=!E}}for(t=0;t<u.length;t++)for(x=u[t],d=x.parentRow,c=0;c<x.values.length;c++)A=p(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,
+t.innerHTML=mxResources.get("value");x.appendChild(t);v.appendChild(x);var E=!1,B=!1,x=null;1==c.vertices.length&&0==c.edges.length?x=c.vertices[0].id:0==c.vertices.length&&1==c.edges.length&&(x=c.edges[0].id);null!=x&&v.appendChild(n("id",mxUtils.htmlEntities(x),{dispName:"ID",type:"readOnly"},!0,!1));for(var A in d)if(x=d[A],"function"!=typeof x.isVisible||x.isVisible(c,this)){var F=null!=c.style[A]?mxUtils.htmlEntities(c.style[A]+""):null!=x.getDefaultValue?x.getDefaultValue(c,this):x.defVal;if("separator"==
+x.type)B=!B;else{if("staticArr"==x.type)x.size=parseInt(c.style[x.sizeProperty]||d[x.sizeProperty].defVal)||0;else if(null!=x.dependentProps){for(var N=x.dependentProps,G=[],D=[],t=0;t<N.length;t++){var Q=c.style[N[t]];D.push(d[N[t]].subDefVal);G.push(null!=Q?Q.split(","):[])}x.dependentPropsDefVal=D;x.dependentPropsVals=G}v.appendChild(n(A,F,x,E,B));E=!E}}for(t=0;t<u.length;t++)for(x=u[t],d=x.parentRow,c=0;c<x.values.length;c++)A=n(x.name,x.values[c],{type:x.type,parentRow:x.parentRow,isDeletable:x.isDeletable,
index:c,defVal:x.defVal,countProperty:x.countProperty,size:x.size},0==c%2,x.flipBkg),d.parentNode.insertBefore(A,d.nextSibling),d=A;b.appendChild(v);C();return b};StyleFormatPanel.prototype.addStyles=function(b){function d(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi,f=c.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.paddingLeft="24px";e.style.paddingRight=
-"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.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(" "),l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";l.style.width="210px";for(var k=[],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(b){mxEvent.addListener(p,"click",mxUtils.bind(this,function(){q(b)}))})(m);k.push(p);l.appendChild(p)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(k[this.format.currentScheme].style.background="transparent");
-this.format.currentScheme=b;n(this.defaultColorSchemes[this.format.currentScheme]);k[this.format.currentScheme].style.background="#84d7ff"}),n=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){f.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,l=0;l<e.length;l++){for(var k=f.getModel().getStyle(e[l]),m=0;m<g.length;m++)k=mxUtils.removeStylename(k,g[m]);var p=f.getModel().isVertex(e[l])?c.initialDefaultVertexStyle:
-c.initialdefaultEdgeStyle;null!=b?(k=mxUtils.setStyle(k,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(d)||(k=""==b.fill?mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(d)||(k=""==b.stroke?mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,
-b.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||!f.getModel().isVertex(e[l])||(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(k=mxUtils.setStyle(k,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),k=mxUtils.setStyle(k,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),k=mxUtils.setStyle(k,
-mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(e[l])&&(k=mxUtils.setStyle(k,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(e[l],k)}}finally{f.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!=b){var l="1"==urlParams.sketch?"2px solid":"1px solid";
+"20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.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(" "),l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.position="relative";l.style.textAlign="center";l.style.width="210px";for(var m=[],k=0;k<this.defaultColorSchemes.length;k++){var n=document.createElement("div");
+n.style.display="inline-block";n.style.width="6px";n.style.height="6px";n.style.marginLeft="4px";n.style.marginRight="3px";n.style.borderRadius="3px";n.style.cursor="pointer";n.style.background="transparent";n.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(b){mxEvent.addListener(n,"click",mxUtils.bind(this,function(){q(b)}))})(k);m.push(n);l.appendChild(n)}var q=mxUtils.bind(this,function(b){null!=this.format.currentScheme&&(m[this.format.currentScheme].style.background="transparent");
+this.format.currentScheme=b;p(this.defaultColorSchemes[this.format.currentScheme]);m[this.format.currentScheme].style.background="#84d7ff"}),p=mxUtils.bind(this,function(b){var d=mxUtils.bind(this,function(b){var d=mxUtils.button("",mxUtils.bind(this,function(d){f.getModel().beginUpdate();try{for(var e=this.format.getSelectionState().cells,l=0;l<e.length;l++){for(var m=f.getModel().getStyle(e[l]),k=0;k<g.length;k++)m=mxUtils.removeStylename(m,g[k]);var n=f.getModel().isVertex(e[l])?c.initialDefaultVertexStyle:
+c.initialdefaultEdgeStyle;null!=b?(m=mxUtils.setStyle(m,mxConstants.STYLE_GRADIENTCOLOR,b.gradient||mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isAltDown(d)||(m=""==b.fill?mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,b.fill||mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,null))),mxEvent.isShiftDown(d)||(m=""==b.stroke?mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,
+b.stroke||mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,null))),mxEvent.isControlDown(d)||mxClient.IS_MAC&&mxEvent.isMetaDown(d)||!f.getModel().isVertex(e[l])||(m=mxUtils.setStyle(m,mxConstants.STYLE_FONTCOLOR,b.font||mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null)))):(m=mxUtils.setStyle(m,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FILLCOLOR,"#ffffff")),m=mxUtils.setStyle(m,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,"#000000")),m=mxUtils.setStyle(m,
+mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_GRADIENTCOLOR,null)),f.getModel().isVertex(e[l])&&(m=mxUtils.setStyle(m,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(n,mxConstants.STYLE_FONTCOLOR,null))));f.getModel().setStyle(e[l],m)}}finally{f.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!=b){var l="1"==urlParams.sketch?"2px solid":"1px solid";
null!=b.gradient?mxClient.IS_IE&&10>document.documentMode?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":b.fill==mxConstants.NONE?d.style.background="url('"+Dialog.prototype.noColorImage+"')":d.style.backgroundColor=""==b.fill?mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff"):
b.fill||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?"#2a2a2a":"#ffffff");d.style.border=b.stroke==mxConstants.NONE?l+" transparent":""==b.stroke?l+" "+mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"):l+" "+(b.stroke||mxUtils.getValue(c.initialDefaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":"#2a2a2a"));null!=b.title&&d.setAttribute("title",b.title)}else{var l=
-mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),k=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=l;d.style.border="1px solid "+k}d.style.borderRadius="0";e.appendChild(d)});e.innerHTML="";for(var l=0;l<b.length;l++)0<l&&0==mxUtils.mod(l,4)&&mxUtils.br(e),d(b[l])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var m=10>=this.defaultColorSchemes.length?
-28:8,u=document.createElement("div");u.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(u,
-"click",mxUtils.bind(this,function(){q(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&&(b.appendChild(u),b.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));d(u);d(v);n(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(l);return b};StyleFormatPanel.prototype.addEditOps=function(b){var d=this.format.getSelectionState(),c=null;1==d.cells.length&&(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,
+mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),m=mxUtils.getValue(f.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=l;d.style.border="1px solid "+m}d.style.borderRadius="0";e.appendChild(d)});e.innerHTML="";for(var l=0;l<b.length;l++)0<l&&0==mxUtils.mod(l,4)&&mxUtils.br(e),d(b[l])});null==this.format.currentScheme?q(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):q(this.format.currentScheme);var k=10>=this.defaultColorSchemes.length?
+28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+k+"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(){q(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var v=document.createElement("div");v.style.cssText="position:absolute;left:202px;top:8px;bottom:"+k+"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&&(b.appendChild(u),b.appendChild(v));mxEvent.addListener(v,"click",mxUtils.bind(this,function(){q(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));d(u);d(v);p(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&b.appendChild(l);return b};StyleFormatPanel.prototype.addEditOps=function(b){var d=this.format.getSelectionState(),c=null;1==d.cells.length&&(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,
function(b){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="210px",c.style.marginBottom="2px",b.appendChild(c));var f=this.editorUi.editor.graph,f=1==d.cells.length?f.view.getState(d.cells[0]):null;null!=f&&null!=f.shape&&null!=f.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",
mxResources.get("editShape")),d.style.marginBottom="2px",null==c?d.style.width="210px":(c.style.width="104px",d.style.width="104px",d.style.marginLeft="2px"),b.appendChild(d)):d.image&&0<d.cells.length&&(d=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(b){this.editorUi.actions.get("image").funct()})),d.setAttribute("title",mxResources.get("editImage")),d.style.marginBottom="2px",null==c?d.style.width="210px":(c.style.width="104px",d.style.width="104px",d.style.marginLeft="2px"),
b.appendChild(d));return b}}Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(b){return b.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(b){return Graph.isGoogleFontUrl(b)};Graph.createFontElement=function(b,d){var c;Graph.isCssFontUrl(d)?(c=document.createElement("link"),c.setAttribute("rel","stylesheet"),c.setAttribute("type","text/css"),c.setAttribute("charset","UTF-8"),c.setAttribute("href",d)):(c=document.createElement("style"),
@@ -3261,41 +3262,41 @@ b[d].getAttribute("face"):b[d].style.fontFamily;null!=f&&Graph.addFont(f,c)}}};G
"mouseenter",b);mxEvent.addListener(this.container,"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){d=null});this.isMouseInsertPoint=function(){return null!=d};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):c.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(b){var d=this.graph.getCellStyle(b);if(null!=d){if("rack"==d.childLayout){var c=new mxStackLayout(this.graph,!1);c.gridSize=
null!=d.rackUnitSize?parseFloat(d.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;c.marginLeft=d.marginLeft||0;c.marginRight=d.marginRight||0;c.marginTop=d.marginTop||0;c.marginBottom=d.marginBottom||0;c.allowGaps=d.allowGaps||0;c.horizontal="1"==mxUtils.getValue(d,"horizontalRack","0");c.resizeParent=!1;c.fill=!0;return c}if("undefined"!==typeof mxTableLayout&&"tableLayout"==d.childLayout)return c=new mxTableLayout(this.graph),c.rows=d.tableRows||2,c.columns=d.tableColumns||
2,c.colPercentages=d.colPercentages,c.rowPercentages=d.rowPercentages,c.equalColumns="1"==mxUtils.getValue(d,"equalColumns",c.colPercentages?"0":"1"),c.equalRows="1"==mxUtils.getValue(d,"equalRows",c.rowPercentages?"0":"1"),c.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),c.border=d.tableBorder||c.border,c.marginLeft=d.marginLeft||0,c.marginRight=d.marginRight||0,c.marginTop=d.marginTop||0,c.marginBottom=d.marginBottom||0,c.autoAddCol="1"==mxUtils.getValue(d,"autoAddCol","0"),c.autoAddRow=
-"1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,k,m,p,q){D.apply(this,arguments);Graph.processFontAttributes(q)};
-var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,d,c){function f(){for(var b=l.getSelectionCells(),d=[],c=0;c<b.length;c++)l.isCellVisible(b[c])&&d.push(b[c]);l.setSelectionCells(d)}function e(b){l.hiddenTags=b?[]:k.slice();f();l.refresh()}function g(b,c){p.innerHTML="";if(0<b.length){var g=document.createElement("table");g.setAttribute("cellpadding",
-"2");g.style.boxSizing="border-box";g.style.tableLayout="fixed";g.style.width="100%";var m=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){var g=0>mxUtils.indexOf(l.hiddenTags,b),p=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var n=document.createElement("img");n.setAttribute("src",g?Editor.visibleImage:Editor.hiddenImage);n.setAttribute("title",mxResources.get(g?"hideIt":"show",[b]));mxUtils.setOpacity(n,
-g?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";if(d||Editor.isDarkMode())n.style.filter="invert(100%)";q.appendChild(n);mxEvent.addListener(n,"click",function(d){var c=mxUtils.indexOf(l.hiddenTags,b);mxEvent.isShiftDown(d)?e(0<=mxUtils.indexOf(l.hiddenTags,b)):(0>c?l.hiddenTags.push(b):0<=c&&l.hiddenTags.splice(c,1),f(),l.refresh());mxEvent.consume(d)});p.appendChild(q);q=document.createElement("td");q.style.overflow="hidden";q.style.whiteSpace="nowrap";q.style.textOverflow=
-"ellipsis";q.style.verticalAlign="middle";q.style.cursor="pointer";q.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,g?100:40);q.appendChild(a);mxEvent.addListener(q,"click",function(d){if(mxEvent.isShiftDown(d)){e(!0);var c=l.getCellsForTags([b],null,null,!0);l.isEnabled()?l.setSelectionCells(c):l.highlightCells(c)}else if(g&&0<l.hiddenTags.length)e(!0);else{var c=k.slice(),m=mxUtils.indexOf(c,
-b);c.splice(m,1);l.hiddenTags=c;f();l.refresh()}mxEvent.consume(d)});p.appendChild(q);if(l.isEnabled()){q=document.createElement("td");q.style.verticalAlign="middle";q.style.textAlign="center";q.style.width="18px";if(null==c){q.style.align="center";q.style.width="16px";n=document.createElement("img");n.setAttribute("src",Editor.crossImage);n.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(n,g?75:25);n.style.verticalAlign="middle";n.style.cursor="pointer";n.style.width="16px";
-if(d||Editor.isDarkMode())n.style.filter="invert(100%)";mxEvent.addListener(n,"click",function(d){var c=mxUtils.indexOf(k,b);0<=c&&k.splice(c,1);l.removeTagsForCells(l.model.getDescendants(l.model.getRoot()),[b]);l.refresh();mxEvent.consume(d)});q.appendChild(n)}else{var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.margin="0px";u.defaultChecked=null!=c&&0<=mxUtils.indexOf(c,b);u.checked=u.defaultChecked;u.style.background="transparent";u.setAttribute("title",mxResources.get(u.defaultChecked?
-"removeIt":"add",[b]));mxEvent.addListener(u,"change",function(d){u.checked?l.addTagsForCells(l.getSelectionCells(),[b]):l.removeTagsForCells(l.getSelectionCells(),[b]);mxEvent.consume(d)});q.appendChild(u)}p.appendChild(q)}m.appendChild(p)})(b[q]);g.appendChild(m);p.appendChild(g)}}var l=this,k=l.hiddenTags.slice(),m=document.createElement("div");m.style.userSelect="none";m.style.overflow="hidden";m.style.padding="10px";m.style.height="100%";var p=document.createElement("div");p.style.boxSizing=
-"border-box";p.style.borderRadius="4px";p.style.userSelect="none";p.style.overflow="auto";p.style.position="absolute";p.style.left="10px";p.style.right="10px";p.style.top="10px";p.style.border=l.isEnabled()?"1px solid #808080":"none";p.style.bottom=l.isEnabled()?"48px":"10px";m.appendChild(p);var q=mxUtils.button(mxResources.get("reset"),function(b){l.hiddenTags=[];mxEvent.isShiftDown(b)||(k=l.hiddenTags.slice());f();l.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";
-q.style.margin="0 4px 0 0";var n=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(k,function(b){k=b;u()})});n.setAttribute("title",mxResources.get("add"));n.className="geBtn";n.style.margin="0";l.addListener(mxEvent.ROOT,function(){k=l.hiddenTags.slice()});var u=mxUtils.bind(this,function(d,c){if(b()){for(var f=l.getAllTags(),e=0;e<f.length;e++)0>mxUtils.indexOf(k,f[e])&&k.push(f[e]);k.sort();l.isSelectionEmpty()?g(k):g(k,l.getCommonTagsForCells(l.getSelectionCells()))}});l.selectionModel.addListener(mxEvent.CHANGE,
-u);l.model.addListener(mxEvent.CHANGE,u);l.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";v.style.right="10px";v.style.left="10px";l.isEnabled()&&(v.appendChild(q),v.appendChild(n),m.appendChild(v));return{div:m,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=
+"1"==mxUtils.getValue(d,"autoAddRow",c.autoAddCol?"0":"1"),c.colWidths=d.colWidths||"100",c.rowHeights=d.rowHeights||"50",c}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(b){return Graph.processFontStyle(x.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(b,d,c,f,e,g,l,m,k,n,q){D.apply(this,arguments);Graph.processFontAttributes(q)};
+var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(b,d,c){function f(){for(var b=l.getSelectionCells(),d=[],c=0;c<b.length;c++)l.isCellVisible(b[c])&&d.push(b[c]);l.setSelectionCells(d)}function e(b){l.hiddenTags=b?[]:m.slice();f();l.refresh()}function g(b,c){n.innerHTML="";if(0<b.length){var g=document.createElement("table");g.setAttribute("cellpadding",
+"2");g.style.boxSizing="border-box";g.style.tableLayout="fixed";g.style.width="100%";var k=document.createElement("tbody");if(null!=b&&0<b.length)for(var q=0;q<b.length;q++)(function(b){var g=0>mxUtils.indexOf(l.hiddenTags,b),n=document.createElement("tr"),q=document.createElement("td");q.style.align="center";q.style.width="16px";var p=document.createElement("img");p.setAttribute("src",g?Editor.visibleImage:Editor.hiddenImage);p.setAttribute("title",mxResources.get(g?"hideIt":"show",[b]));mxUtils.setOpacity(p,
+g?75:25);p.style.verticalAlign="middle";p.style.cursor="pointer";p.style.width="16px";if(d||Editor.isDarkMode())p.style.filter="invert(100%)";q.appendChild(p);mxEvent.addListener(p,"click",function(d){var c=mxUtils.indexOf(l.hiddenTags,b);mxEvent.isShiftDown(d)?e(0<=mxUtils.indexOf(l.hiddenTags,b)):(0>c?l.hiddenTags.push(b):0<=c&&l.hiddenTags.splice(c,1),f(),l.refresh());mxEvent.consume(d)});n.appendChild(q);q=document.createElement("td");q.style.overflow="hidden";q.style.whiteSpace="nowrap";q.style.textOverflow=
+"ellipsis";q.style.verticalAlign="middle";q.style.cursor="pointer";q.setAttribute("title",b);a=document.createElement("a");mxUtils.write(a,b);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,g?100:40);q.appendChild(a);mxEvent.addListener(q,"click",function(d){if(mxEvent.isShiftDown(d)){e(!0);var c=l.getCellsForTags([b],null,null,!0);l.isEnabled()?l.setSelectionCells(c):l.highlightCells(c)}else if(g&&0<l.hiddenTags.length)e(!0);else{var c=m.slice(),k=mxUtils.indexOf(c,
+b);c.splice(k,1);l.hiddenTags=c;f();l.refresh()}mxEvent.consume(d)});n.appendChild(q);if(l.isEnabled()){q=document.createElement("td");q.style.verticalAlign="middle";q.style.textAlign="center";q.style.width="18px";if(null==c){q.style.align="center";q.style.width="16px";p=document.createElement("img");p.setAttribute("src",Editor.crossImage);p.setAttribute("title",mxResources.get("removeIt",[b]));mxUtils.setOpacity(p,g?75:25);p.style.verticalAlign="middle";p.style.cursor="pointer";p.style.width="16px";
+if(d||Editor.isDarkMode())p.style.filter="invert(100%)";mxEvent.addListener(p,"click",function(d){var c=mxUtils.indexOf(m,b);0<=c&&m.splice(c,1);l.removeTagsForCells(l.model.getDescendants(l.model.getRoot()),[b]);l.refresh();mxEvent.consume(d)});q.appendChild(p)}else{var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.margin="0px";u.defaultChecked=null!=c&&0<=mxUtils.indexOf(c,b);u.checked=u.defaultChecked;u.style.background="transparent";u.setAttribute("title",mxResources.get(u.defaultChecked?
+"removeIt":"add",[b]));mxEvent.addListener(u,"change",function(d){u.checked?l.addTagsForCells(l.getSelectionCells(),[b]):l.removeTagsForCells(l.getSelectionCells(),[b]);mxEvent.consume(d)});q.appendChild(u)}n.appendChild(q)}k.appendChild(n)})(b[q]);g.appendChild(k);n.appendChild(g)}}var l=this,m=l.hiddenTags.slice(),k=document.createElement("div");k.style.userSelect="none";k.style.overflow="hidden";k.style.padding="10px";k.style.height="100%";var n=document.createElement("div");n.style.boxSizing=
+"border-box";n.style.borderRadius="4px";n.style.userSelect="none";n.style.overflow="auto";n.style.position="absolute";n.style.left="10px";n.style.right="10px";n.style.top="10px";n.style.border=l.isEnabled()?"1px solid #808080":"none";n.style.bottom=l.isEnabled()?"48px":"10px";k.appendChild(n);var q=mxUtils.button(mxResources.get("reset"),function(b){l.hiddenTags=[];mxEvent.isShiftDown(b)||(m=l.hiddenTags.slice());f();l.refresh()});q.setAttribute("title",mxResources.get("reset"));q.className="geBtn";
+q.style.margin="0 4px 0 0";var p=mxUtils.button(mxResources.get("add"),function(){null!=c&&c(m,function(b){m=b;u()})});p.setAttribute("title",mxResources.get("add"));p.className="geBtn";p.style.margin="0";l.addListener(mxEvent.ROOT,function(){m=l.hiddenTags.slice()});var u=mxUtils.bind(this,function(d,c){if(b()){for(var f=l.getAllTags(),e=0;e<f.length;e++)0>mxUtils.indexOf(m,f[e])&&m.push(f[e]);m.sort();l.isSelectionEmpty()?g(m):g(m,l.getCommonTagsForCells(l.getSelectionCells()))}});l.selectionModel.addListener(mxEvent.CHANGE,
+u);l.model.addListener(mxEvent.CHANGE,u);l.addListener(mxEvent.REFRESH,u);var v=document.createElement("div");v.style.boxSizing="border-box";v.style.whiteSpace="nowrap";v.style.position="absolute";v.style.overflow="hidden";v.style.bottom="0px";v.style.height="42px";v.style.right="10px";v.style.left="10px";l.isEnabled()&&(v.appendChild(q),v.appendChild(p),k.appendChild(v));return{div:k,refresh:u}};Graph.prototype.getCustomFonts=function(){var b=this.extFonts,b=null!=b?b.slice():[],d;for(d in Graph.customFontElements){var c=
Graph.customFontElements[d];b.push({name:c.name,url:c.url})}return b};Graph.prototype.setFont=function(b,d){Graph.addFont(b,d);document.execCommand("fontname",!1,b);if(null!=d){var c=this.cellEditor.textarea.getElementsByTagName("font");d=Graph.getFontUrl(b,d);for(var f=0;f<c.length;f++)c[f].getAttribute("face")==b&&c[f].getAttribute("data-font-src")!=d&&c[f].setAttribute("data-font-src",d)}};var G=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return G.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 b=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=b)for(var d in b)this.globalVars[d]=b[d]}catch(F){null!=window.console&&console.log("Error in vars URL parameter: "+F)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):
{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(b){var d=J.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[b]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var b=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(b.ownerDocument)).decode(b)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var L=Graph.prototype.getSvg;Graph.prototype.getSvg=
-function(b,d,c,f,e,g,l,k,m,p,q,n,u,v){var x=null,t=null;n||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),C=this.getCustomFonts();if(q&&0<C.length){var A=y.ownerDocument,E=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"style"):A.createElement("style");
+function(b,d,c,f,e,g,l,m,k,n,q,p,u,v){var x=null,t=null;p||null==this.themes||"darkTheme"!=this.defaultThemeName||(x=this.stylesheet,t=this.defaultPageBackgroundColor,this.defaultPageBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":"#2a2a2a",this.stylesheet=this.getDefaultStylesheet(),this.refresh());var y=L.apply(this,arguments),C=this.getCustomFonts();if(q&&0<C.length){var A=y.ownerDocument,E=null!=A.createElementNS?A.createElementNS(mxConstants.NS_SVG,"style"):A.createElement("style");
null!=A.setAttributeNS?E.setAttributeNS("type","text/css"):E.setAttribute("type","text/css");for(var N="",B="",G=0;G<C.length;G++){var F=C[G].name,D=C[G].url;Graph.isCssFontUrl(D)?N+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+F+'";\nsrc: url("'+D+'");\n}\n'}E.appendChild(A.createTextNode(N+B));y.getElementsByTagName("defs")[0].appendChild(E)}null!=x&&(this.defaultPageBackgroundColor=t,this.stylesheet=x,this.refresh());return y};var H=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=
function(){var b=H.apply(this,arguments);if(this.mathEnabled){var d=b.drawText;b.drawText=function(b,c){if(null!=b.text&&null!=b.text.value&&b.text.checkBounds()&&(mxUtils.isNode(b.text.value)||b.text.dialect==mxConstants.DIALECT_STRICTHTML)){var f=b.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var e=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<e.length;)e[0].parentNode.removeChild(e[0]);null!=f.innerHTML&&(e=b.text.value,b.text.value=
f.innerHTML,d.apply(this,arguments),b.text.value=e)}}else d.apply(this,arguments)}}return b};var K=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){K.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var b=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;",b.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,b.ownerSVGElement))}};
var A=Graph.prototype.refresh;Graph.prototype.refresh=function(){A.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var M=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){M.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(b){"data:action/json,"==
b.substring(0,17)&&(b=JSON.parse(b.substring(17)),null!=b.actions&&this.executeCustomActions(b.actions))};Graph.prototype.executeCustomActions=function(b,d){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var c=!1,f=0,e=0,g=mxUtils.bind(this,function(){c||
-(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),k=mxUtils.bind(this,function(){0<f&&f--;0==f&&m()}),m=mxUtils.bind(this,function(){if(e<b.length){var c=this.stoppingCustomActions,p=b[e++],q=[];if(null!=p.open)if(l(),this.isCustomLink(p.open)){if(!this.customLinkClicked(p.open))return}else this.openLink(p.open);null==p.wait||c||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;k()}),
-f++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=p.wait?parseInt(p.wait):1E3),l());null!=p.opacity&&null!=p.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(p.opacity,!0)),p.opacity.value);null!=p.fadeIn&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeIn,!0)),0,1,k,c?0:p.fadeIn.delay));null!=p.fadeOut&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(p.fadeOut,!0)),1,0,k,c?0:p.fadeOut.delay));
-null!=p.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeIn,!0),!0)));null!=p.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(p.wipeOut,!0),!1)));null!=p.toggle&&(g(),this.toggleCells(this.getCellsForAction(p.toggle,!0)));if(null!=p.show){g();var n=this.getCellsForAction(p.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(n),1);this.setCellsVisible(n,!0)}null!=p.hide&&(g(),n=this.getCellsForAction(p.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(n),
-0),this.setCellsVisible(n,!1));null!=p.toggleStyle&&null!=p.toggleStyle.key&&(g(),this.toggleCellStyles(p.toggleStyle.key,null!=p.toggleStyle.defaultValue?p.toggleStyle.defaultValue:"0",this.getCellsForAction(p.toggleStyle,!0)));null!=p.style&&null!=p.style.key&&(g(),this.setCellStyles(p.style.key,p.style.value,this.getCellsForAction(p.style,!0)));n=[];null!=p.select&&this.isEnabled()&&(n=this.getCellsForAction(p.select),this.setSelectionCells(n));null!=p.highlight&&(n=this.getCellsForAction(p.highlight),
-this.highlightCells(n,p.highlight.color,p.highlight.duration,p.highlight.opacity));null!=p.scroll&&(n=this.getCellsForAction(p.scroll));null!=p.viewbox&&this.fitWindow(p.viewbox,p.viewbox.border);0<n.length&&this.scrollCellToVisible(n[0]);if(null!=p.tags){n=[];null!=p.tags.hidden&&(n=n.concat(p.tags.hidden));if(null!=p.tags.visible)for(var u=this.getAllTags(),v=0;v<u.length;v++)0>mxUtils.indexOf(p.tags.visible,u[v])&&0>mxUtils.indexOf(n,u[v])&&n.push(u[v]);this.hiddenTags=n;this.refresh()}0<q.length&&
-(f++,this.executeAnimations(q,k,c?1:p.steps,c?0:p.delay));0==f?m():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=d&&d()});m()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){var c=this.getLinkForCell(d);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(b,c));if(this.isHtmlLabel(d)){var f=document.createElement("div");f.innerHTML=this.sanitizeHtml(this.getLabel(d));for(var e=f.getElementsByTagName("a"),g=!1,l=0;l<
+(c=!0,this.model.beginUpdate())}),l=mxUtils.bind(this,function(){c&&(c=!1,this.model.endUpdate())}),m=mxUtils.bind(this,function(){0<f&&f--;0==f&&k()}),k=mxUtils.bind(this,function(){if(e<b.length){var c=this.stoppingCustomActions,n=b[e++],q=[];if(null!=n.open)if(l(),this.isCustomLink(n.open)){if(!this.customLinkClicked(n.open))return}else this.openLink(n.open);null==n.wait||c||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;m()}),
+f++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=n.wait?parseInt(n.wait):1E3),l());null!=n.opacity&&null!=n.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(n.opacity,!0)),n.opacity.value);null!=n.fadeIn&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeIn,!0)),0,1,m,c?0:n.fadeIn.delay));null!=n.fadeOut&&(f++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(n.fadeOut,!0)),1,0,m,c?0:n.fadeOut.delay));
+null!=n.wipeIn&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeIn,!0),!0)));null!=n.wipeOut&&(q=q.concat(this.createWipeAnimations(this.getCellsForAction(n.wipeOut,!0),!1)));null!=n.toggle&&(g(),this.toggleCells(this.getCellsForAction(n.toggle,!0)));if(null!=n.show){g();var p=this.getCellsForAction(n.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(p),1);this.setCellsVisible(p,!0)}null!=n.hide&&(g(),p=this.getCellsForAction(n.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(p),
+0),this.setCellsVisible(p,!1));null!=n.toggleStyle&&null!=n.toggleStyle.key&&(g(),this.toggleCellStyles(n.toggleStyle.key,null!=n.toggleStyle.defaultValue?n.toggleStyle.defaultValue:"0",this.getCellsForAction(n.toggleStyle,!0)));null!=n.style&&null!=n.style.key&&(g(),this.setCellStyles(n.style.key,n.style.value,this.getCellsForAction(n.style,!0)));p=[];null!=n.select&&this.isEnabled()&&(p=this.getCellsForAction(n.select),this.setSelectionCells(p));null!=n.highlight&&(p=this.getCellsForAction(n.highlight),
+this.highlightCells(p,n.highlight.color,n.highlight.duration,n.highlight.opacity));null!=n.scroll&&(p=this.getCellsForAction(n.scroll));null!=n.viewbox&&this.fitWindow(n.viewbox,n.viewbox.border);0<p.length&&this.scrollCellToVisible(p[0]);if(null!=n.tags){p=[];null!=n.tags.hidden&&(p=p.concat(n.tags.hidden));if(null!=n.tags.visible)for(var u=this.getAllTags(),v=0;v<u.length;v++)0>mxUtils.indexOf(n.tags.visible,u[v])&&0>mxUtils.indexOf(p,u[v])&&p.push(u[v]);this.hiddenTags=p;this.refresh()}0<q.length&&
+(f++,this.executeAnimations(q,m,c?1:n.steps,c?0:n.delay));0==f?k():l()}else this.stoppingCustomActions=this.executingCustomActions=!1,l(),null!=d&&d()});k()}};Graph.prototype.doUpdateCustomLinksForCell=function(b,d){var c=this.getLinkForCell(d);null!=c&&"data:action/json,"==c.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(b,c));if(this.isHtmlLabel(d)){var f=document.createElement("div");f.innerHTML=this.sanitizeHtml(this.getLabel(d));for(var e=f.getElementsByTagName("a"),g=!1,l=0;l<
e.length;l++)c=e[l].getAttribute("href"),null!=c&&"data:action/json,"==c.substring(0,17)&&(e[l].setAttribute("href",this.updateCustomLink(b,c)),g=!0);g&&this.labelChanged(d,f.innerHTML)}};Graph.prototype.updateCustomLink=function(b,d){if("data:action/json,"==d.substring(0,17))try{var c=JSON.parse(d.substring(17));null!=c.actions&&(this.updateCustomLinkActions(b,c.actions),d="data:action/json,"+JSON.stringify(c))}catch(Z){}return d};Graph.prototype.updateCustomLinkActions=function(b,d){for(var c=0;c<
d.length;c++){var f=d[c],e;for(e in f)this.updateCustomLinkAction(b,f[e],"cells"),this.updateCustomLinkAction(b,f[e],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(b,d,c){if(null!=d&&null!=d[c]){for(var f=[],e=0;e<d[c].length;e++)if("*"==d[c][e])f.push(d[c][e]);else{var g=b[d[c][e]];null!=g?""!=g&&f.push(g):f.push(d[c][e])}d[c]=f}};Graph.prototype.getCellsForAction=function(b,d){var c=this.getCellsById(b.cells).concat(this.getCellsForTags(b.tags,null,d));if(null!=b.excludeCells){for(var f=
[],e=0;e<c.length;e++)0>b.excludeCells.indexOf(c[e].id)&&f.push(c[e]);c=f}return c};Graph.prototype.getCellsById=function(b){var d=[];if(null!=b)for(var c=0;c<b.length;c++)if("*"==b[c])var f=this.model.getRoot(),d=d.concat(this.model.filterDescendants(function(b){return b!=f},f));else{var e=this.model.getCell(b[c]);null!=e&&d.push(e)}return d};var Q=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(b){return Q.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(b))};
-Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var d=0;d<b.length;d++)if(0>mxUtils.indexOf(this.hiddenTags,b[d]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,d,c,f){var e=[];if(null!=b){d=null!=d?d:this.model.getDescendants(this.model.getRoot());for(var g=0,l={},k=0;k<b.length;k++)0<b[k].length&&(l[b[k]]=!0,g++);for(k=0;k<d.length;k++)if(c&&this.model.getParent(d[k])==
-this.model.root||this.model.isVertex(d[k])||this.model.isEdge(d[k])){var m=this.getTagsForCell(d[k]),p=!1;if(0<m.length&&(m=m.split(" "),m.length>=b.length)){for(var q=p=0;q<m.length&&p<g;q++)null!=l[m[q]]&&p++;p=p==g}p&&(1!=f||this.isCellVisible(d[k]))&&e.push(d[k])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var d=null,c=[],f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]),
+Graph.prototype.isAllTagsHidden=function(b){if(null==b||0==b.length||0==this.hiddenTags.length)return!1;b=b.split(" ");if(b.length>this.hiddenTags.length)return!1;for(var d=0;d<b.length;d++)if(0>mxUtils.indexOf(this.hiddenTags,b[d]))return!1;return!0};Graph.prototype.getCellsForTags=function(b,d,c,f){var e=[];if(null!=b){d=null!=d?d:this.model.getDescendants(this.model.getRoot());for(var g=0,l={},m=0;m<b.length;m++)0<b[m].length&&(l[b[m]]=!0,g++);for(m=0;m<d.length;m++)if(c&&this.model.getParent(d[m])==
+this.model.root||this.model.isVertex(d[m])||this.model.isEdge(d[m])){var k=this.getTagsForCell(d[m]),n=!1;if(0<k.length&&(k=k.split(" "),k.length>=b.length)){for(var q=n=0;q<k.length&&n<g;q++)null!=l[k[q]]&&n++;n=n==g}n&&(1!=f||this.isCellVisible(d[m]))&&e.push(d[m])}}return e};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(b){for(var d=null,c=[],f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]),
c=[];if(0<e.length){for(var e=e.split(" "),g={},l=0;l<e.length;l++)if(null==d||null!=d[e[l]])g[e[l]]=!0,c.push(e[l]);d=g}else return[]}return c};Graph.prototype.getTagsForCells=function(b){for(var d=[],c={},f=0;f<b.length;f++){var e=this.getTagsForCell(b[f]);if(0<e.length)for(var e=e.split(" "),g=0;g<e.length;g++)null==c[e[g]]&&(c[e[g]]=!0,d.push(e[g]))}return d};Graph.prototype.getTagsForCell=function(b){return this.getAttributeForCell(b,"tags","")};Graph.prototype.addTagsForCells=function(b,d){if(0<
-b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){for(var f=this.getTagsForCell(b[c]),e=f.split(" "),g=!1,l=0;l<d.length;l++){var k=mxUtils.trim(d[l]);""!=k&&0>mxUtils.indexOf(e,k)&&(f=0<f.length?f+" "+k:k,g=!0)}g&&this.setAttributeForCell(b[c],"tags",f)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,d){if(0<b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var f=this.getTagsForCell(b[c]);if(0<f.length){for(var e=
-f.split(" "),g=!1,l=0;l<d.length;l++){var k=mxUtils.indexOf(e,d[l]);0<=k&&(e.splice(k,1),g=!0)}g&&this.setAttributeForCell(b[c],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!this.model.isVisible(b[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,d){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],d)}finally{this.model.endUpdate()}};
+b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){for(var f=this.getTagsForCell(b[c]),e=f.split(" "),g=!1,l=0;l<d.length;l++){var m=mxUtils.trim(d[l]);""!=m&&0>mxUtils.indexOf(e,m)&&(f=0<f.length?f+" "+m:m,g=!0)}g&&this.setAttributeForCell(b[c],"tags",f)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(b,d){if(0<b.length&&0<d.length){this.model.beginUpdate();try{for(var c=0;c<b.length;c++){var f=this.getTagsForCell(b[c]);if(0<f.length){for(var e=
+f.split(" "),g=!1,l=0;l<d.length;l++){var m=mxUtils.indexOf(e,d[l]);0<=m&&(e.splice(m,1),g=!0)}g&&this.setAttributeForCell(b[c],"tags",e.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(b){this.model.beginUpdate();try{for(var d=0;d<b.length;d++)this.model.setVisible(b[d],!this.model.isVisible(b[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(b,d){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setVisible(b[c],d)}finally{this.model.endUpdate()}};
Graph.prototype.highlightCells=function(b,d,c,f){for(var e=0;e<b.length;e++)this.highlightCell(b[e],d,c,f)};Graph.prototype.highlightCell=function(b,d,c,f){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;b=this.view.getState(b);if(null!=b){var e=Math.max(5,mxUtils.getValue(b.style,mxConstants.STYLE_STROKEWIDTH,1)+4),g=new mxCellHighlight(this,d,e,!1);null!=f&&(g.opacity=f);g.highlight(b);window.setTimeout(function(){null!=g.shape&&(mxUtils.setPrefixedStyle(g.shape.node.style,"transition",
"all 1200ms ease-in-out"),g.shape.node.style.opacity=0);window.setTimeout(function(){g.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(b,d,c){c=null!=c?c:!1;var f=b.ownerDocument,e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");e.setAttribute("id",this.shadowId);var g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");g.setAttribute("in","SourceAlpha");g.setAttribute("stdDeviation",
this.svgShadowBlur);g.setAttribute("result","blur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");g.setAttribute("in","blur");g.setAttribute("dx",this.svgShadowSize);g.setAttribute("dy",this.svgShadowSize);g.setAttribute("result","offsetBlur");e.appendChild(g);g=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");g.setAttribute("flood-color",this.svgShadowColor);g.setAttribute("flood-opacity",
@@ -3313,123 +3314,123 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",
STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];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(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var T=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,f,e,g,l,k,m,p){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&
-mxStencilRegistry.getStencil(q)}return T.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,Math.min(k,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,g){var l=d.useCssTransforms,k=d.currentTranslate,m=d.currentScale,p=d.view.translate,q=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 n=d.getGraphBounds(),u=0,v=0,x=K.get(),t=1/d.pageScale,A=C.checked;if(A)var t=parseInt(M.value),N=parseInt(O.value),t=Math.min(x.height*N/(n.height/d.view.scale),x.width*t/(n.width/d.view.scale));else t=parseInt(y.value)/(100*d.pageScale),isNaN(t)&&(f=1/d.pageScale,y.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*f);x.height=Math.ceil(x.height*f);t*=f;!A&&d.pageVisible?(n=d.getPageLayout(),u-=n.x*x.width,v-=n.y*x.height):
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(b){var d=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?d="mxgraph.er":"sysML"==b.substring(0,5)&&(d="mxgraph.sysml"));return d};var T=mxMarker.createMarker;mxMarker.createMarker=function(b,d,c,f,e,g,l,m,k,n){if(null!=c&&null==mxMarker.markers[c]){var q=this.getPackageForType(c);null!=q&&
+mxStencilRegistry.getStencil(q)}return T.apply(this,arguments)};PrintDialog.prototype.create=function(b,d){function c(){v.value=Math.max(1,Math.min(m,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(m,Math.min(parseInt(v.value),parseInt(u.value))))}function f(d){function c(d,c,g){var l=d.useCssTransforms,m=d.currentTranslate,k=d.currentScale,n=d.view.translate,q=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 p=d.getGraphBounds(),u=0,v=0,x=K.get(),t=1/d.pageScale,A=C.checked;if(A)var t=parseInt(M.value),N=parseInt(O.value),t=Math.min(x.height*N/(p.height/d.view.scale),x.width*t/(p.width/d.view.scale));else t=parseInt(y.value)/(100*d.pageScale),isNaN(t)&&(f=1/d.pageScale,y.value="100 %");x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*f);x.height=Math.ceil(x.height*f);t*=f;!A&&d.pageVisible?(p=d.getPageLayout(),u-=p.x*x.width,v-=p.y*x.height):
A=!0;if(null==c){c=PrintDialog.createPrintPreview(d,t,x,0,u,v,A);c.pageSelector=!1;c.mathEnabled=!1;u=b.getCurrentFile();null!=u&&(c.title=u.getTitle());var G=c.writeHead;c.writeHead=function(c){G.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)c.writeln('<style type="text/css">'),c.writeln(Editor.mathJaxWebkitCss),c.writeln("</style>");mxClient.IS_GC&&(c.writeln('<style type="text/css">'),c.writeln("@media print {"),c.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),c.writeln("}"),
c.writeln("</style>"));null!=b.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(b.editor.fontCss),c.writeln("</style>"));for(var f=d.getCustomFonts(),e=0;e<f.length;e++){var g=f[e].name,l=f[e].url;Graph.isCssFontUrl(l)?c.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(l)+'" charset="UTF-8" type="text/css">'):(c.writeln('<style type="text/css">'),c.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(g)+'";\nsrc: url("'+mxUtils.htmlEntities(l)+'");\n}'),c.writeln("</style>"))}};
-if("undefined"!==typeof MathJax){var D=c.renderPage;c.renderPage=function(d,c,f,e,g,l){var k=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var m=D.apply(this,arguments);mxClient.NO_FO=k;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
+if("undefined"!==typeof MathJax){var D=c.renderPage;c.renderPage=function(d,c,f,e,g,l){var m=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!b.editor.useForeignObjectForMath?!0:b.editor.originalNoForeignObject;var k=D.apply(this,arguments);mxClient.NO_FO=m;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:k.className="geDisableMathJax";return k}}u=null;v=e.enableFlowAnimation;e.enableFlowAnimation=!1;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(u=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),
e.refresh());c.open(null,null,g,!0);e.enableFlowAnimation=v;null!=u&&(e.stylesheet=u,e.refresh())}else{x=d.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";c.backgroundColor=x;c.autoOrigin=A;c.appendGraph(d,t,u,v,g,!0);g=d.getCustomFonts();if(null!=c.wnd)for(u=0;u<g.length;u++)v=g[u].name,A=g[u].url,Graph.isCssFontUrl(A)?c.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(A)+'" charset="UTF-8" type="text/css">'):(c.wnd.document.writeln('<style type="text/css">'),
-c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(A)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=k,d.currentScale=m,d.view.translate=p,d.view.scale=q);return c}var f=parseInt(H.value)/100;isNaN(f)&&(f=1,H.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,k=v.value,p=!q.checked,
-n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,k,C.checked,M.value,O.value,parseInt(y.value)/100,parseInt(H.value)/100,K.get());else{p&&(p=l==m&&k==m);if(!p&&null!=b.pages&&b.pages.length){var x=0,p=b.pages.length-1;q.checked||(x=parseInt(l)-1,p=parseInt(k)-1);for(var t=x;t<=p;t++){var A=b.pages[t],l=A==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),k=!0,x=!1,N=null,G=null;null==A.viewState&&null==A.root&&b.updatePageRoot(A);null!=A.viewState&&
-(k=A.viewState.pageVisible,x=A.viewState.mathEnabled,N=A.viewState.background,G=A.viewState.backgroundImage,l.extFonts=A.viewState.extFonts);l.background=N;l.backgroundImage=null!=G?new mxImage(G.src,G.width,G.height):null;l.pageVisible=k;l.mathEnabled=x;var D=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?A.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:D.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(A);l.model.setRoot(A.root)}n=
-c(l,n,t!=p);l!=e&&l.container.parentNode.removeChild(l.container)}}else n=c(e);null==n?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(n.mathEnabled&&(p=n.wnd.document,d&&(n.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),n.closeDocument(),!n.mathEnabled&&d&&PrintDialog.printPreview(n));null!=g&&(e.stylesheet=g,e.refresh())}}var e=b.editor.graph,g=document.createElement("div"),l=document.createElement("h3");
-l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));g.appendChild(l);var k=1,m=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");p.appendChild(q);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("printAllPages"));p.appendChild(l);mxUtils.br(p);var n=q.cloneNode(!0);q.setAttribute("checked","checked");n.setAttribute("value","range");p.appendChild(n);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");p.appendChild(l);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);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("to"));p.appendChild(l);var v=u.cloneNode(!0);p.appendChild(v);mxEvent.addListener(u,"focus",function(){n.checked=!0});mxEvent.addListener(v,"focus",function(){n.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(k=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){m=l+1;u.value=m;v.value=m;break}u.setAttribute("max",k);v.setAttribute("max",k);b.isPagesEnabled()?1<k&&(g.appendChild(p),
-n.checked=!0):n.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");x.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));x.appendChild(l);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";x.appendChild(y);
-mxEvent.addListener(y,"focus",function(){t.checked=!0});g.appendChild(x);var p=p.cloneNode(!1),C=t.cloneNode(!0);C.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(C);p.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var A=document.createElement("tbody"),N=document.createElement("tr"),G=N.cloneNode(!0),D=document.createElement("td"),
+c.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(v)+'";\nsrc: url("'+mxUtils.htmlEntities(A)+'");\n}'),c.wnd.document.writeln("</style>"))}l&&(d.useCssTransforms=l,d.currentTranslate=m,d.currentScale=k,d.view.translate=n,d.view.scale=q);return c}var f=parseInt(H.value)/100;isNaN(f)&&(f=1,H.value="100 %");var f=.75*f,g=null;null!=e.themes&&"darkTheme"==e.defaultThemeName&&(g=e.stylesheet,e.stylesheet=e.getDefaultStylesheet(),e.refresh());var l=u.value,m=v.value,n=!q.checked,
+p=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(b,q.checked,l,m,C.checked,M.value,O.value,parseInt(y.value)/100,parseInt(H.value)/100,K.get());else{n&&(n=l==k&&m==k);if(!n&&null!=b.pages&&b.pages.length){var x=0,n=b.pages.length-1;q.checked||(x=parseInt(l)-1,n=parseInt(m)-1);for(var t=x;t<=n;t++){var A=b.pages[t],l=A==b.currentPage?e:null;if(null==l){var l=b.createTemporaryGraph(e.stylesheet),m=!0,x=!1,N=null,G=null;null==A.viewState&&null==A.root&&b.updatePageRoot(A);null!=A.viewState&&
+(m=A.viewState.pageVisible,x=A.viewState.mathEnabled,N=A.viewState.background,G=A.viewState.backgroundImage,l.extFonts=A.viewState.extFonts);l.background=N;l.backgroundImage=null!=G?new mxImage(G.src,G.width,G.height):null;l.pageVisible=m;l.mathEnabled=x;var D=l.getGlobalVariable;l.getGlobalVariable=function(d){return"page"==d?A.getName():"pagenumber"==d?t+1:"pagecount"==d?null!=b.pages?b.pages.length:1:D.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(A);l.model.setRoot(A.root)}p=
+c(l,p,t!=n);l!=e&&l.container.parentNode.removeChild(l.container)}}else p=c(e);null==p?b.handleError({message:mxResources.get("errorUpdatingPreview")}):(p.mathEnabled&&(n=p.wnd.document,d&&(p.wnd.IMMEDIATE_PRINT=!0),n.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),p.closeDocument(),!p.mathEnabled&&d&&PrintDialog.printPreview(p));null!=g&&(e.stylesheet=g,e.refresh())}}var e=b.editor.graph,g=document.createElement("div"),l=document.createElement("h3");
+l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,d||mxResources.get("print"));g.appendChild(l);var m=1,k=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");n.appendChild(q);l=document.createElement("span");
+mxUtils.write(l,mxResources.get("printAllPages"));n.appendChild(l);mxUtils.br(n);var p=q.cloneNode(!0);q.setAttribute("checked","checked");p.setAttribute("value","range");n.appendChild(p);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");n.appendChild(l);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";n.appendChild(u);l=document.createElement("span");
+mxUtils.write(l,mxResources.get("to"));n.appendChild(l);var v=u.cloneNode(!0);n.appendChild(v);mxEvent.addListener(u,"focus",function(){p.checked=!0});mxEvent.addListener(v,"focus",function(){p.checked=!0});mxEvent.addListener(u,"change",c);mxEvent.addListener(v,"change",c);if(null!=b.pages&&(m=b.pages.length,null!=b.currentPage))for(l=0;l<b.pages.length;l++)if(b.currentPage==b.pages[l]){k=l+1;u.value=k;v.value=k;break}u.setAttribute("max",m);v.setAttribute("max",m);b.isPagesEnabled()?1<m&&(g.appendChild(n),
+p.checked=!0):p.checked=!0;var x=document.createElement("div");x.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");x.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));x.appendChild(l);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";x.appendChild(y);
+mxEvent.addListener(y,"focus",function(){t.checked=!0});g.appendChild(x);var n=n.cloneNode(!1),C=t.cloneNode(!0);C.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(C);n.appendChild(l);x=document.createElement("table");x.style.display="inline-block";var A=document.createElement("tbody"),N=document.createElement("tr"),G=N.cloneNode(!0),D=document.createElement("td"),
Q=D.cloneNode(!0),E=D.cloneNode(!0),J=D.cloneNode(!0),B=D.cloneNode(!0),T=D.cloneNode(!0);D.style.textAlign="right";J.style.textAlign="right";mxUtils.write(D,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";Q.appendChild(M);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));E.appendChild(l);mxUtils.write(J,
-mxResources.get("fitToBy"));var O=M.cloneNode(!0);B.appendChild(O);mxEvent.addListener(M,"focus",function(){C.checked=!0});mxEvent.addListener(O,"focus",function(){C.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));T.appendChild(l);N.appendChild(D);N.appendChild(Q);N.appendChild(E);G.appendChild(J);G.appendChild(B);G.appendChild(T);A.appendChild(N);A.appendChild(G);x.appendChild(A);p.appendChild(x);g.appendChild(p);p=document.createElement("div");l=
-document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));p.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var K=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));p.appendChild(l);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";
-H.setAttribute("value","100 %");H.style.width="60px";p.appendChild(H);g.appendChild(p);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&l.appendChild(p);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=
-mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)}),x.className="geBtn",l.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";l.appendChild(x);b.editor.cancelFirst||l.appendChild(p);g.appendChild(l);this.container=g};var N=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
+mxResources.get("fitToBy"));var O=M.cloneNode(!0);B.appendChild(O);mxEvent.addListener(M,"focus",function(){C.checked=!0});mxEvent.addListener(O,"focus",function(){C.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));T.appendChild(l);N.appendChild(D);N.appendChild(Q);N.appendChild(E);G.appendChild(J);G.appendChild(B);G.appendChild(T);A.appendChild(N);A.appendChild(G);x.appendChild(A);n.appendChild(x);g.appendChild(n);n=document.createElement("div");l=
+document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));n.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var K=PageSetupDialog.addPageFormatPanel(l,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));n.appendChild(l);var H=document.createElement("input");H.style.cssText="margin:0 8px 0 8px;";
+H.setAttribute("value","100 %");H.style.width="60px";n.appendChild(H);g.appendChild(n);l=document.createElement("div");l.style.cssText="text-align:right;margin:48px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst&&l.appendChild(n);b.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){e.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),x.className="geBtn",l.appendChild(x));PrintDialog.previewEnabled&&(x=
+mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();f(!1)}),x.className="geBtn",l.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";l.appendChild(x);b.editor.cancelFirst||l.appendChild(n);g.appendChild(l);this.container=g};var N=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=
this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var b=this.image;null!=b&&null!=b.src&&Graph.isPageLink(b.src)&&(b={originalSrc:b.src});this.page.viewState.backgroundImage=b}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)}}else N.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 O=document.createElement("canvas"),ha=new Image;ha.onload=function(){try{O.getContext("2d").drawImage(ha,0,0);var b=O.toDataURL("image/png");Editor.prototype.useCanvasForExport=
null!=b&&6<b.length}catch(B){}};ha.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(E){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){k.previousColor=k.color;k.previousImage=k.image;k.previousFormat=k.format;null!=k.foldingEnabled&&(k.foldingEnabled=!k.foldingEnabled);null!=k.mathEnabled&&(k.mathEnabled=!k.mathEnabled);null!=k.shadowVisible&&(k.shadowVisible=!k.shadowVisible);return k};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.4.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.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=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="15.4.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.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.nativeFileSupport=
!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";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(b,c,e,g,k,q,n){q=null!=q?q:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
-"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";k=null!=k?k:Error(b);(new Image).src=d+"/log?severity="+q+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
-encodeURIComponent(e)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(y){}try{n||null==window.console||console.error(q,b,c,e,g,k)}catch(y){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);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!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
+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(b,c,e,g,m,k,p){k=null!=k?k:0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":
+"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(b!=EditorUi.lastErrorMessage&&(null==b||null==c||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=b;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(b);(new Image).src=d+"/log?severity="+k+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+
+encodeURIComponent(e)+(null!=g?":colno:"+encodeURIComponent(g):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(y){}try{p||null==window.console||console.error(k,b,c,e,g,m)}catch(y){}};EditorUi.logEvent=function(b){if("1"==urlParams.dev)EditorUi.debug("logEvent",b);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!=b?"&data="+encodeURIComponent(JSON.stringify(b)):
"")}catch(l){}};EditorUi.sendReport=function(b,c){if("1"==urlParams.dev)EditorUi.debug("sendReport",b);else if(EditorUi.enableLogging)try{c=null!=c?c:5E4,b.length>c&&(b=b.substring(0,c)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(b))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var b=[(new Date).toISOString()],c=0;c<arguments.length;c++)null!=
arguments[c]&&b.push(arguments[c]);console.log.apply(console,b)}}catch(l){}};EditorUi.parsePng=function(b,c,e){function d(b,d){var c=g;g+=d;return b.substring(c,g)}function f(b){b=d(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var g=0;if(d(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(d(b,4),"IHDR"!=d(b,4))null!=e&&e();else{d(b,17);do{e=f(b);var l=d(b,4);if(null!=c&&c(g-8,l,e))break;value=d(b,e);d(b,4);if("IEND"==
l)break}while(e)}};EditorUi.removeChildNodes=function(b){for(;null!=b.firstChild;)b.removeChild(b.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 b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(p){}try{var c=document.createElement("canvas"),e=new Image;e.onload=function(){try{c.getContext("2d").drawImage(e,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(q){}};e.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(p){}try{c=
-document.createElement("canvas");c.width=c.height=1;var g=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==g.match("image/jpeg")}catch(p){}})();EditorUi.prototype.openLink=function(b,c,e){return this.editor.graph.openLink(b,c,e)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,e){localStorage.setItem(b,c);null!=e&&e()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
+!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!b.getContext||!b.getContext("2d"))}catch(m){}try{var c=document.createElement("canvas"),e=new Image;e.onload=function(){try{c.getContext("2d").drawImage(e,0,0);var b=c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=b&&6<b.length}catch(n){}};e.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}try{c=
+document.createElement("canvas");c.width=c.height=1;var g=c.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==g.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(b,c,e){return this.editor.graph.openLink(b,c,e)};EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,c){c(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,c,e){localStorage.setItem(b,c);null!=e&&e()};EditorUi.prototype.removeLocalData=function(b,c){localStorage.removeItem(b);
c()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(b){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(b){return this.isOfflineApp()||!navigator.onLine||!b&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};
-EditorUi.prototype.createSpinner=function(b,c,e){var d=null==b||null==c;e=null!=e?e:24;var f=new Spinner({lines:12,length:e,width:Math.round(e/3),radius:Math.round(e/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=f.spin;f.spin=function(e,l){var k=!1;this.active||(g.call(this,e),this.active=!0,null!=l&&(d&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),k=document.createElement("div"),
-k.style.position="absolute",k.style.whiteSpace="nowrap",k.style.background="#4B4243",k.style.color="white",k.style.fontFamily=Editor.defaultHtmlFont,k.style.fontSize="9pt",k.style.padding="6px",k.style.paddingLeft="10px",k.style.paddingRight="10px",k.style.zIndex=2E9,k.style.left=Math.max(0,b)+"px",k.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(k.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(k.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(k.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&(l+="..."),k.innerHTML=l,e.appendChild(k),f.status=k),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(e,l)}));this.stop();return b}),k=!0);return k};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&null!=f.status.parentNode&&f.status.parentNode.removeChild(f.status);f.status=null};f.pause=function(){return function(){}};
-return f};EditorUi.prototype.isCompatibleString=function(b){try{var d=mxUtils.parseXml(b),c=this.editor.extractGraphModel(d.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
+EditorUi.prototype.createSpinner=function(b,c,e){var d=null==b||null==c;e=null!=e?e:24;var f=new Spinner({lines:12,length:e,width:Math.round(e/3),radius:Math.round(e/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=f.spin;f.spin=function(e,l){var m=!1;this.active||(g.call(this,e),this.active=!0,null!=l&&(d&&(c=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,b=document.body.clientWidth/2-2),m=document.createElement("div"),
+m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.background="#4B4243",m.style.color="white",m.style.fontFamily=Editor.defaultHtmlFont,m.style.fontSize="9pt",m.style.padding="6px",m.style.paddingLeft="10px",m.style.paddingRight="10px",m.style.zIndex=2E9,m.style.left=Math.max(0,b)+"px",m.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(m.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(m.style,
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=l.substring(l.length-3,l.length)&&"!"!=l.charAt(l.length-1)&&(l+="..."),m.innerHTML=l,e.appendChild(m),f.status=m),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(e,l)}));this.stop();return b}),m=!0);return m};var l=f.stop;f.stop=function(){l.call(this);this.active=!1;null!=f.status&&null!=f.status.parentNode&&f.status.parentNode.removeChild(f.status);f.status=null};f.pause=function(){return function(){}};
+return f};EditorUi.prototype.isCompatibleString=function(b){try{var d=mxUtils.parseXml(b),c=this.editor.extractGraphModel(d.documentElement,!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(q){}return!1};EditorUi.prototype.isVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&
3==b.charCodeAt(2)&&4==b.charCodeAt(3)||80==b.charCodeAt(0)&&75==b.charCodeAt(1)&&3==b.charCodeAt(2)&&6==b.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(b){return 8<b.length&&(208==b.charCodeAt(0)&&207==b.charCodeAt(1)&&17==b.charCodeAt(2)&&224==b.charCodeAt(3)&&161==b.charCodeAt(4)&&177==b.charCodeAt(5)&&26==b.charCodeAt(6)&&225==b.charCodeAt(7)||60==b.charCodeAt(0)&&63==b.charCodeAt(1)&&120==b.charCodeAt(2)&&109==b.charCodeAt(3)&&108==b.charCodeAt(3))};EditorUi.prototype.isPngData=
-function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var c=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var e=c.getFunction,g=this.editor.graph,k=this;c.getFunction=function(b){if(g.isSelectionEmpty()&&null!=k.pages&&0<k.pages.length){var d=
-k.getSelectedPageIndex();if(mxEvent.isShiftDown(b)){if(37==b.keyCode)return function(){0<d&&k.movePage(d,d-1)};if(38==b.keyCode)return function(){0<d&&k.movePage(d,0)};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.movePage(d,d+1)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.movePage(d,k.pages.length-1)}}else if(mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)){if(37==b.keyCode)return function(){0<d&&k.selectNextPage(!1)};if(38==b.keyCode)return function(){0<
-d&&k.selectPage(k.pages[0])};if(39==b.keyCode)return function(){d<k.pages.length-1&&k.selectNextPage(!0)};if(40==b.keyCode)return function(){d<k.pages.length-1&&k.selectPage(k.pages[k.pages.length-1])}}}return e.apply(this,arguments)}}return c};var c=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=c.apply(this,arguments);if(null==d)try{var e=b.indexOf("&lt;mxfile ");if(0<=e){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>e&&(d=b.substring(e,g+
-15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var k=mxUtils.parseXml(b),q=this.editor.extractGraphModel(k.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=q?mxUtils.getXml(q):""}catch(v){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
+function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var c=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var e=c.getFunction,g=this.editor.graph,m=this;c.getFunction=function(b){if(g.isSelectionEmpty()&&null!=m.pages&&0<m.pages.length){var d=
+m.getSelectedPageIndex();if(mxEvent.isShiftDown(b)){if(37==b.keyCode)return function(){0<d&&m.movePage(d,d-1)};if(38==b.keyCode)return function(){0<d&&m.movePage(d,0)};if(39==b.keyCode)return function(){d<m.pages.length-1&&m.movePage(d,d+1)};if(40==b.keyCode)return function(){d<m.pages.length-1&&m.movePage(d,m.pages.length-1)}}else if(mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b)){if(37==b.keyCode)return function(){0<d&&m.selectNextPage(!1)};if(38==b.keyCode)return function(){0<
+d&&m.selectPage(m.pages[0])};if(39==b.keyCode)return function(){d<m.pages.length-1&&m.selectNextPage(!0)};if(40==b.keyCode)return function(){d<m.pages.length-1&&m.selectPage(m.pages[m.pages.length-1])}}}return e.apply(this,arguments)}}return c};var c=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=c.apply(this,arguments);if(null==d)try{var e=b.indexOf("&lt;mxfile ");if(0<=e){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>e&&(d=b.substring(e,g+
+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(b),k=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),d=null!=k?mxUtils.getXml(k):""}catch(u){}return d};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var d=b.indexOf('<meta charset="utf-8">');0<=d&&(b=b.slice(0,d)+'<meta charset="utf-8"/>'+b.slice(d+23-1,b.length));b=Graph.zapGremlins(b)}return b};
EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b){d=this.editor.graph;d.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,e=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var g=e.length-
1;0<=g;g--){var k=this.updatePageRoot(new DiagramPage(e[g]));null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[g+1]));d.model.execute(new ChangePage(this,k,0==g?k:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),
-this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,k,q,n,u,t,x,D){c=null!=c?c:this.editor.graph;k=null!=k?k:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(D){var m=
-b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());m.appendChild(b)}else{m=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(m);if(Graph.decompress(l)!=m)return m;m=b.ownerDocument.createElement("diagram");m.setAttribute("id",Editor.guid());mxUtils.setTextContent(m,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(m)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
+this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)d.model.execute(new ChangePage(this,c[g],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(b,c,e,g,m,k,p,v,t,x,D){c=null!=c?c:this.editor.graph;m=null!=m?m:!1;t=null!=t?t:!0;var d,f=null;null==e||e.getMode()==App.MODE_DEVICE||e.getMode()==App.MODE_BROWSER?d="_blank":f=d=g;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){if(D){var n=
+b.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());n.appendChild(b)}else{n=Graph.zapGremlins(mxUtils.getXml(b));l=Graph.compress(n);if(Graph.decompress(l)!=n)return n;n=b.ownerDocument.createElement("diagram");n.setAttribute("id",Editor.guid());mxUtils.setTextContent(n,l)}l=b.ownerDocument.createElement("mxfile");l.appendChild(n)}x?(l=l.cloneNode(!0),l.removeAttribute("modified"),l.removeAttribute("host"),l.removeAttribute("agent"),l.removeAttribute("etag"),l.removeAttribute("userAgent"),
l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type")):(l.removeAttribute("userAgent"),l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("pages"),l.removeAttribute("type"),mxClient.IS_CHROMEAPP?l.setAttribute("host","Chrome"):EditorUi.isElectronApp?l.setAttribute("host","Electron"):l.setAttribute("host",window.location.hostname),l.setAttribute("modified",(new Date).toISOString()),l.setAttribute("agent",navigator.appVersion),l.setAttribute("version",
-EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));D=D?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!q&&!k&&(n||null!=e&&/(\.html)$/i.test(e.getTitle())))D=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(q||!k&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
-App.MODE_BROWSER||(g=null),D=this.getEmbeddedSvg(D,c,g,null,u,t,f);return D};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
+EditorUi.VERSION),l.setAttribute("etag",Editor.guid()),b=null!=e?e.getMode():this.mode,null!=b&&l.setAttribute("type",b),1<l.getElementsByTagName("diagram").length&&null!=this.pages&&l.setAttribute("pages",this.pages.length));D=D?mxUtils.getPrettyXml(l):mxUtils.getXml(l);if(!k&&!m&&(p||null!=e&&/(\.html)$/i.test(e.getTitle())))D=this.getHtml2(mxUtils.getXml(l),c,null!=e?e.getTitle():null,d,f);else if(k||!m&&null!=e&&/(\.svg)$/i.test(e.getTitle()))null==e||e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
+App.MODE_BROWSER||(g=null),D=this.getEmbeddedSvg(D,c,g,null,v,t,f);return D};EditorUi.prototype.getXmlFileData=function(b,c,e,g){b=null!=b?b:!0;c=null!=c?c:!1;e=null!=e?e:!Editor.compressXml;var d=this.editor.getGraphXml(b,g);if(b&&null!=this.fileNode&&null!=this.currentPage)if(b=function(b){var c=b.getElementsByTagName("mxGraphModel"),c=0<c.length?c[0]:null;null==c&&e?(c=mxUtils.trim(mxUtils.getTextContent(b)),b=b.cloneNode(!1),0<c.length&&(c=Graph.decompress(c),null!=c&&0<c.length&&b.appendChild(mxUtils.parseXml(c).documentElement))):
null==c||e?b=b.cloneNode(!0):(b=b.cloneNode(!1),mxUtils.setTextContent(b,Graph.compressNode(c)));d.appendChild(b)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),c)b(this.currentPage.node);else for(c=0;c<this.pages.length;c++){var f=this.pages[c],l=f.node;if(f!=this.currentPage)if(f.needsUpdate){var k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root));this.editor.graph.saveViewState(f.viewState,
k,null,g);EditorUi.removeChildNodes(l);mxUtils.setTextContent(l,Graph.compressNode(k));delete f.needsUpdate}else g&&(this.updatePageRoot(f),null!=f.viewState.backgroundImage&&(null!=f.viewState.backgroundImage.originalSrc?f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.originalSrc,f):Graph.isPageLink(f.viewState.backgroundImage.src)&&(f.viewState.backgroundImage=this.createImageForPageLink(f.viewState.backgroundImage.src,f))),null!=f.viewState.backgroundImage&&
null!=f.viewState.backgroundImage.originalSrc&&(k=new mxCodec(mxUtils.createXmlDocument()),k=k.encode(new mxGraphModel(f.root)),this.editor.graph.saveViewState(f.viewState,k,null,g),l=l.cloneNode(!1),mxUtils.setTextContent(l,Graph.compressNode(k))));b(l)}return d};EditorUi.prototype.anonymizeString=function(b,c){for(var d=[],f=0;f<b.length;f++){var e=b.charAt(f);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(c?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(b){if(null!=b[EditorUi.DIFF_INSERT])for(var d=0;d<b[EditorUi.DIFF_INSERT].length;d++)try{var c=mxUtils.parseXml(b[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=c.getAttribute("name")&&c.setAttribute("name",this.anonymizeString(c.getAttribute("name")));
-b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(q){b[EditorUi.DIFF_INSERT][d].data=q.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var e in b[EditorUi.DIFF_UPDATE]){var g=b[EditorUi.DIFF_UPDATE][e];null!=g.name&&(g.name=this.anonymizeString(g.name));null!=g.cells&&(d=mxUtils.bind(this,function(b){var d=g.cells[b];if(null!=d){for(var c in d)null!=d[c].value&&(d[c].value="["+d[c].value.length+"]"),null!=d[c].xmlValue&&(d[c].xmlValue="["+d[c].xmlValue.length+"]"),null!=d[c].style&&(d[c].style=
+b[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(c)}catch(n){b[EditorUi.DIFF_INSERT][d].data=n.message}if(null!=b[EditorUi.DIFF_UPDATE]){for(var e in b[EditorUi.DIFF_UPDATE]){var g=b[EditorUi.DIFF_UPDATE][e];null!=g.name&&(g.name=this.anonymizeString(g.name));null!=g.cells&&(d=mxUtils.bind(this,function(b){var d=g.cells[b];if(null!=d){for(var c in d)null!=d[c].value&&(d[c].value="["+d[c].value.length+"]"),null!=d[c].xmlValue&&(d[c].xmlValue="["+d[c].xmlValue.length+"]"),null!=d[c].style&&(d[c].style=
"["+d[c].style.length+"]"),0==Object.keys(d[c]).length&&delete d[c];0==Object.keys(d).length&&delete g.cells[b]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(g.cells).length&&delete g.cells);0==Object.keys(g).length&&delete b[EditorUi.DIFF_UPDATE][e]}0==Object.keys(b[EditorUi.DIFF_UPDATE]).length&&delete b[EditorUi.DIFF_UPDATE]}return b};EditorUi.prototype.anonymizeAttributes=function(b,c){if(null!=b.attributes)for(var d=0;d<b.attributes.length;d++)"as"!=b.attributes[d].name&&
b.setAttribute(b.attributes[d].name,this.anonymizeString(b.attributes[d].value,c));if(null!=b.childNodes)for(d=0;d<b.childNodes.length;d++)this.anonymizeAttributes(b.childNodes[d],c)};EditorUi.prototype.anonymizeNode=function(b,c){for(var d=b.getElementsByTagName("mxCell"),f=0;f<d.length;f++)null!=d[f].getAttribute("value")&&d[f].setAttribute("value","["+d[f].getAttribute("value").length+"]"),null!=d[f].getAttribute("xmlValue")&&d[f].setAttribute("xmlValue","["+d[f].getAttribute("xmlValue").length+
"]"),null!=d[f].getAttribute("style")&&d[f].setAttribute("style","["+d[f].getAttribute("style").length+"]"),null!=d[f].parentNode&&"root"!=d[f].parentNode.nodeName&&null!=d[f].parentNode.parentNode&&(d[f].setAttribute("id",d[f].parentNode.getAttribute("id")),d[f].parentNode.parentNode.replaceChild(d[f],d[f].parentNode));return b};EditorUi.prototype.synchronizeCurrentFile=function(b){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!b&&d.invalidChecksum?
-d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,g,k,q,n,
-u,t,x,D){k=null!=k?k:!0;q=null!=q?q:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet());d.setBackgroundImage=this.editor.graph.setBackgroundImage;var m=this.pages[0];this.currentPage==m?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=m.viewState&&
-null!=m.viewState&&d.setBackgroundImage(m.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?m.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(m.root)}}n=null!=n?n:this.getXmlFileData(k,q,x,D);t=null!=t?t:this.getCurrentFile();b=this.createFileData(n,d,t,window.location.href,b,c,e,g,k,u,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,k,
-q){q=null!=q?q:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=q?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;q=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==k&&(c=this.getBasenames().join(";"),0<c.length&&(f=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",q);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit",
-"0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=g&&b.setAttribute("edit",g));null!=k&&(k=k.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";g=Graph.compress(b);Graph.decompress(g)!=b&&(g=encodeURIComponent(b));return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+
-"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+"</head>\n<body"+(null==k&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+g+"</div>\n</div>\n"+(null==k?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,g,k){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(b),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage));
+d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),b?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(b){d.handleFileError(b,!0)}))))};EditorUi.prototype.getFileData=function(b,c,e,g,m,k,p,
+v,t,x,D){m=null!=m?m:!0;k=null!=k?k:!1;var d=this.editor.graph;if(c||!b&&null!=t&&/(\.svg)$/i.test(t.getTitle())){var f=null!=d.themes&&"darkTheme"==d.defaultThemeName;x=!1;if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var l=d.getGlobalVariable,d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet());d.setBackgroundImage=this.editor.graph.setBackgroundImage;var n=this.pages[0];this.currentPage==n?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=n.viewState&&
+null!=n.viewState&&d.setBackgroundImage(n.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?n.getName():"pagenumber"==b?1:l.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(n.root)}}p=null!=p?p:this.getXmlFileData(m,k,x,D);t=null!=t?t:this.getCurrentFile();b=this.createFileData(p,d,t,window.location.href,b,c,e,g,m,v,x);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return b};EditorUi.prototype.getHtml=function(b,c,e,g,m,
+k){k=null!=k?k:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=c){var d=k?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),l=c.view.scale;k=Math.floor(d.x/l-c.view.translate.x);l=Math.floor(d.y/l-c.view.translate.y);d=c.background;null==m&&(c=this.getBasenames().join(";"),0<c.length&&(f=EditorUi.drawHost+"/embed.js?s="+c));b.setAttribute("x0",k);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom","1"),b.setAttribute("resize","0"),b.setAttribute("fit",
+"0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=g&&b.setAttribute("edit",g));null!=m&&(m=m.replace(/&/g,"&amp;"));b=null!=b?Graph.zapGremlins(mxUtils.getXml(b)):"";g=Graph.compress(b);Graph.decompress(g)!=b&&(g=encodeURIComponent(b));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=e?"<title>"+mxUtils.htmlEntities(e)+
+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+g+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(b,c,e,g,k){c=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=k&&(k=k.replace(/&/g,"&amp;"));b={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(b),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(b.page=mxUtils.indexOf(this.pages,this.currentPage));
return(null==k?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=k?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==k?null!=e?"<title>"+mxUtils.htmlEntities(e)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=k?'<meta http-equiv="refresh" content="0;URL=\''+k+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
mxUtils.htmlEntities(JSON.stringify(b))+'"></div>\n'+(null==k?'<script type="text/javascript" src="'+c+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+k+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(b){b=this.validateFileData(b);this.pages=this.fileNode=this.currentPage=null;b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:
null;var d=Editor.extractParserError(b,mxResources.get("invalidOrMissingFile"));if(d)throw Error(mxResources.get("notADiagramFile")+" ("+d+")");d=null!=b?this.editor.extractGraphModel(b,!0):null;null!=d&&(b=d);if(null!=b&&"mxfile"==b.nodeName&&(d=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){var c=null;this.fileNode=b;this.pages=[];for(var e=0;e<d.length;e++)null==d[e].getAttribute("id")&&d[e].setAttribute("id",e),b=new DiagramPage(d[e]),
null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[e+1])),this.pages.push(b),null!=urlParams["page-id"]&&b.getId()==urlParams["page-id"]&&(c=b);this.currentPage=null!=c?c:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var g=urlParams["layer-ids"].split(" ");b={};for(e=0;e<g.length;e++)b[g[e]]=!0;for(var k=this.editor.graph.getModel(),n=k.getChildren(k.root),e=0;e<n.length;e++){var u=n[e];k.setVisible(u,b[u.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(b){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))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&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(b,c,e,g,k,q,n,u,t,x,D,C){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();
+[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var g=urlParams["layer-ids"].split(" ");b={};for(e=0;e<g.length;e++)b[g[e]]=!0;for(var k=this.editor.graph.getModel(),p=k.getChildren(k.root),e=0;e<p.length;e++){var v=p[e];k.setVisible(v,b[v.id]||!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(b){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))d=d.substring(0,d.lastIndexOf("."));/(\.drawio)$/i.test(d)&&(d=d.substring(0,d.lastIndexOf(".")));!b&&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(b,c,e,g,k,n,p,v,t,x,D,C){try{g=null!=g?g:this.editor.graph.isSelectionEmpty();
var d=this.getBaseFilename(!k),f=d+("xml"==b||"pdf"==b&&D?".drawio":"")+"."+b;if("xml"==b){var l=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,g,k,null,null,null,c);this.saveData(f,b,l,"text/xml")}else if("html"==b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,b,l,"text/html");else if("svg"!=b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?f=d+".png":"jpeg"==b&&(f=d+".jpg"),this.saveRequest(f,b,mxUtils.bind(this,function(d,
-c){try{var f=this.editor.graph.pageVisible;null!=q&&(this.editor.graph.pageVisible=q);var e=this.createDownloadRequest(d,b,g,c,n,k,u,t,x,D,C);this.editor.graph.pageVisible=f;return e}catch(ha){this.handleError(ha)}}));else{var m=null,p=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var v=this.editor.graph.background;
-if(n||v==mxConstants.NONE)v=null;var y=this.editor.graph.getSvg(v,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();p(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();p(b)}),g)}}catch(Q){this.handleError(Q)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,q,n,u,t,
-x,D){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==q?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==c&&(null!=D?m="&from="+D.from+"&to="+D.to:0==q&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){l="&from="+q;break}q=
-d.background;"png"!=c&&"pdf"!=c||!k?k||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+g+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+
-(null!=n?"&scale="+n:"")+(null!=u?"&border="+u:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,f=mxUtils.bind(this,function(f){var e=null!=b.data?b.data:"";null!=f&&0<f.length&&(0<e.length&&(e+="\n"),e+=f);f=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return d};this.fileLoaded(f);"csv"==
+c){try{var f=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var e=this.createDownloadRequest(d,b,g,c,p,k,v,t,x,D,C);this.editor.graph.pageVisible=f;return e}catch(ha){this.handleError(ha)}}));else{var m=null,q=mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==b){var u=this.editor.graph.background;
+if(p||u==mxConstants.NONE)u=null;var y=this.editor.graph.getSvg(u,null,null,null,null,g);e&&this.editor.graph.addSvgShadow(y);this.editor.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(b))})))}else f=d+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();q(b)}),g)}}catch(Q){this.handleError(Q)}};EditorUi.prototype.createDownloadRequest=function(b,c,e,g,k,n,p,v,t,
+x,D){var d=this.editor.graph,f=d.getGraphBounds();e=this.getFileData(!0,null,null,null,e,0==n?!1:"xmlpng"!=c,null,null,null,!1,"pdf"==c);var l="",m="";if(f.width*f.height>MAX_AREA||e.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};x=x?"1":"0";"pdf"==c&&(null!=D?m="&from="+D.from+"&to="+D.to:0==n&&(m="&allPages=1"));if("xmlpng"==c&&(x="1",c="png",null!=this.pages&&null!=this.currentPage))for(n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){l="&from="+n;break}n=
+d.background;"png"!=c&&"pdf"!=c||!k?k||null!=n&&n!=mxConstants.NONE||(n="#ffffff"):n=mxConstants.NONE;k={globalVars:d.getExportVariables()};t&&(k.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});Graph.translateDiagram&&(k.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+c+l+m+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+g+"&embedXml="+x+"&xml="+encodeURIComponent(e)+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(k))+
+(null!=p?"&scale="+p:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(b,c){this.mode=b};EditorUi.prototype.loadDescriptor=function(b,c,e){var d=window.location.hash,f=mxUtils.bind(this,function(f){var e=null!=b.data?b.data:"";null!=f&&0<f.length&&(0<e.length&&(e+="\n"),e+=f);f=new LocalFile(this,"csv"!=b.format&&0<e.length?e:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);f.getHash=function(){return d};this.fileLoaded(f);"csv"==
b.format&&this.importCsv(e,mxUtils.bind(this,function(b){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=b.update){var g=null!=b.interval?parseInt(b.interval):6E4,l=null,k=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(b.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(b){d===this.currentPage&&(200<=b.getStatus()&&300>=b.getStatus()?(this.updateDiagram(b.getText()),m()):this.handleError({message:mxResources.get("error")+
" "+b.getStatus()}))}),mxUtils.bind(this,function(b){this.handleError(b)}))}),m=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(k,g)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();k()}));m();k()}null!=c&&c()});null!=b.url&&0<b.url.length?this.editor.loadUrl(b.url,mxUtils.bind(this,function(b){f(b)}),mxUtils.bind(this,function(b){null!=e&&e(b)})):f("")};EditorUi.prototype.updateDiagram=function(b){function d(b){var d=new mxCellOverlay(b.image||g.warningImage,
-b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==b.nodeName)){var g=this.editor.graph,k=g.getModel();k.beginUpdate();var n=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var u=k.getCell(b.getAttribute("id"));if(null!=u){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;
-if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(u,x);else for(var D=x.attributes,C=0;C<D.length;C++)g.setAttributeForCell(u,D[C].nodeName,0<D[C].nodeValue.length?D[C].nodeValue:null)}}catch(Q){null!=window.console&&console.log("Error in value for "+u.id+": "+Q)}try{var G=b.getAttribute("style");null!=G&&g.model.setStyle(u,G)}catch(Q){null!=window.console&&console.log("Error in style for "+u.id+": "+Q)}try{var J=b.getAttribute("icon");if(null!=J){var L=0<J.length?JSON.parse(J):null;null!=
-L&&L.append||g.removeCellOverlays(u);null!=L&&g.addCellOverlay(u,d(L))}}catch(Q){null!=window.console&&console.log("Error in icon for "+u.id+": "+Q)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),K=g.getCellGeometry(u);if(null!=K){K=K.clone();for(key in H){var A=parseFloat(H[key]);"dx"==key?K.x+=A:"dy"==key?K.y+=A:"dw"==key?K.width+=A:"dh"==key?K.height+=A:K[key]=parseFloat(H[key])}g.model.setGeometry(u,K)}}}catch(Q){null!=window.console&&console.log("Error in icon for "+u.id+
-": "+Q)}}}else if("model"==b.nodeName){for(var M=b.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(b.firstChild)).decode(M,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(g.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))g.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(n=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):
-1);b=b.nextSibling}}finally{k.endUpdate()}null!=n&&this.chromelessResize&&this.chromelessResize(!0,n)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,f="",e=d.lastIndexOf(".");0<=e&&(f=d.substring(e),d=d.substring(0,e));if(c)var g=new Date,e=g.getFullYear(),k=g.getMonth()+1,n=g.getDate(),t=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+k+"-"+n+"-"+t+"-"+x+"-"+g));return d=mxResources.get("copyOf",[d])+f};
+b.tooltip,b.align,b.valign,b.offset);d.addListener(mxEvent.CLICK,function(d,c){e.alert(b.tooltip)});return d}var c=null,e=this;if(null!=b&&0<b.length&&(c=mxUtils.parseXml(b),b=null!=c?c.documentElement:null,null!=b&&"updates"==b.nodeName)){var g=this.editor.graph,k=g.getModel();k.beginUpdate();var p=null;try{for(b=b.firstChild;null!=b;){if("update"==b.nodeName){var v=k.getCell(b.getAttribute("id"));if(null!=v){try{var t=b.getAttribute("value");if(null!=t){var x=mxUtils.parseXml(t).documentElement;
+if(null!=x)if("1"==x.getAttribute("replace-value"))k.setValue(v,x);else for(var D=x.attributes,C=0;C<D.length;C++)g.setAttributeForCell(v,D[C].nodeName,0<D[C].nodeValue.length?D[C].nodeValue:null)}}catch(Q){null!=window.console&&console.log("Error in value for "+v.id+": "+Q)}try{var G=b.getAttribute("style");null!=G&&g.model.setStyle(v,G)}catch(Q){null!=window.console&&console.log("Error in style for "+v.id+": "+Q)}try{var J=b.getAttribute("icon");if(null!=J){var L=0<J.length?JSON.parse(J):null;null!=
+L&&L.append||g.removeCellOverlays(v);null!=L&&g.addCellOverlay(v,d(L))}}catch(Q){null!=window.console&&console.log("Error in icon for "+v.id+": "+Q)}try{var H=b.getAttribute("geometry");if(null!=H){var H=JSON.parse(H),K=g.getCellGeometry(v);if(null!=K){K=K.clone();for(key in H){var A=parseFloat(H[key]);"dx"==key?K.x+=A:"dy"==key?K.y+=A:"dw"==key?K.width+=A:"dh"==key?K.height+=A:K[key]=parseFloat(H[key])}g.model.setGeometry(v,K)}}}catch(Q){null!=window.console&&console.log("Error in icon for "+v.id+
+": "+Q)}}}else if("model"==b.nodeName){for(var M=b.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(b.firstChild)).decode(M,k)}else if("view"==b.nodeName){if(b.hasAttribute("scale")&&(g.view.scale=parseFloat(b.getAttribute("scale"))),b.hasAttribute("dx")||b.hasAttribute("dy"))g.view.translate=new mxPoint(parseFloat(b.getAttribute("dx")||0),parseFloat(b.getAttribute("dy")||0))}else"fit"==b.nodeName&&(p=b.hasAttribute("max-scale")?parseFloat(b.getAttribute("max-scale")):
+1);b=b.nextSibling}}finally{k.endUpdate()}null!=p&&this.chromelessResize&&this.chromelessResize(!0,p)}return c};EditorUi.prototype.getCopyFilename=function(b,c){var d=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename,f="",e=d.lastIndexOf(".");0<=e&&(f=d.substring(e),d=d.substring(0,e));if(c)var g=new Date,e=g.getFullYear(),k=g.getMonth()+1,p=g.getDate(),t=g.getHours(),x=g.getMinutes(),g=g.getSeconds(),d=d+(" "+(e+"-"+k+"-"+p+"-"+t+"-"+x+"-"+g));return d=mxResources.get("copyOf",[d])+f};
EditorUi.prototype.fileLoaded=function(b,c){var d=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var f=!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);!c&&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();c||this.showSplash()});if(null!=b)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(b);b.addListener("descriptorChanged",this.descriptorChangedListener);
b.addListener("contentChanged",this.descriptorChangedListener);b.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();b.isEditable()?b.isModified()?(b.addUnsavedStatus(),null!=b.backupPatch&&b.patch([b.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");
!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));f=!0;this.isOffline()||null==b.getMode()||EditorUi.logEvent({category:b.getMode().toUpperCase()+"-OPEN-FILE-"+b.getHash(),action:"size_"+b.getSize(),label:"autosave_"+
-(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[b]);if(this.editor.editable&&this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.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!=b?b.getHash():"none"),action:"message_"+
-v.message,label:"stack_"+v.stack})}catch(u){}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()});c?g():this.handleError(v,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else e();return f};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,f=new mxGraphModel,e=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=
-0);for(var g=0;g<b.length;g++){this.updatePageRoot(b[g]);var k=b[g].node.cloneNode(!1);k.removeAttribute("name");f.root=b[g].root;var n=e.encode(f);this.editor.graph.saveViewState(b[g].viewState,n,!0);n.removeAttribute("pageWidth");n.removeAttribute("pageHeight");k.appendChild(n);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,f){return!f||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=
+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[b]);if(this.editor.editable&&this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.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!=b?b.getHash():"none"),action:"message_"+
+u.message,label:"stack_"+u.stack})}catch(v){}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()});c?g():this.handleError(u,mxResources.get("errorLoadingFile"),g,!0,null,null,!0)}else e();return f};EditorUi.prototype.getHashValueForPages=function(b,c){var d=0,f=new mxGraphModel,e=new mxCodec;null!=c&&(c.byteCount=0,c.attrCount=0,c.eltCount=0,c.nodeCount=
+0);for(var g=0;g<b.length;g++){this.updatePageRoot(b[g]);var k=b[g].node.cloneNode(!1);k.removeAttribute("name");f.root=b[g].root;var p=e.encode(f);this.editor.graph.saveViewState(b[g].viewState,p,!0);p.removeAttribute("pageWidth");p.removeAttribute("pageHeight");k.appendChild(p);null!=c&&(c.eltCount+=k.getElementsByTagName("*").length,c.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(b,d,c,f){return!f||"mxGeometry"!=b.nodeName&&"mxPoint"!=b.nodeName||"x"!=
d&&"y"!=d&&"width"!=d&&"height"!=d?f&&"mxCell"==b.nodeName&&"previous"==d?null:c:Math.round(c)},c)<<0}return d};EditorUi.prototype.hashValue=function(b,c,e){var d=0;if(null!=b&&"object"===typeof b&&"number"===typeof b.nodeType&&"string"===typeof b.nodeName&&"function"===typeof b.getAttribute){null!=b.nodeName&&(d^=this.hashValue(b.nodeName,c,e));if(null!=b.attributes){null!=e&&(e.attrCount+=b.attributes.length);for(var f=0;f<b.attributes.length;f++){var g=b.attributes[f].name,l=null!=c?c(b,g,b.attributes[f].value,
-!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,g,k,q,n){};
+!0):b.attributes[f].value;null!=l&&(d^=this.hashValue(g,c,e)+this.hashValue(l,c,e))}}if(null!=b.childNodes)for(f=0;f<b.childNodes.length;f++)d=(d<<5)-d+this.hashValue(b.childNodes[f],c,e)<<0}else if(null!=b&&"function"!==typeof b){b=String(b);c=0;null!=e&&(e.byteCount+=b.length);for(f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)<<0;d^=c}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(b,c,e,g,k,n,p){};
EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var d=mxUtils.createXmlDocument(),c=d.createElement("mxlibrary");
mxUtils.setTextContent(c,JSON.stringify(b));d.appendChild(c);return mxUtils.getXml(d)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var d=this.sidebar.palettes[b];if(null!=d){for(var c=0;c<d.length;c++)d[c].parentNode.removeChild(d[c]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=
function(b){var d=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=b?b:d.firstChild.nextSibling.nextSibling;var c=d.lastChild,e=c.previousSibling;d.insertBefore(c,b);d.insertBefore(e,c)};EditorUi.prototype.loadLibrary=function(b,c){var d=mxUtils.parseXml(b.getData());if("mxlibrary"==d.documentElement.nodeName){var e=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(b,
e,d.documentElement.getAttribute("title"),c)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,c,e,g){if(null!=this.sidebar){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var d=this.sidebar.palettes[b.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var f=null,l=mxUtils.bind(this,
-function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var m=k.parentNode.previousSibling;g=m.getAttribute("title");null!=g&&0<
-g.length&&".scratchpad"!=b.title&&m.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var n=document.createElement("div");n.style.position="absolute";n.style.right="0px";n.style.top="0px";n.style.padding="8px";n.style.backgroundColor="inherit";m.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Editor.crossImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.position="relative";t.style.top=
-"2px";t.style.width="14px";t.style.cursor="pointer";t.style.margin="0 3px";Editor.isDarkMode()&&(t.style.filter="invert(100%)");var C=null;if(".scratchpad"!=b.title||this.closableScratchpad)n.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=C?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
-if(b.isEditable()){var G=this.editor.graph,J=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=J&&null!=J.parentNode&&J.parentNode.removeChild(J),J=t.cloneNode(!1),J.setAttribute("src",Editor.spinImage),J.setAttribute("title",mxResources.get("saving")),J.style.cursor="default",J.style.marginRight="2px",J.style.marginTop="-2px",n.insertBefore(J,n.firstChild),m.style.paddingRight=
-18*n.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=J&&null!=J.parentNode&&(J.parentNode.removeChild(J),m.style.paddingRight=18*n.childNodes.length+"px")})):null==C&&(C=t.cloneNode(!1),C.setAttribute("src",Editor.saveImage),C.setAttribute("title",mxResources.get("save")),n.insertBefore(C,n.firstChild),mxEvent.addListener(C,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
-C||b.isModified()||(m.style.paddingRight=18*n.childNodes.length+"px",C.parentNode.removeChild(C),C=null)});mxEvent.consume(d)})),m.style.paddingRight=18*n.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,g){b=G.cloneCells(mxUtils.sortCells(G.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=G.getCellGeometry(b[l]);null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
+function(d,c){0==d.length&&b.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),c.appendChild(f)):this.addLibraryEntries(d,c)});null!=this.sidebar&&null!=c&&this.sidebar.addEntries(c);e=null!=e&&0<e.length?e:b.getTitle();var k=this.sidebar.addPalette(b.getHash(),e,null!=g?g:!0,mxUtils.bind(this,function(b){l(c,b)}));this.repositionLibrary(d);var q=k.parentNode.previousSibling;g=q.getAttribute("title");null!=g&&0<
+g.length&&".scratchpad"!=b.title&&q.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+g);var p=document.createElement("div");p.style.position="absolute";p.style.right="0px";p.style.top="0px";p.style.padding="8px";p.style.backgroundColor="inherit";q.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Editor.crossImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("valign","absmiddle");t.setAttribute("border","0");t.style.position="relative";t.style.top=
+"2px";t.style.width="14px";t.style.cursor="pointer";t.style.margin="0 3px";Editor.isDarkMode()&&(t.style.filter="invert(100%)");var C=null;if(".scratchpad"!=b.title||this.closableScratchpad)p.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=C?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(d)}}));
+if(b.isEditable()){var G=this.editor.graph,J=null,L=mxUtils.bind(this,function(d){this.showLibraryDialog(b.getTitle(),k,c,b,b.getMode());mxEvent.consume(d)}),H=mxUtils.bind(this,function(d){b.setModified(!0);b.isAutosave()?(null!=J&&null!=J.parentNode&&J.parentNode.removeChild(J),J=t.cloneNode(!1),J.setAttribute("src",Editor.spinImage),J.setAttribute("title",mxResources.get("saving")),J.style.cursor="default",J.style.marginRight="2px",J.style.marginTop="-2px",p.insertBefore(J,p.firstChild),q.style.paddingRight=
+18*p.childNodes.length+"px",this.saveLibrary(b.getTitle(),c,b,b.getMode(),!0,!0,function(){null!=J&&null!=J.parentNode&&(J.parentNode.removeChild(J),q.style.paddingRight=18*p.childNodes.length+"px")})):null==C&&(C=t.cloneNode(!1),C.setAttribute("src",Editor.saveImage),C.setAttribute("title",mxResources.get("save")),p.insertBefore(C,p.firstChild),mxEvent.addListener(C,"click",mxUtils.bind(this,function(d){this.saveLibrary(b.getTitle(),c,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==
+C||b.isModified()||(q.style.paddingRight=18*p.childNodes.length+"px",C.parentNode.removeChild(C),C=null)});mxEvent.consume(d)})),q.style.paddingRight=18*p.childNodes.length+"px")}),K=mxUtils.bind(this,function(b,d,e,g){b=G.cloneCells(mxUtils.sortCells(G.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var m=G.getCellGeometry(b[l]);null!=m&&m.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(b,d.width,d.height,g||"",!0,!1,!1));b={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
w:d.width,h:d.height};null!=g&&(b.title=g);c.push(b);H(e);null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)}),A=mxUtils.bind(this,function(b){if(G.isSelectionEmpty())G.getRubberband().isActive()?(G.getRubberband().execute(b),G.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=G.getSelectionCells(),c=G.view.getBounds(d),e=G.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=G.view.translate.x;
c.y-=G.view.translate.y;K(d,c)}mxEvent.consume(b)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(b){G.isMouseDown&&null!=G.panningManager&&null!=G.graphHandler.first&&(G.graphHandler.suspend(),null!=G.graphHandler.hint&&(G.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",G.panningManager.stop(),G.autoScroll=!1,mxEvent.consume(b))}),mxUtils.bind(this,function(b){G.isMouseDown&&null!=G.panningManager&&null!=G.graphHandler&&
(k.style.backgroundColor="",k.style.cursor="default",this.sidebar.showTooltips=!0,G.panningManager.stop(),G.graphHandler.reset(),G.isMouseDown=!1,G.autoScroll=!0,A(b),mxEvent.consume(b))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(b){G.isMouseDown&&null!=G.graphHandler.first&&(G.graphHandler.resume(),null!=G.graphHandler.hint&&(G.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",G.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,
-"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,p,q,n,u,t){if(null!=d&&"image/"==e.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,p,q),d)],d[0].vertex=!0,K(d,new mxRectangle(0,0,p,q),b,mxEvent.isAltDown(b)?null:n.substring(0,n.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,x=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=
-JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();v=!0}catch(V){}else if("mxfile"==g.documentElement.nodeName)try{for(var p=g.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(p[m])),n=this.editor.graph.getBoundingBoxFromGeometry(q);K(q,new mxRectangle(0,0,n.width,n.height),b)}v=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=t&&null!=n&&(/(\.v(dx|sdx?))($|\?)/i.test(n)||/(\.vs(x|sx?))($|\?)/i.test(n))?this.importVisio(t,function(b){x(b,"text/xml")},null,n):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,n)&&null!=t?this.parseFile(t,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?x(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));n.insertBefore(t,n.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
-k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));n.insertBefore(g,n.firstChild);mxEvent.addListener(g,"click",A);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(b)})),n.insertBefore(g,n.firstChild))}m.appendChild(n);m.style.paddingRight=18*n.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),
+"dragover",mxUtils.bind(this,function(b){k.style.backgroundColor="#f1f3f4";b.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(b){k.style.cursor="";k.style.backgroundColor="";0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,e,g,m,n,q,p,u,v){if(null!=d&&"image/"==e.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,q),d)],d[0].vertex=!0,K(d,new mxRectangle(0,0,n,q),b,mxEvent.isAltDown(b)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null);else{var t=!1,x=mxUtils.bind(this,function(d,e){if(null!=d&&"application/pdf"==e){var g=Editor.extractGraphModelFromPdf(d);null!=g&&0<g.length&&(d=g)}if(null!=d)if(g=mxUtils.parseXml(d),"mxlibrary"==g.documentElement.nodeName)try{var m=
+JSON.parse(mxUtils.getTextContent(g.documentElement));l(m,k);c=c.concat(m);H(b);this.spinner.stop();t=!0}catch(V){}else if("mxfile"==g.documentElement.nodeName)try{for(var n=g.documentElement.getElementsByTagName("diagram"),m=0;m<n.length;m++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[m])),p=this.editor.graph.getBoundingBoxFromGeometry(q);K(q,new mxRectangle(0,0,p.width,p.height),b)}t=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<c.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?this.importVisio(v,function(b){x(b,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,p)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?x(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):x(d,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(k,"dragleave",function(b){k.style.cursor="";k.style.backgroundColor="";b.stopPropagation();b.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",Editor.editImage);t.setAttribute("title",mxResources.get("edit"));p.insertBefore(t,p.firstChild);mxEvent.addListener(t,"click",L);mxEvent.addListener(k,"dblclick",function(b){mxEvent.getSource(b)==
+k&&L(b)});g=t.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));p.insertBefore(g,p.firstChild);mxEvent.addListener(g,"click",A);this.isOffline()||".scratchpad"!=b.title||null==EditorUi.scratchpadHelpLink||(g=document.createElement("span"),g.setAttribute("title",mxResources.get("help")),g.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(g,"?"),mxEvent.addGestureListeners(g,mxUtils.bind(this,function(b){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(b)})),p.insertBefore(g,p.firstChild))}q.appendChild(p);q.style.paddingRight=18*p.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(b,c){for(var d=0;d<b.length;d++){var e=b[d],f=e.data;if(null!=f){var f=this.convertDataUri(f),g="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(g+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(g+"image="+f,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(f=this.stringToCells(Graph.decompress(e.xml)),
0<f.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(f,e.w,e.h,e.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(b){return null!=b?b[mxLanguage]||b.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="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):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
"#2a2a2a",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";"1"==urlParams.sketch&&(Graph.prototype.defaultVertexStyle={pointerEvents:"0",hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",
@@ -3437,28 +3438,28 @@ endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPer
480:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b,c){b=null!=b?b:mxUtils.bind(this,function(b,d){if(!d){var c=new ChangePageSetup(this,null,b);c.ignoreColor=!0;this.editor.graph.model.execute(c)}});var d=new BackgroundImageDialog(this,b,c);this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(b,c,e,g,k){b=new LibraryDialog(this,b,c,e,g,k);this.showDialog(b.container,640,440,!0,!1,mxUtils.bind(this,
function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};var e=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(b){var d=e.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(b){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var b=this.createDiv("geSidebarContainer geSidebarFooter");b.style.position="absolute";b.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>+</span>";var e=c.getElementsByTagName("span")[0];e.style.fontSize="18px";e.style.marginRight="5px";mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}));mxEvent.addListener(c,"click",mxUtils.bind(this,
-function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,q,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{n?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(J){}if(null!=
-f||null!=c){n=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),m=null;c=null!=c?c:mxResources.get("error");if(null!=f){null!=f.retry&&(l=mxResources.get("cancel"),m=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){n=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
-this.drive.user.displayName+", "+this.drive.user.email+")":""));var p=null!=k?null:null!=q?q:window.location.hash;if(null!=p&&("#G"==p.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==p.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){p="#U"==p.substring(0,2)?p.substring(45,p.lastIndexOf("%26ex")):
-p.substring(2);this.showError(c,n,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+p);this.handleError(b,c,e,g,k)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+d[b].email+
+function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(c);return b};EditorUi.prototype.handleError=function(b,c,e,g,k,n,p){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=b&&null!=b.error?b.error:b;if(null!=b&&null!=b.stack&&null!=b.message)try{p?null!=window.console&&console.error("EditorUi.handleError:",b):EditorUi.logError("Caught: "+(""==b.message&&null!=b.name)?b.name:b.message,b.filename,b.lineNumber,b.columnNumber,b,"INFO")}catch(J){}if(null!=
+f||null!=c){p=mxUtils.htmlEntities(mxResources.get("unknownError"));var l=mxResources.get("ok"),m=null;c=null!=c?c:mxResources.get("error");if(null!=f){null!=f.retry&&(l=mxResources.get("cancel"),m=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){p=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=k?k:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
+this.drive.user.displayName+", "+this.drive.user.email+")":""));var q=null!=k?null:null!=n?n:window.location.hash;if(null!=q&&("#G"==q.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==q.substring(0,45))&&(null!=b&&null!=b.error&&(null!=b.error.errors&&0<b.error.errors.length&&"fileAccess"==b.error.errors[0].reason||null!=b.error.data&&0<b.error.data.length&&"fileAccess"==b.error.data[0].reason)||404==f.code||404==f.status)){q="#U"==q.substring(0,2)?q.substring(45,q.lastIndexOf("%26ex")):
+q.substring(2);this.showError(c,p,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+q);this.handleError(b,c,e,g,k)}),m,mxResources.get("changeUser"),mxUtils.bind(this,function(){function b(){f.innerHTML="";for(var b=0;b<d.length;b++){var c=document.createElement("option");mxUtils.write(c,d[b].displayName);c.value=b;f.appendChild(c);c=document.createElement("option");c.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(c,"<"+d[b].email+
">");c.setAttribute("disabled","disabled");f.appendChild(c)}c=document.createElement("option");mxUtils.write(c,mxResources.get("addAccount"));c.value=d.length;f.appendChild(c)}var d=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 f=document.createElement("select");f.style.width="200px";b();mxEvent.addListener(f,"change",mxUtils.bind(this,function(){var c=f.value,
-e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=f.message?n=""==f.message&&null!=
-f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?n=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?n=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?n=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(n=mxUtils.htmlEntities(f)))}var t=q=null;null!=f&&null!=f.helpLink&&(q=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));
-this.showError(c,n,l,e,m,null,null,q,t,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,q){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();null!=c&&c()},function(){d();null!=e&&e()},g,k,null,
-null,null,null,f);this.showDialog(b.container,340,46+f,!0,q);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.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(f.style,
+e=d.length!=c;e&&this.drive.setUser(d[c]);this.drive.authorize(e,mxUtils.bind(this,function(){e||(d=this.drive.getUsersList(),b())}),mxUtils.bind(this,function(b){this.handleError(b)}),!0)}));c.appendChild(f);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(c.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=e&&e()}),480,150);return}}null!=f.message?p=""==f.message&&null!=
+f.name?mxUtils.htmlEntities(f.name):mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?p=mxUtils.htmlEntities(f.response.error):"undefined"!==typeof window.App&&(f.code==App.ERROR_TIMEOUT?p=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?p=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof f&&0<f.length&&(p=mxUtils.htmlEntities(f)))}var u=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),u=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));
+this.showError(c,p,l,e,m,null,null,n,u,null,null,null,g?e:null)}else null!=e&&e()};EditorUi.prototype.alert=function(b,c,e){b=new ErrorDialog(this,null,b,mxResources.get("ok"),c);this.showDialog(b.container,e||340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(b,c,e,g,k,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(b.length/50));b=new ConfirmDialog(this,b,function(){d();null!=c&&c()},function(){d();null!=e&&e()},g,k,null,
+null,null,null,f);this.showDialog(b.container,340,46+f,!0,n);b.init()};EditorUi.prototype.showBanner=function(b,c,e,g){var d=!1;if(!(this.bannerShowing||this["hideBanner"+b]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+b])){var f=document.createElement("div");f.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(f.style,
"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.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;";f.appendChild(d);d=document.createElement("img");d.setAttribute("src",
Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get(g?"doNotShowAgain":"close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";f.appendChild(d);mxUtils.write(f,c);document.body.appendChild(f);this.bannerShowing=!0;c=document.createElement("div");c.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var l=document.createElement("input");l.setAttribute("type","checkbox");
-l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);f.style.paddingBottom="30px";f.appendChild(c)}var m=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
-b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);m()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){m()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),m(),mxEvent.consume(b)):n()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,
-"transform","translate(-50%,0%)")}),500);window.setTimeout(n,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,g){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(c))),
+l.setAttribute("id","geDoNotShowAgainCheckbox");l.style.marginRight="6px";if(!g){c.appendChild(l);var k=document.createElement("label");k.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(k,mxResources.get("doNotShowAgain"));c.appendChild(k);f.style.paddingBottom="30px";f.appendChild(c)}var q=mxUtils.bind(this,function(){null!=f.parentNode&&(f.parentNode.removeChild(f),this.bannerShowing=!1,l.checked||g)&&(this["hideBanner"+b]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+
+b]=Date.now(),mxSettings.save()))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){mxEvent.consume(b);q()}));var p=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){q()}),1E3)});mxEvent.addListener(f,"click",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);d!=l&&d!=k?(null!=e&&e(),q(),mxEvent.consume(b)):p()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(f.style,
+"transform","translate(-50%,0%)")}),500);window.setTimeout(p,3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(b){null!=b&&(b.opened=new Date);this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(b,c,e,g){b=b.toDataURL("image/"+e);if(null!=b&&6<b.length)null!=c&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(c))),
0<g&&(b=Editor.writeGraphModelToPng(b,"pHYs","dpi",g));else throw{message:mxResources.get("unknownError")};return b};EditorUi.prototype.saveCanvas=function(b,c,e,g,k){var d="jpeg"==e?"jpg":e;g=this.getBaseFilename(g)+(null!=c?".drawio":"")+"."+d;b=this.createImageDataUri(b,c,e,k);this.saveData(g,d,b.substring(b.lastIndexOf(",")+1),"image/"+e,!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||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,g,k,q){"text/xml"!=e||/(\.drawio)$/i.test(c)||
-/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=q?q:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+
-":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");q=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);q=65==(f?parseInt(f[2],10):!1)?!1:q}if(q||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));q?d.download=c:d.setAttribute("target","_blank");document.body.appendChild(d);
-try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,q){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=q?"&base64="+q:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(b,c){c=
-c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var n=1024*k,t=Math.min(n+1024,e),x=Array(t-n),D=0;n<t;++D,++n)x[D]=d[n].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,q,n,u){q=null!=q?q:!1;n=null!=n?n:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(q);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
-c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,g);else if(null!=e&&"text/html"==e.substring(0,9)){var f=new EmbedDialog(this,b);this.showDialog(f.container,440,240,!0,!0);f.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,g,null,u):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,
-d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(J){this.handleError(J)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,n,null,1<k,d,b,e,g);q=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,400,q,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
+9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(b,c){var d=new TextareaDialog(this,b,c,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(b,c,e,g,k,n){"text/xml"!=e||/(\.drawio)$/i.test(c)||
+/(\.xml)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.html)$/i.test(c)||(c=c+"."+(null!=n?n:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)b=g?this.base64ToBlob(b,e):new Blob([b],{type:e}),navigator.msSaveOrOpenBlob(b,c);else if(mxClient.IS_IE)e=window.open("about:blank","_blank"),null==e?mxUtils.popup(b,!0):(e.document.write(b),e.document.close(),e.document.execCommand("SaveAs",!0,c),e.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==e||"image/"!=e.substring(0,6)?this.showTextDialog(c+
+":",b):this.openInNewWindow(b,e,g);else{var d=document.createElement("a");n=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);n=65==(f?parseInt(f[2],10):!1)?!1:n}if(n||this.isOffline()){d.href=URL.createObjectURL(g?this.base64ToBlob(b,e):new Blob([b],{type:e}));n?d.download=c:d.setAttribute("target","_blank");document.body.appendChild(d);
+try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},2E4),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(b,c,e,g,k).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,c,e,g,k,n){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=e?"&mime="+e:"")+(null!=k?"&format="+k:"")+(null!=n?"&base64="+n:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(g?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(b,c){c=
+c||"";for(var d=atob(b),e=d.length,f=Math.ceil(e/1024),g=Array(f),k=0;k<f;++k){for(var p=1024*k,t=Math.min(p+1024,e),x=Array(t-p),D=0;p<t;++D,++p)x[D]=d[p].charCodeAt(0);g[k]=new Uint8Array(x)}return new Blob(g,{type:c})};EditorUi.prototype.saveLocalFile=function(b,c,e,g,k,n,p,t){n=null!=n?n:!1;p=null!=p?p:"vsdx"!=k&&(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(n);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(d,c){try{if("_blank"==
+c)if(null!=e&&"image/"==e.substring(0,6))this.openInNewWindow(b,e,g);else if(null!=e&&"text/html"==e.substring(0,9)){var f=new EmbedDialog(this,b);this.showDialog(f.container,440,240,!0,!0);f.init()}else{var l=window.open("about:blank");null==l?mxUtils.popup(b,!0):(l.document.write("<pre>"+mxUtils.htmlEntities(b,!1)+"</pre>"),l.document.close())}else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(b,d,e,g,null,t):null!=d&&0<d.length&&this.pickFolder(c,mxUtils.bind(this,function(f){try{this.exportFile(b,
+d,e,g,c,f)}catch(L){this.handleError(L)}}))}catch(J){this.handleError(J)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,p,null,1<k,d,b,e,g);n=this.isServices(k)?k>d?390:270:160;this.showDialog(c.container,400,n,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(b,c,e){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(b,!0):("image/svg+xml"!=c||mxClient.IS_SVG?"image/svg+xml"==c?d.document.write("<html>"+
b+"</html>"):(b=e?b:btoa(unescape(encodeURIComponent(b))),d.document.write('<html><img style="max-width:100%;" src="data:'+c+";base64,"+b+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(b,!1)+"</pre></html>"),d.document.close())};var k=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};
EditorUi.prototype.addChromelessToolbarItems=function(b){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var d=b(mxUtils.bind(this,function(b){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",
this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color=
@@ -3471,87 +3472,87 @@ this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExp
this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(b){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(b,
null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.style.backgroundColor="white";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",c);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);d.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,
function(b){this.spinner.stop();this.handleError(b)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",d);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(b,c,e,g,k){this.isLocalFileSave()?this.saveLocalFile(e,b,g,k,c):this.saveRequest(b,c,mxUtils.bind(this,function(b,d){return this.createEchoRequest(e,b,g,k,c,d)}),e,k,g)};EditorUi.prototype.saveRequest=
-function(b,c,e,g,k,q,n){n=null!=n?n:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){q=null!=q?q:"pdf"==c?"application/pdf":
-"image/"+c;if(null!=g)try{this.exportFile(g,b,q,!0,d,e)}catch(J){this.handleError(J)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,q,!0,d,e)}catch(J){this.handleError(J)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),
-mxResources.get("saveAs"),mxResources.get("download"),!1,!1,n,null,1<d,f,g,q,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,380,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,q){};EditorUi.prototype.pickFolder=function(b,c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,q,n,u,t,x,D,C){if(this.spinner.spin(document.body,
-mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=D?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,n,u,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,D,C);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg",p=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",
-this.getFileData(!0,null,null,null,e,t,null,null,null,!1));var d=Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(l);this.editor.graph.mathEnabled&&this.editor.addMathCss(l);q?(null==this.thumbImageCache&&
-(this.thumbImageCache={}),this.editor.convertImages(l,p,this.thumbImageCache)):p(l)}catch(A){this.handleError(A)}};EditorUi.prototype.addRadiobox=function(b,c,e,g,k,q,n){return this.addCheckbox(b,e,g,k,q,n,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,q,n,u){q=null!=q?q:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",n?"radio":"checkbox");n="geCheckbox-"+Editor.guid();d.id=n;null!=u&&d.setAttribute("name",u);e&&(d.setAttribute("checked",
-"checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");q&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",n),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),f="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");
+function(b,c,e,g,k,n,p){p=null!=p?p:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,d){if("_blank"==d||null!=b&&0<b.length){var f=e("_blank"==d?null:b,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(e){n=null!=n?n:"pdf"==c?"application/pdf":
+"image/"+c;if(null!=g)try{this.exportFile(g,b,n,!0,d,e)}catch(J){this.handleError(J)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),b,n,!0,d,e)}catch(J){this.handleError(J)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),
+mxResources.get("saveAs"),mxResources.get("download"),!1,!1,p,null,1<d,f,g,n,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(b.container,380,d,!0,!0);b.init()};EditorUi.prototype.isServices=function(b){return 1!=b};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(b,c,e,g,k,n){};EditorUi.prototype.pickFolder=function(b,c,e){c(null)};EditorUi.prototype.exportSvg=function(b,c,e,g,k,n,p,t,y,x,D,C){if(this.spinner.spin(document.body,
+mxResources.get("export")))try{var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;var f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f=D?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var l=this.editor.graph.getSvg(f,b,p,t,null,e,null,null,"blank"==x?"_blank":"self"==x?"_top":null,null,!0,D,C);g&&this.editor.graph.addSvgShadow(l);var m=this.getBaseFilename()+(k?".drawio":"")+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();k&&b.setAttribute("content",
+this.getFileData(!0,null,null,null,e,y,null,null,null,!1));var d=Graph.xmlDeclaration+"\n"+(k?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(b);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(l);this.editor.graph.mathEnabled&&this.editor.addMathCss(l);n?(null==this.thumbImageCache&&
+(this.thumbImageCache={}),this.editor.convertImages(l,q,this.thumbImageCache)):q(l)}catch(A){this.handleError(A)}};EditorUi.prototype.addRadiobox=function(b,c,e,g,k,n,p){return this.addCheckbox(b,e,g,k,n,p,!0,c)};EditorUi.prototype.addCheckbox=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",p?"radio":"checkbox");p="geCheckbox-"+Editor.guid();d.id=p;null!=t&&d.setAttribute("name",t);e&&(d.setAttribute("checked",
+"checked"),d.defaultChecked=!0);g&&d.setAttribute("disabled","disabled");n&&(b.appendChild(d),e=document.createElement("label"),mxUtils.write(e,c),e.setAttribute("for",p),b.appendChild(e),k||mxUtils.br(b));return d};EditorUi.prototype.addEditButton=function(b,c){var d=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var e=this.getCurrentFile(),f="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var g=document.createElement("select");
g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));g.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");g.appendChild(e);b.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var b=new FilenameDialog(this,f,mxResources.get("ok"),
function(b){null!=b?f=b:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==c||c.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return d.checked?"blank"===g.value?"_blank":f:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=
function(b,c){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var e=document.createElement("select");e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var f=document.createElement("option");
f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));e.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));e.appendChild(f);c&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+
")"),e.appendChild(f));b.appendChild(e);mxUtils.write(b,mxResources.get("borderColor")+":");var g="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(g||"none",function(b){g=b;d()});mxEvent.consume(b)}));d();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";b.appendChild(k);
-mxUtils.br(b);return{getColor:function(){return g},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,e,g,k,q,n){n=null!=n?n:[];g&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||n.push("lightbox=1"),"auto"!=b&&n.push("target="+b),null!=c&&c!=mxConstants.NONE&&n.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&n.push("edit="+encodeURIComponent(k)),q&&n.push("layers=1"),this.editor.graph.foldingEnabled&&
-n.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&n.push("page-id="+this.currentPage.getId());return n};EditorUi.prototype.createLink=function(b,c,e,g,k,q,n,u,t,x){t=this.createUrlParameters(b,c,e,g,k,q,t);b=this.getCurrentFile();c=!0;null!=n?e="#U"+encodeURIComponent(n):(b=this.getCurrentFile(),u||null==b||b.constructor!=window.DriveFile?e="#R"+encodeURIComponent(e?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
-(e="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&t.push("title="+encodeURIComponent(b.getTitle()));x&&1<e.length&&(t.push("open="+e.substring(1)),e="");return(g&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<t.length?"?"+t.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,q,n,t,y,x,D,C){this.getBasenames();
-var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];n&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),d.resize=!0);t&&e.push("layers");y&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=D&&0<D.length&&(d.edit=D);null!=b?d.url=b:d.xml=this.getFileData(!0,
-null,null,null,null,!n);c='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";C(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+
+mxUtils.br(b);return{getColor:function(){return g},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createUrlParameters=function(b,c,e,g,k,n,p){p=null!=p?p:[];g&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||p.push("lightbox=1"),"auto"!=b&&p.push("target="+b),null!=c&&c!=mxConstants.NONE&&p.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=k&&0<k.length&&p.push("edit="+encodeURIComponent(k)),n&&p.push("layers=1"),this.editor.graph.foldingEnabled&&
+p.push("nav=1"));e&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&p.push("page-id="+this.currentPage.getId());return p};EditorUi.prototype.createLink=function(b,c,e,g,k,n,p,t,y,x){y=this.createUrlParameters(b,c,e,g,k,n,y);b=this.getCurrentFile();c=!0;null!=p?e="#U"+encodeURIComponent(p):(b=this.getCurrentFile(),t||null==b||b.constructor!=window.DriveFile?e="#R"+encodeURIComponent(e?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(e="#"+b.getHash(),c=!1));c&&null!=b&&null!=b.getTitle()&&b.getTitle()!=this.defaultFilename&&y.push("title="+encodeURIComponent(b.getTitle()));x&&1<e.length&&(y.push("open="+e.substring(1)),e="");return(g&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<y.length?"?"+y.join("&"):"")+e};EditorUi.prototype.createHtml=function(b,c,e,g,k,n,p,t,y,x,D,C){this.getBasenames();
+var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==g&&(d.target=g);x||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;e=parseInt(e);isNaN(e)||100==e||(d.zoom=e/100);e=[];p&&(e.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(e.push("zoom"),d.resize=!0);t&&e.push("layers");y&&e.push("tags");0<e.length&&(x&&e.push("lightbox"),d.toolbar=e.join(" "));null!=D&&0<D.length&&(d.edit=D);null!=b?d.url=b:d.xml=this.getFileData(!0,
+null,null,null,null,!p);c='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=e?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";C(c,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.lightboxHost+
"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,c,e,g){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");
-k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");l.appendChild(f);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(m);mxUtils.br(l);l.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));l.appendChild(m);var n=this.getCurrentFile();
-null==e&&null!=n&&n.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.style.cursor="pointer",mxUtils.write(m,mxResources.get("share")),l.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(n.getId())})));f.setAttribute("checked","checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),C=this.addCheckbox(d,mxResources.get("zoom"),
+k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");l.appendChild(f);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));l.appendChild(q);mxUtils.br(l);l.appendChild(k);q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));l.appendChild(q);var p=this.getCurrentFile();
+null==e&&null!=p&&p.constructor==window.DriveFile&&(q=document.createElement("a"),q.style.paddingLeft="12px",q.style.color="gray",q.style.cursor="pointer",mxUtils.write(q,mxResources.get("share")),l.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(p.getId())})));f.setAttribute("checked","checked");null==e&&k.setAttribute("disabled","disabled");d.appendChild(l);var t=this.addLinkSection(d),C=this.addCheckbox(d,mxResources.get("zoom"),
!0,null,!0);mxUtils.write(d,":");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="100%";d.appendChild(G);var J=this.addCheckbox(d,mxResources.get("fit"),!0),l=null!=this.pages&&1<this.pages.length,L=L=this.addCheckbox(d,mxResources.get("allPages"),l,!l),H=this.addCheckbox(d,mxResources.get("layers"),!0),K=this.addCheckbox(d,mxResources.get("tags"),!0),A=this.addCheckbox(d,
mxResources.get("lightbox"),!0),M=this.addEditButton(d,A),Q=M.getEditInput();Q.style.marginBottom="16px";mxEvent.addListener(A,"change",function(){A.checked?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");Q.checked&&A.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){g(k.checked?e:null,C.checked,G.value,t.getTarget(),t.getColor(),J.checked,L.checked,H.checked,K.checked,
-A.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,q){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=this.getCurrentFile(),f="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==
-window.DriveFile&&!c){b=80;var f="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",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 p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));m.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));
-p.style.marginTop="12px";p.className="geBtn";m.appendChild(p);d.appendChild(m);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"));m.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(b){this.spinner.stop();b=new ErrorDialog(this,null,
-mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var n=null,t=null;if(null!=e||null!=g)b+=30,mxUtils.write(d,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%",d.appendChild(n),mxUtils.write(d,mxResources.get("height")+":"),
-t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var J=this.addLinkSection(d,q);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,mxResources.get("lightbox"),!0,null,null,!q),K=this.addEditButton(d,H),A=K.getEditInput();q&&(A.style.marginLeft=
+A.checked,M.getLink())}),null,b,c);this.showDialog(b.container,340,430,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,c,e,g,k,n){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,b||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var l=this.getCurrentFile(),f="https://www.diagrams.net/doc/faq/publish-diagram-as-link";b=0;if(null!=l&&l.constructor==
+window.DriveFile&&!c){b=80;var f="https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram",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 q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));m.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));
+q.style.marginTop="12px";q.className="geBtn";m.appendChild(q);d.appendChild(m);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.style.cursor="pointer";mxUtils.write(q,mxResources.get("check"));m.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,
+mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var p=null,t=null;if(null!=e||null!=g)b+=30,mxUtils.write(d,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%",d.appendChild(p),mxUtils.write(d,mxResources.get("height")+":"),
+t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=g+"px",d.appendChild(t),mxUtils.br(d);var J=this.addLinkSection(d,n);e=null!=this.pages&&1<this.pages.length;var L=null;if(null==l||l.constructor!=window.DriveFile||c)L=this.addCheckbox(d,mxResources.get("allPages"),e,!e);var H=this.addCheckbox(d,mxResources.get("lightbox"),!0,null,null,!n),K=this.addEditButton(d,H),A=K.getEditInput();n&&(A.style.marginLeft=
H.style.marginLeft,H.style.display="none",b-=20);var M=this.addCheckbox(d,mxResources.get("layers"),!0);M.style.marginLeft=A.style.marginLeft;M.style.marginTop="8px";var Q=this.addCheckbox(d,mxResources.get("tags"),!0);Q.style.marginLeft=A.style.marginLeft;Q.style.marginBottom="16px";Q.style.marginTop="16px";mxEvent.addListener(H,"change",function(){H.checked?(M.removeAttribute("disabled"),A.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));
-A.checked&&H.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(J.getTarget(),J.getColor(),null==L?!0:L.checked,H.checked,K.getLink(),M.checked,null!=n?n.value:null,null!=t?t.value:null,Q.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",
+A.checked&&H.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,function(){k(J.getTarget(),J.getColor(),null==L?!0:L.checked,H.checked,K.getLink(),M.checked,null!=p?p.value:null,null!=t?t.value:null,Q.checked)}),null,mxResources.get("create"),f);this.showDialog(c.container,340,300+b,!0,!0);null!=p?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",
!1,null)):J.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,c,e,g,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(k?"10":"4")+"px";d.appendChild(f);if(k){mxUtils.write(d,mxResources.get("zoom")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.marginRight="16px";l.style.width="60px";
-l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";d.appendChild(m);mxUtils.br(d)}var p=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=g?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram),f=this.editor.graph,t=g?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/100||1,d=parseInt(m.value)||0;e(!p.checked,null!=n?n.checked:!1,null!=t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(g?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,
-e,g,k,q,n,t,y){n=null!=n?n:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,l="jpeg"==t?220:300,m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(m);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 v=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),K=document.createElement("input");K.style.marginTop="16px";K.style.marginRight="8px";K.style.marginLeft=
+l.style.marginLeft="4px";l.style.marginRight="12px";l.value=this.lastExportZoom||"100%";d.appendChild(l);mxUtils.write(d,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";d.appendChild(m);mxUtils.br(d)}var q=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),p=g?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
+Editor.defaultIncludeDiagram),f=this.editor.graph,t=g?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=t&&(t.style.marginBottom="16px");b=new CustomDialog(this,d,mxUtils.bind(this,function(){var b=parseInt(l.value)/100||1,d=parseInt(m.value)||0;e(!q.checked,null!=p?p.checked:!1,null!=t?t.checked:!1,b,d)}),null,b,c);this.showDialog(b.container,300,(k?25:0)+(g?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(b,c,
+e,g,k,n,p,t,y){p=null!=p?p:Editor.defaultIncludeDiagram;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,l="jpeg"==t?220:300,m=document.createElement("h3");mxUtils.write(m,b);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(m);mxUtils.write(d,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight=
+"12px";q.value=this.lastExportZoom||"100%";d.appendChild(q);mxUtils.write(d,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||"0";d.appendChild(v);mxUtils.br(d);var u=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),K=document.createElement("input");K.style.marginTop="16px";K.style.marginRight="8px";K.style.marginLeft=
"24px";K.setAttribute("disabled","disabled");K.setAttribute("type","checkbox");var A=document.createElement("select");A.style.marginTop="16px";A.style.marginLeft="8px";b=["selectionOnly","diagram","page"];for(m=0;m<b.length;m++)if(!f.isSelectionEmpty()||"selectionOnly"!=b[m]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(b[m]));M.setAttribute("value",b[m]);A.appendChild(M)}y?(mxUtils.write(d,mxResources.get("size")+":"),d.appendChild(A),mxUtils.br(d),l+=26,mxEvent.addListener(A,
-"change",function(){"selectionOnly"==A.value&&(v.checked=!0)})):q&&(d.appendChild(K),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=30,mxEvent.addListener(v,"change",function(){v.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(v.style.display="none",v.nextSibling.style.display="none",v.nextSibling.nextSibling.style.display="none",l-=30):(A.value="diagram",K.setAttribute("checked","checked"),K.defaultChecked=!0,mxEvent.addListener(v,
-"change",function(){A.value=v.checked?"selectionOnly":"diagram"}));var Q=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),O=document.createElement("input");O.style.marginTop="16px";O.style.marginRight="8px";O.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||O.setAttribute("disabled","disabled");
-c&&(d.appendChild(O),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),l+=30);var ha=null;if("png"==t||"jpeg"==t)ha=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=30;var E=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=t);E.style.marginBottom="16px";var B=document.createElement("select");B.style.maxWidth="260px";B.style.marginLeft="8px";B.style.marginRight="10px";B.className="geBtn";c=document.createElement("option");
+"change",function(){"selectionOnly"==A.value&&(u.checked=!0)})):n&&(d.appendChild(K),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),l+=30,mxEvent.addListener(u,"change",function(){u.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}));f.isSelectionEmpty()?y&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",l-=30):(A.value="diagram",K.setAttribute("checked","checked"),K.defaultChecked=!0,mxEvent.addListener(u,
+"change",function(){A.value=u.checked?"selectionOnly":"diagram"}));var Q=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=t),T=null;Editor.isDarkMode()&&(T=this.addCheckbox(d,mxResources.get("dark"),!0),l+=26);var N=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),O=document.createElement("input");O.style.marginTop="16px";O.style.marginRight="8px";O.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||O.setAttribute("disabled","disabled");
+c&&(d.appendChild(O),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),l+=30);var ha=null;if("png"==t||"jpeg"==t)ha=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),l+=30;var E=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),p,null,null,"jpeg"!=t);E.style.marginBottom="16px";var B=document.createElement("select");B.style.maxWidth="260px";B.style.marginLeft="8px";B.style.marginRight="10px";B.className="geBtn";c=document.createElement("option");
c.setAttribute("value","auto");mxUtils.write(c,mxResources.get("automatic"));B.appendChild(c);c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("openInNewWindow"));B.appendChild(c);c=document.createElement("option");c.setAttribute("value","self");mxUtils.write(c,mxResources.get("openInThisWindow"));B.appendChild(c);"svg"==t&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(B),mxUtils.br(d),mxUtils.br(d),l+=50);e=new CustomDialog(this,d,
-mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=p.value;k(p.value,Q.checked,!v.checked,N.checked,E.checked,O.checked,u.value,K.checked,!1,B.value,null!=ha?ha.checked:null,null!=T?T.checked:null,A.value)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,g,k){var d=document.createElement("div");
-d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(l)}var m=this.addCheckbox(d,mxResources.get("fit"),!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&g,!g),n=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),G=this.addEditButton(d,t),J=G.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),
+mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=q.value;k(q.value,Q.checked,!u.checked,N.checked,E.checked,O.checked,v.value,K.checked,!1,B.value,null!=ha?ha.checked:null,null!=T?T.checked:null,A.value)}),null,e,g);this.showDialog(e.container,340,l,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,c,e,g,k){var d=document.createElement("div");
+d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=c){var l=document.createElement("h3");mxUtils.write(l,c);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(l)}var m=this.addCheckbox(d,mxResources.get("fit"),!0),q=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&g,!g),p=this.addCheckbox(d,e),t=this.addCheckbox(d,mxResources.get("lightbox"),!0),G=this.addEditButton(d,t),J=G.getEditInput(),L=1<f.model.getChildCount(f.model.getRoot()),
H=this.addCheckbox(d,mxResources.get("layers"),L,!L);H.style.marginLeft=J.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(L&&H.removeAttribute("disabled"),J.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&t.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,d,mxUtils.bind(this,
-function(){b(m.checked,p.checked,n.checked,t.checked,G.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,e,g,k,q,n,t){function d(d){var c=" ",m="";g&&(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"+(null!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");b&&(m+="max-width:100%;");var p="";e&&(p=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');n('<img src="'+d+'"'+p+(""!=m?' style="'+m+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=g?this.getFileData(!0):null;b=
-this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),f.width*f.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var m="";e&&(m="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(g?"1":"0")+m+"&xml="+encodeURIComponent(c));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&
-299>=p.getStatus()?d("data:image/png;base64,"+p.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(b,c,e,g,k,q,n){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),f=d.getElementsByTagName("a");if(null!=f)for(var l=0;l<f.length;l++){var m=f[l].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[l].getAttribute("target")&&f[l].removeAttribute("target")}g&&
-d.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(d);if(e){var p=" ",t="";g&&(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"+(k?"&edit=_blank":"")+(q?"&layers=1":
-"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(b){n('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+p+"/>")}))}else t="",g&&(c=this.getSelectedPageIndex(),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"+(null!=c?"&page="+c:"")+(k?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+b+" "+k),t+="max-width:100%;max-height:"+k+"px;",d.removeAttribute("height")),""!=t&&d.setAttribute("style",t),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),n(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(b){b=
+function(){b(m.checked,q.checked,p.checked,t.checked,G.getLink(),H.checked)}),null,mxResources.get("embed"),k);this.showDialog(c.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,c,e,g,k,n,p,t){function d(d){var c=" ",m="";g&&(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"+(null!=l?"&page="+l:"")+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",m+="cursor:pointer;");b&&(m+="max-width:100%;");var q="";e&&(q=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');p('<img src="'+d+'"'+q+(""!=m?' style="'+m+'"':"")+c+"/>")}var f=this.editor.graph.getGraphBounds(),l=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(b){var c=g?this.getFileData(!0):null;b=
+this.createImageDataUri(b,c,"png");d(b)}),null,null,null,mxUtils.bind(this,function(b){t({message:mxResources.get("unknownError")})}),null,!0,e?2:1,null,c,null,null,Editor.defaultBorder);else if(c=this.getFileData(!0),f.width*f.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var m="";e&&(m="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(g?"1":"0")+m+"&xml="+encodeURIComponent(c));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&
+299>=q.getStatus()?d("data:image/png;base64,"+q.getText()):t({message:mxResources.get("unknownError")})}))}else t({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(b,c,e,g,k,n,p){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!e),f=d.getElementsByTagName("a");if(null!=f)for(var l=0;l<f.length;l++){var m=f[l].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[l].getAttribute("target")&&f[l].removeAttribute("target")}g&&
+d.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(d);if(e){var q=" ",t="";g&&(q="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(k?"&edit=_blank":"")+(n?"&layers=1":
+"")+"');}})(this);\"",t+="cursor:pointer;");b&&(t+="max-width:100%;");this.editor.convertImages(d,mxUtils.bind(this,function(b){p('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=t?' style="'+t+'"':"")+q+"/>")}))}else t="",g&&(c=this.getSelectedPageIndex(),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"+(null!=c?"&page="+c:"")+(k?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),b&&(b=parseInt(d.getAttribute("width")),k=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+b+" "+k),t+="max-width:100%;max-height:"+k+"px;",d.removeAttribute("height")),""!=t&&d.setAttribute("style",t),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),p(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(b){b=
Math.floor((new Date-b)/1E3);var d=Math.floor(b/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(b/2592E3);if(1<d)return d+" "+mxResources.get("months");d=Math.floor(b/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(b/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(b/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(b,c){if(null!=b){var d=null;if("diagram"==b.nodeName)d=
-b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],f=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:f.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(q){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
+b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var d=e[0],f=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==b?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:f.apply(this,arguments)}}}null!=d&&(b=Editor.parseDiagramNode(d))}e=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(b)}catch(n){}finally{this.editor.graph=e}return b};EditorUi.prototype.getPngFileProperties=function(b){var d=1,c=0;if(null!=
b){if(b.hasAttribute("scale")){var e=parseFloat(b.getAttribute("scale"));!isNaN(e)&&0<e&&(d=e)}b.hasAttribute("border")&&(e=parseInt(b.getAttribute("border")),!isNaN(e)&&0<e&&(c=e))}return{scale:d,border:c}};EditorUi.prototype.getEmbeddedPng=function(b,c,e,g,k){try{var d=this.editor.graph,f=null!=d.themes&&"darkTheme"==d.defaultThemeName,l=null;if(null!=e&&0<e.length)d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(e).documentElement,
-!0),d),l=e;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet()),m=d.getGlobalVariable;d.setBackgroundImage=this.editor.graph.setBackgroundImage;var p=this.pages[0];this.currentPage==p?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=p.viewState&&null!=p.viewState&&d.setBackgroundImage(p.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?p.getName():"pagenumber"==b?1:m.apply(this,
-arguments)};document.body.appendChild(d.container);d.model.setRoot(p.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=e.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(G){null!=c&&c(G)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&
-c(b)}),null,null,g,null,d.shadowVisible,null,d,k,null,null,null,"diagram",null)}catch(D){null!=c&&c(D)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,q,n,t,y,x,D,C,G){t=null!=t?t:!0;n=null!=y?y:c.background;n==mxConstants.NONE&&(n=null);q=c.getSvg(n,x,D,null,null,q,null,null,null,c.shadowVisible||C,null,G,"diagram");(c.shadowVisible||C)&&c.addSvgShadow(q);null!=b&&q.setAttribute("content",b);null!=e&&q.setAttribute("resource",e);var d=(g?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+
-Graph.svgDoctype+"\n")+mxUtils.getXml(q);if(null!=k)this.embedFonts(q,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){k(d)})):k(d)}));else return d};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(m){c(b)}}))}catch(l){c(b)}}))};
-EditorUi.prototype.exportImage=function(b,c,e,g,k,n,t,u,y,x,D,C,G){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,u):null,y,null==this.pages||0==this.pages.length,D)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,n,t,x,C,G)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,n,t){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,
-null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var p=m.getElementsByTagName("diagram");if(1==p.length&&!n){if(m=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(b[p[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var q=p[0].getAttribute("name");null!=q&&""!=q&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,q))}}else if(0<
-p.length){n=[];var v=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[p[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(p[0]),g=!1,v=1);for(;v<p.length;v++){var L=p[v].getAttribute("id");p[v].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(p[v]));b[L]=p[v].getAttribute("id");var K=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[K+1]));f.model.execute(new ChangePage(this,H,H,K,!0));n.push(H)}this.updatePageLinks(b,
-n)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(v=0;v<d.length;v++)this.updatePageLinksForCell(b,d[v]);t&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(A){if(k)throw A;this.handleError(A)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
-c){var d=document.createElement("div"),e=this.editor.graph,f=e.getLinkForCell(c);null!=f&&e.setLinkForCell(c,this.updatePageLink(b,f));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var g=d.getElementsByTagName("a"),k=!1,n=0;n<g.length;n++)f=g[n].getAttribute("href"),null!=f&&(g[n].setAttribute("href",this.updatePageLink(b,f)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(n=0;n<e.model.getChildCount(c);n++)this.updatePageLinksForCell(b,e.model.getChildAt(c,n))};EditorUi.prototype.updatePageLink=
-function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var f=0;f<e.actions.length;f++){var g=e.actions[f];if(null!=g.open&&Graph.isPageLink(g.open)){var k=g.open.substring(g.open.indexOf(",")+1),d=b[k];null!=d?g.open="data:page/id,"+d:null==this.getPageById(k)&&delete g.open}}c="data:action/json,"+JSON.stringify(e)}}catch(u){}return c};
+!0),d),l=e;else if(f||null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(f?d.getDefaultStylesheet():d.getStylesheet()),m=d.getGlobalVariable;d.setBackgroundImage=this.editor.graph.setBackgroundImage;var q=this.pages[0];this.currentPage==q?d.setBackgroundImage(this.editor.graph.backgroundImage):null!=q.viewState&&null!=q.viewState&&d.setBackgroundImage(q.viewState.backgroundImage);d.getGlobalVariable=function(b){return"page"==b?q.getName():"pagenumber"==b?1:m.apply(this,
+arguments)};document.body.appendChild(d.container);d.model.setRoot(q.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(e){try{null==l&&(l=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=e.toDataURL("image/png"),f=Editor.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(l));b(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(G){null!=c&&c(G)}}),null,null,null,mxUtils.bind(this,function(b){null!=c&&
+c(b)}),null,null,g,null,d.shadowVisible,null,d,k,null,null,null,"diagram",null)}catch(D){null!=c&&c(D)}};EditorUi.prototype.getEmbeddedSvg=function(b,c,e,g,k,n,p,t,y,x,D,C,G){t=null!=t?t:!0;p=null!=y?y:c.background;p==mxConstants.NONE&&(p=null);n=c.getSvg(p,x,D,null,null,n,null,null,null,c.shadowVisible||C,null,G,"diagram");(c.shadowVisible||C)&&c.addSvgShadow(n);null!=b&&n.setAttribute("content",b);null!=e&&n.setAttribute("resource",e);var d=(g?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+
+Graph.svgDoctype+"\n")+mxUtils.getXml(n);if(null!=k)this.embedFonts(n,mxUtils.bind(this,function(b){t?this.editor.convertImages(b,mxUtils.bind(this,function(b){k(d)})):k(d)}));else return d};EditorUi.prototype.embedFonts=function(b,c){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(b,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(b,d),c(b)}catch(q){c(b)}}))}catch(l){c(b)}}))};
+EditorUi.prototype.exportImage=function(b,c,e,g,k,n,p,t,y,x,D,C,G){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();e=null!=e?e:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,k?this.getFileData(!0,null,null,null,e,t):null,y,null==this.pages||0==this.pages.length,D)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,
+null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,e,b||1,c,g,null,null,n,p,x,C,G)}catch(L){this.spinner.stop(),this.handleError(L)}}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return this.editor.isCorsEnabledForUrl(b)};EditorUi.prototype.importXml=function(b,c,e,g,k,n,p){c=null!=c?c:0;e=null!=e?e:0;var d=[];try{var f=this.editor.graph;if(null!=b&&0<b.length){f.model.beginUpdate();try{var l=mxUtils.parseXml(b);b={};var m=this.editor.extractGraphModel(l.documentElement,
+null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var q=m.getElementsByTagName("diagram");if(1==q.length&&!n){if(m=Editor.parseDiagramNode(q[0]),null!=this.currentPage&&(b[q[0].getAttribute("id")]=this.currentPage.getId(),null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1]))){var t=q[0].getAttribute("name");null!=t&&""!=t&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,t))}}else if(0<
+q.length){n=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(b[q[0].getAttribute("id")]=this.pages[0].getId(),m=Editor.parseDiagramNode(q[0]),g=!1,u=1);for(;u<q.length;u++){var L=q[u].getAttribute("id");q[u].removeAttribute("id");var H=this.updatePageRoot(new DiagramPage(q[u]));b[L]=q[u].getAttribute("id");var K=this.pages.length;null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[K+1]));f.model.execute(new ChangePage(this,H,H,K,!0));n.push(H)}this.updatePageLinks(b,
+n)}}if(null!=m&&"mxGraphModel"===m.nodeName&&(d=f.importGraphModel(m,c,e,g),null!=d))for(u=0;u<d.length;u++)this.updatePageLinksForCell(b,d[u]);p&&this.insertHandler(d,null,null,Graph.prototype.defaultVertexStyle,Graph.prototype.defaultEdgeStyle,!0,!0)}finally{f.model.endUpdate()}}}catch(A){if(k)throw A;this.handleError(A)}return d};EditorUi.prototype.updatePageLinks=function(b,c){for(var d=0;d<c.length;d++)this.updatePageLinksForCell(b,c[d].root)};EditorUi.prototype.updatePageLinksForCell=function(b,
+c){var d=document.createElement("div"),e=this.editor.graph,f=e.getLinkForCell(c);null!=f&&e.setLinkForCell(c,this.updatePageLink(b,f));if(e.isHtmlLabel(c)){d.innerHTML=e.sanitizeHtml(e.getLabel(c));for(var g=d.getElementsByTagName("a"),k=!1,p=0;p<g.length;p++)f=g[p].getAttribute("href"),null!=f&&(g[p].setAttribute("href",this.updatePageLink(b,f)),k=!0);k&&e.labelChanged(c,d.innerHTML)}for(p=0;p<e.model.getChildCount(c);p++)this.updatePageLinksForCell(b,e.model.getChildAt(c,p))};EditorUi.prototype.updatePageLink=
+function(b,c){if(Graph.isPageLink(c)){var d=b[c.substring(c.indexOf(",")+1)];c=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==c.substring(0,17))try{var e=JSON.parse(c.substring(17));if(null!=e.actions){for(var f=0;f<e.actions.length;f++){var g=e.actions[f];if(null!=g.open&&Graph.isPageLink(g.open)){var k=g.open.substring(g.open.indexOf(",")+1),d=b[k];null!=d?g.open="data:page/id,"+d:null==this.getPageById(k)&&delete g.open}}c="data:action/json,"+JSON.stringify(e)}}catch(v){}return c};
EditorUi.prototype.isRemoteVisioFormat=function(b){return/(\.v(sd|dx))($|\?)/i.test(b)||/(\.vs(s|x))($|\?)/i.test(b)};EditorUi.prototype.importVisio=function(b,c,e,g,k){g=null!=g?g:b.name;e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(g);try{var f="UNKNOWN-VISIO",l=g.lastIndexOf(".");if(0<=l&&l<g.length)f=g.substring(l+1).toUpperCase();else{var m=g.lastIndexOf("/");0<=
-m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(C){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,g);var p=new XMLHttpRequest;p.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));p.responseType="blob";this.addRemoteServiceSecurityCheck(p);
-null!=k&&p.setRequestHeader("x-convert-custom",k);p.onreadystatechange=mxUtils.bind(this,function(){if(4==p.readyState)if(200<=p.status&&299>=p.status)try{var b=p.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(J){e(J)}else try{""==p.responseType||"text"==p.responseType?e({message:p.responseText}):(d=new FileReader,d.onload=
-function(){e({message:JSON.parse(d.result).Message})},d.readAsText(p.response))}catch(J){e({})}});p.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(C){e(C)}}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(b,c,e){e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});
-var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(p){e(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||
+m&&m<g.length&&(g=g.substring(m+1))}EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+g,label:d?"remote":"local"})}catch(C){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())e({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{d=new FormData;d.append("file1",b,g);var n=new XMLHttpRequest;n.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(g)?"?stencil=1":""));n.responseType="blob";this.addRemoteServiceSecurityCheck(n);
+null!=k&&n.setRequestHeader("x-convert-custom",k);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var b=n.response;if("text/xml"==b.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(b){try{c(b.target.result)}catch(L){e({message:mxResources.get("errorLoadingFile")})}});d.readAsText(b)}else this.doImportVisio(b,c,e,g)}catch(J){e(J)}else try{""==n.responseType||"text"==n.responseType?e({message:n.responseText}):(d=new FileReader,d.onload=
+function(){e({message:JSON.parse(d.result).Message})},d.readAsText(n.response))}catch(J){e({})}});n.send(d)}else try{this.doImportVisio(b,c,e,g)}catch(C){e(C)}}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(b,c,e){e=null!=e?e:mxUtils.bind(this,function(b){this.handleError(b)});
+var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(b,c,e)}catch(m){e(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(b){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(b)||
this.handleError({message:mxResources.get("unknownError")})}catch(l){this.handleError(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.convertLucidChart=function(b,c,e){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",
-action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(p){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(p){null!=window.console&&console.error(p),e(p)}}else e({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",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
+action:"size_"+b.length}),EditorUi.debug("convertLucidChart",b)}catch(m){}try{c(LucidImporter.importState(JSON.parse(b)))}catch(m){null!=window.console&&console.error(m),e(m)}}else e({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",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",d)})})})}):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(b,c,e,g){var d=this,f=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(),b,function(b){try{if(mxClient.IS_IE||mxClient.IS_IE11)b=
-b.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(b).getElementsByTagName("svg");if(0<c.length){var f=parseFloat(c[0].getAttribute("width")),l=parseFloat(c[0].getAttribute("height"));if(isNaN(f)||isNaN(l))try{var k=c[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(k[2]),l=parseFloat(k[3])}catch(C){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(C){g(C)}})}catch(v){g(v)}};
+b.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(b).getElementsByTagName("svg");if(0<c.length){var f=parseFloat(c[0].getAttribute("width")),l=parseFloat(c[0].getAttribute("height"));if(isNaN(f)||isNaN(l))try{var k=c[0].getAttribute("viewBox").split(/\s+/),f=parseFloat(k[2]),l=parseFloat(k[3])}catch(C){f=f||100,l=l||100}e(d.convertDataUri(Editor.createSvgDataUri(b)),f,l)}else g({message:mxResources.get("invalidInput")})}catch(C){g(C)}})}catch(u){g(u)}};
"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(b,c,e,g){function d(b,d,c){c1=b>>2;c2=(b&3)<<4|d>>4;c3=(d&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+
b);b-=26;return 0==b?"-":1==b?"_":"?"}var l=new XMLHttpRequest;l.open("GET",("txt"==c?PLANT_URL+"/txt/":"png"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(b){r="";for(i=0;i<b.length;i+=3)r=i+2==b.length?r+d(b.charCodeAt(i),b.charCodeAt(i+1),0):i+1==b.length?r+d(b.charCodeAt(i),0,0):r+d(b.charCodeAt(i),b.charCodeAt(i+1),b.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(b))),!0);"txt"!=c&&(l.responseType="blob");l.onload=function(b){if(200<=this.status&&300>this.status)if("txt"==
-c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,f=c.height;if(0==b&&0==f){var l=d.result,k=l.indexOf(","),m=decodeURIComponent(escape(atob(l.substring(k+1)))),p=mxUtils.parseXml(m).getElementsByTagName("svg");0<p.length&&(b=parseFloat(p[0].getAttribute("width")),f=parseFloat(p[0].getAttribute("height")))}e(d.result,b,f)}catch(A){g(A)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};l.onerror=
-function(b){g(b)};l.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(b,c,e,g,k,n,t,u){n=null!=n?n:!0;t=null!=t?t:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,n,!0,u)}if("data:image/png;base64,"==
-b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,n,!0,u);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,n,!0,u);if(0<l.length)return l}catch(G){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,
-5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),t,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),l=Math.round(f.width*g);f=Math.round(f.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),
+c)e(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(b){var c=new Image;c.onload=function(){try{var b=c.width,f=c.height;if(0==b&&0==f){var l=d.result,k=l.indexOf(","),m=decodeURIComponent(escape(atob(l.substring(k+1)))),n=mxUtils.parseXml(m).getElementsByTagName("svg");0<n.length&&(b=parseFloat(n[0].getAttribute("width")),f=parseFloat(n[0].getAttribute("height")))}e(d.result,b,f)}catch(A){g(A)}};c.src=d.result};d.onerror=function(b){g(b)}}else g(b)};l.onerror=
+function(b){g(b)};l.send()};EditorUi.prototype.insertAsPreText=function(b,c,e){var d=this.editor.graph,f=null;d.getModel().beginUpdate();try{f=d.insertVertex(null,null,"<pre>"+b+"</pre>",c,e,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(f,!0)}finally{d.getModel().endUpdate()}return f};EditorUi.prototype.insertTextAt=function(b,c,e,g,k,n,p,t){n=null!=n?n:!0;p=null!=p?p:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g,
+" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,c,e,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var d=this.editor.graph;if("data:application/pdf;base64,"==b.substring(0,28)){var f=Editor.extractGraphModelFromPdf(b);if(null!=f&&0<f.length)return this.importXml(f,c,e,n,!0,t)}if("data:image/png;base64,"==
+b.substring(0,22)&&(f=this.extractGraphModelFromPng(b),null!=f&&0<f.length))return this.importXml(f,c,e,n,!0,t);if("data:image/svg+xml;"==b.substring(0,19))try{f=null;"data:image/svg+xml;base64,"==b.substring(0,26)?(f=b.substring(b.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(b.substring(b.indexOf(",")+1));var l=this.importXml(f,c,e,n,!0,t);if(0<l.length)return l}catch(G){}this.loadImage(b,mxUtils.bind(this,function(f){if("data:"==b.substring(0,
+5))this.resizeImage(f,b,mxUtils.bind(this,function(b,f,g){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),p,this.maxImageSize);else{var g=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/f.height)),l=Math.round(f.width*g);f=Math.round(f.height*g);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(c),d.snap(e),
l,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,b,d.snap(c),d.snap(e),1,1,"text;"+(g?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{b=Graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,
-c,e,n,null,u);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,n,null,u))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(g?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==
+c,e,n,null,t);if(0<b.length)if(this.isLucidChartData(b))this.convertLucidChart(b,mxUtils.bind(this,function(b){this.editor.graph.setSelectionCells(this.importXml(b,c,e,n,null,t))}),mxUtils.bind(this,function(b){this.handleError(b)}));else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(c),d.snap(e),1,1,"text;whiteSpace=wrap;"+(g?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[k]));"<"==b.charAt(0)&&b.indexOf(">")==
b.length-1&&(b=mxUtils.htmlEntities(b));b.length>this.maxTextBytes&&(b=b.substring(0,this.maxTextBytes)+"...");k.value=b;d.updateCellSize(k);if(0<this.maxTextWidth&&k.geometry.width>this.maxTextWidth){var m=d.getPreferredSizeForCell(k,this.maxTextWidth);k.geometry.width=m.width;k.geometry.height=m.height}Graph.isLink(k.value)&&d.setLinkForCell(k,k.value);k.geometry.width+=d.gridSize;k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}return[]};EditorUi.prototype.formatFileSize=
function(b){var d=-1;do b/=1024,d++;while(1024<b);return Math.max(b,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var d=b.indexOf(";");0<d&&(b=b.substring(0,d)+b.substring(b.indexOf(",",d+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)};EditorUi.prototype.isLucidChartData=function(b){return null!=b&&('{"state":"{\\"Properties\\":'==
b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.importLocalFile=function(b,c){if(b&&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=
@@ -3559,53 +3560,53 @@ b.substring(0,26)||'{"Properties":'==b.substring(0,14))};EditorUi.prototype.impo
function(b,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var c=new Blob([b],{type:"application/octet-stream"});this.importVisio(c,mxUtils.bind(this,function(b){this.importXml(b,0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(b,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!c){var f=this.dialog,g=f.close;this.dialog.close=mxUtils.bind(this,
function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(b,c,e){var d=this,f=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(b).then(function(f){if(0==Object.keys(f.files).length)e();else{var g=0,l,k=!1;f.forEach(function(b,d){var f=d.name.toLowerCase();"diagram/diagram.xml"==f?(k=!0,d.async("string").then(function(b){0==b.indexOf("<mxfile ")?
c(b):e()})):0==f.indexOf("versions/")&&(f=parseInt(f.substr(9)),f>g&&(g=f,l=d))});0<g?l.async("string").then(function(f){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(f,b.name)?d.parseFile(new Blob([f],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?c(b.responseText):e())}),b.name):e()}):k||e()}},function(b){e(b)}):e()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=
-!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,n,t,u,y,x,D,C){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,t)):d=this.importXml(b,e,g,x,null,null!=C?mxEvent.isControlDown(C):null);null!=u&&u(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=D?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,
-null,null!=C?mxEvent.isControlDown(C):null),y=!0)),y||(c=this.editor.graph,D=b.indexOf(";"),0<D&&(b=b.substring(0,D)+b.substring(b.indexOf(",",D+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,null,"",e,g,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?
-(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,t)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=u&&u(null))}),t)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);u(f)}))):/(\.v(sd|dx))($|\?)/i.test(t)||/(\.vs(s|x))($|\?)/i.test(t)||
-(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=C?mxEvent.isControlDown(C):null));d||null==u||u(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,t,u,y,x,D,C,G){g=null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var m=D||this.resampleThreshold,p=0;p<b.length;p++)if("image/"==b[p].type.substring(0,6)&&b[p].size>m){l=!0;break}var q=mxUtils.bind(this,
-function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,l,k,m,p){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,e,f,g,l,k,m,p,d,C,G)}catch(W){return this.handleError(W),null}});n=null!=n?n:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=b.length,q=p,v=[],A=mxUtils.bind(this,function(b,
-d){v[b]=d;if(0==--q){this.spinner.stop();if(null!=u)u(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var f=v[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}n(c)}}),y=0;y<p;y++)mxUtils.bind(this,function(d){var p=b[d];if(null!=p){var n=new FileReader;n.onload=mxUtils.bind(this,function(b){if(null==t||t(p))if("image/"==p.type.substring(0,6))if("image/svg"==p.type.substring(0,9)){var n=Graph.clipSvgDataUri(b.target.result),q=n.indexOf(","),u=decodeURIComponent(escape(atob(n.substring(q+
-1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=C?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?A(d,mxUtils.bind(this,function(){try{if(n.substring(0,q+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],t=f.getAttribute("width"),
-u=f.getAttribute("height"),t=null!=t&&"%"!=t.charAt(t.length-1)?parseFloat(t):NaN,u=null!=u&&"%"!=u.charAt(u.length-1)?parseFloat(u):NaN,x=f.getAttribute("viewBox");if(null==x||0==x.length)f.setAttribute("viewBox","0 0 "+t+" "+u);else if(isNaN(t)||isNaN(u)){var A=x.split(" ");3<A.length&&(t=parseFloat(A[2]),u=parseFloat(A[3]))}n=Editor.createSvgDataUri(mxUtils.getXml(f));var N=Math.min(1,Math.min(g/Math.max(1,t)),g/Math.max(1,u)),C=k(n,p.type,c+d*m,e+d*m,Math.max(1,Math.round(t*N)),Math.max(1,Math.round(u*
-N)),p.name);if(isNaN(t)||isNaN(u)){var y=new Image;y.onload=mxUtils.bind(this,function(){t=Math.max(1,y.width);u=Math.max(1,y.height);C[0].geometry.width=t;C[0].geometry.height=u;f.setAttribute("viewBox","0 0 "+t+" "+u);n=Editor.createSvgDataUri(mxUtils.getXml(f));var b=n.indexOf(";");0<b&&(n=n.substring(0,b)+n.substring(n.indexOf(",",b+1)));l.setCellStyles("image",n,[C[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return C}}}catch(aa){}return null})):A(d,mxUtils.bind(this,function(){return k(N,
-"text/xml",c+d*m,e+d*m,0,0,p.name)}))}else A(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==p.type){var y=C?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var E=new Image;E.src=b.target.result;A(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,E.width,E.height,p.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,n){A(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(p.size,D)?Math.min(1,Math.min(g/l,g/n)):1;return k(b,p.type,c+d*m,e+d*m,Math.round(l*q),Math.round(n*q),p.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),f,g,D,p.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else n=b.target.result,k(n,p.type,c+d*m,e+d*m,240,160,p.name,function(b){A(d,function(){return b})},p)});/(\.v(dx|sdx?))($|\?)/i.test(p.name)||/(\.vs(x|sx?))($|\?)/i.test(p.name)?k(null,p.type,c+d*m,e+d*m,240,160,p.name,function(b){A(d,function(){return b})},p):"image"==p.type.substring(0,5)||"application/pdf"==p.type?n.readAsDataURL(p):n.readAsText(p)}})(y)});if(l){l=
-[];for(p=0;p<b.length;p++)l.push(b[p]);b=l;this.confirmImageResize(function(b){f=b;q()},y)}else q()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?f:null),mxSettings.save();d();b(f)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.importFile=function(b,c,e,g,k,n,p,t,y,x,D,C){x=null!=x?x:!0;var d=!1,f=null,l=mxUtils.bind(this,function(b){var d=null;null!=b&&"<mxlibrary"==b.substring(0,10)?this.loadLibrary(new LocalLibrary(this,b,p)):d=this.importXml(b,e,g,x,null,null!=C?mxEvent.isControlDown(C):null);null!=t&&t(d)});"image"==c.substring(0,5)?(y=!1,"image/png"==c.substring(0,9)&&(c=D?null:this.extractGraphModelFromPng(b),null!=c&&0<c.length&&(f=this.importXml(c,e,g,x,
+null,null!=C?mxEvent.isControlDown(C):null),y=!0)),y||(c=this.editor.graph,D=b.indexOf(";"),0<D&&(b=b.substring(0,D)+b.substring(b.indexOf(",",D+1))),x&&c.isGridEnabled()&&(e=c.snap(e),g=c.snap(g)),f=[c.insertVertex(null,null,"",e,g,k,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";")])):/(\.*<graphml )/.test(b)?(d=!0,this.importGraphML(b,l)):null!=y&&null!=p&&(/(\.v(dx|sdx?))($|\?)/i.test(p)||/(\.vs(x|sx?))($|\?)/i.test(p))?
+(d=!0,this.importVisio(y,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,p)?(d=!0,this.parseFile(null!=y?y:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&(200<=b.status&&299>=b.status?l(b.responseText):null!=t&&t(null))}),p)):0==b.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,l,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x);t(f)}))):/(\.v(sd|dx))($|\?)/i.test(p)||/(\.vs(s|x))($|\?)/i.test(p)||
+(f=this.insertTextAt(this.validateFileData(b),e,g,!0,null,x,null,null!=C?mxEvent.isControlDown(C):null));d||null==t||t(f);return f};EditorUi.prototype.importFiles=function(b,c,e,g,k,n,p,t,y,x,D,C,G){g=null!=g?g:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var d=null!=c&&null!=e,f=!0;c=null!=c?c:0;e=null!=e?e:0;var l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var m=D||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>m){l=!0;break}var u=mxUtils.bind(this,
+function(){var l=this.editor.graph,m=l.gridSize;k=null!=k?k:mxUtils.bind(this,function(b,c,e,f,g,l,k,m,n){try{return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,k)),null):this.importFile(b,c,e,f,g,l,k,m,n,d,C,G)}catch(W){return this.handleError(W),null}});n=null!=n?n:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,u=q,v=[],A=mxUtils.bind(this,function(b,
+d){v[b]=d;if(0==--u){this.spinner.stop();if(null!=t)t(v);else{var c=[];l.getModel().beginUpdate();try{for(var e=0;e<v.length;e++){var f=v[e]();null!=f&&(c=c.concat(f))}}finally{l.getModel().endUpdate()}}n(c)}}),y=0;y<q;y++)mxUtils.bind(this,function(d){var n=b[d];if(null!=n){var q=new FileReader;q.onload=mxUtils.bind(this,function(b){if(null==p||p(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var q=Graph.clipSvgDataUri(b.target.result),t=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(t+
+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],N=C?null:u.getAttribute("content");null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(N,!0)));null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N));null==N||"<mxfile "!==N.substring(0,8)&&"<mxGraphModel "!==N.substring(0,14)?A(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=v){var b=v.getElementsByTagName("svg");if(0<b.length){var f=b[0],p=f.getAttribute("width"),
+u=f.getAttribute("height"),p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,u=null!=u&&"%"!=u.charAt(u.length-1)?parseFloat(u):NaN,x=f.getAttribute("viewBox");if(null==x||0==x.length)f.setAttribute("viewBox","0 0 "+p+" "+u);else if(isNaN(p)||isNaN(u)){var A=x.split(" ");3<A.length&&(p=parseFloat(A[2]),u=parseFloat(A[3]))}q=Editor.createSvgDataUri(mxUtils.getXml(f));var N=Math.min(1,Math.min(g/Math.max(1,p)),g/Math.max(1,u)),C=k(q,n.type,c+d*m,e+d*m,Math.max(1,Math.round(p*N)),Math.max(1,Math.round(u*
+N)),n.name);if(isNaN(p)||isNaN(u)){var y=new Image;y.onload=mxUtils.bind(this,function(){p=Math.max(1,y.width);u=Math.max(1,y.height);C[0].geometry.width=p;C[0].geometry.height=u;f.setAttribute("viewBox","0 0 "+p+" "+u);q=Editor.createSvgDataUri(mxUtils.getXml(f));var b=q.indexOf(";");0<b&&(q=q.substring(0,b)+q.substring(q.indexOf(",",b+1)));l.setCellStyles("image",q,[C[0]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(f))}return C}}}catch(aa){}return null})):A(d,mxUtils.bind(this,function(){return k(N,
+"text/xml",c+d*m,e+d*m,0,0,n.name)}))}else A(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==n.type){var y=C?null:this.extractGraphModelFromPng(b.target.result);if(null!=y&&0<y.length){var E=new Image;E.src=b.target.result;A(d,mxUtils.bind(this,function(){return k(y,"text/xml",c+d*m,e+d*m,E.width,E.height,n.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,b.target.result,mxUtils.bind(this,function(b,l,p){A(d,mxUtils.bind(this,function(){if(null!=b&&b.length<x){var q=f&&this.isResampleImageSize(n.size,D)?Math.min(1,Math.min(g/l,g/p)):1;return k(b,n.type,c+d*m,e+d*m,Math.round(l*q),Math.round(p*q),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),f,g,D,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=b.target.result,k(q,n.type,c+d*m,e+d*m,240,160,n.name,function(b){A(d,function(){return b})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?k(null,n.type,c+d*m,e+d*m,240,160,n.name,function(b){A(d,function(){return b})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?q.readAsDataURL(n):q.readAsText(n)}})(y)});if(l){l=
+[];for(q=0;q<b.length;q++)l.push(b[q]);b=l;this.confirmImageResize(function(b){f=b;u()},y)}else u()};EditorUi.prototype.confirmImageResize=function(b,c){c=null!=c?c:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(e,f){if(e||c)mxSettings.setResizeImages(e?f:null),mxSettings.save();d();b(f)};null==e||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
function(b){f(b,!0)},function(b){f(b,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,e)};EditorUi.prototype.parseFile=function(b,c,e){e=null!=e?e:b.name;var d=new FormData;d.append("format","xml");d.append("upfile",b,e);var f=new XMLHttpRequest;f.open("POST",
-OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,n,t){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);if(g&&this.isResampleImageSize(null!=t?t:c.length,n))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),p=Math.round(f/
-l),q=document.createElement("canvas");q.width=m;q.height=p;q.getContext("2d").drawImage(b,0,0,m,p);var v=q.toDataURL();if(v.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=p;var H=L.toDataURL();v!==H&&(c=v,d=m,f=p)}}}catch(K){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:
-120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(p){if(null!=e)e(p);else throw p;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:"0"!=urlParams.rough),this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&
-(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,k,l){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),
-[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=k,m.height=l,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&
-b.generateMermaidImage(e,g.config,function(f,k,l){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,k),m.height=Math.max(m.height,l),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;
-c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var k=c.getCellStyle(d);"1"==mxUtils.getValue(k,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(T){b.handleError(T)}};c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};
-var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var p=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,b.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,
+OPEN_URL);f.onreadystatechange=function(){c(f)};f.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+b.size})}catch(n){}};EditorUi.prototype.isResampleImageSize=function(b,c){c=null!=c?c:this.resampleThreshold;return b>c};EditorUi.prototype.resizeImage=function(b,c,e,g,k,n,p){k=null!=k?k:this.maxImageSize;var d=Math.max(1,b.width),f=Math.max(1,b.height);if(g&&this.isResampleImageSize(null!=p?p:c.length,n))try{var l=Math.max(d/k,f/k);if(1<l){var m=Math.round(d/l),q=Math.round(f/
+l),t=document.createElement("canvas");t.width=m;t.height=q;t.getContext("2d").drawImage(b,0,0,m,q);var u=t.toDataURL();if(u.length<c.length){var L=document.createElement("canvas");L.width=m;L.height=q;var H=L.toDataURL();u!==H&&(c=u,d=m,f=q)}}}catch(K){}e(c,d,f)};EditorUi.prototype.extractGraphModelFromPng=function(b){return Editor.extractGraphModelFromPng(b)};EditorUi.prototype.loadImage=function(b,c,e){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:
+120;c(d)};null!=e&&(d.onerror=e);d.src=b}catch(m){if(null!=e)e(m);else throw m;}};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:"0"!=urlParams.rough),this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;Editor.isDarkMode()&&
+(c.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);c.cellEditor.editPlantUmlData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("plantUml")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&b.generatePlantUmlImage(e,g.format,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{if("txt"==g.format)c.labelChanged(d,"<pre>"+f+"</pre>"),c.updateCellSize(d,!0);else{c.setCellStyles("image",b.convertDataUri(f),
+[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=l,m.height=k,c.cellsResized([d],[m],!1))}c.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:e,format:g.format}))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};c.cellEditor.editMermaidData=function(d,e,f){var g=JSON.parse(f);e=new TextareaDialog(b,mxResources.get("mermaid")+":",g.data,function(e){null!=e&&b.spinner.spin(document.body,mxResources.get("inserting"))&&
+b.generateMermaidImage(e,g.config,function(f,l,k){b.spinner.stop();c.getModel().beginUpdate();try{c.setCellStyles("image",f,[d]);var m=c.model.getGeometry(d);null!=m&&(m=m.clone(),m.width=Math.max(m.width,l),m.height=Math.max(m.height,k),c.cellsResized([d],[m],!1));c.setAttributeForCell(d,"mermaidData",JSON.stringify({data:e,config:g.config},null,2))}finally{c.getModel().endUpdate()}},function(d){b.handleError(d)})},null,null,400,220);b.showDialog(e.container,420,300,!0,!0);e.init()};var e=c.cellEditor.startEditing;
+c.cellEditor.startEditing=function(d,f){try{var g=this.graph.getAttributeForCell(d,"plantUmlData");if(null!=g)this.editPlantUmlData(d,f,g);else if(g=this.graph.getAttributeForCell(d,"mermaidData"),null!=g)this.editMermaidData(d,f,g);else{var l=c.getCellStyle(d);"1"==mxUtils.getValue(l,"metaEdit","0")?b.showDataDialog(d):e.apply(this,arguments)}}catch(T){b.handleError(T)}};c.getLinkTitle=function(d){return b.getLinkTitle(d)};c.customLinkClicked=function(d){var c=!1;try{b.handleCustomLink(d),c=!0}catch(M){b.handleError(M)}return c};
+var k=c.parseBackgroundImage;c.parseBackgroundImage=function(b){var d=k.apply(this,arguments);null!=d&&null!=d.src&&Graph.isPageLink(d.src)&&(d={originalSrc:d.src});return d};var m=c.setBackgroundImage;c.setBackgroundImage=function(d){null!=d&&null!=d.originalSrc&&(d=b.createImageForPageLink(d.originalSrc,b.currentPage,this));m.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){c.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,
function(){c.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(b,d){var e=null!=c.backgroundImage?c.backgroundImage.originalSrc:null;if(null!=e){var f=e.indexOf(",");if(0<f)for(var e=e.substring(f+1),f=d.getProperty("patches"),g=0;g<f.length;g++)if(null!=f[g][EditorUi.DIFF_UPDATE]&&null!=f[g][EditorUi.DIFF_UPDATE][e]){c.refreshBackgroundImage();break}}}));var n=c.getBackgroundImageObject;c.getBackgroundImageObject=function(b,d){var c=n.apply(this,arguments);
-null==c||null==c.originalSrc||d||(c={src:c.originalSrc});return c};var t=this.clearDefaultStyle;this.clearDefaultStyle=function(){t.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var u=b.editor.getEditBlankUrl;
-this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return u.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=f&&f(b,d)};y.call(this,b,d,e)};g.apply(this,arguments);
+null==c||null==c.originalSrc||d||(c={src:c.originalSrc});return c};var p=this.clearDefaultStyle;this.clearDefaultStyle=function(){p.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var t=b.editor.getEditBlankUrl;
+this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1");return t.apply(this,arguments)};var y=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null!=d&&c.isCustomLink(d)&&(mxEvent.isTouchEvent(b)||!mxEvent.isPopupTrigger(b))&&c.customLinkClicked(d)&&mxEvent.consume(b);null!=f&&f(b,d)};y.call(this,b,d,e)};g.apply(this,arguments);
mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var x=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(d,c,e){b.editor.graph.isSelectionEmpty()?x.apply(this,arguments):b.menus.addMenuItems(d,"delete - cut copy copyAsImage - duplicate".split(" "),null,e)}}b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?450:370,!0,!0)};this.defaultFilename=
mxResources.get("untitledDiagram");var D=c.getExportVariables;c.getExportVariables=function(){var d=D.apply(this,arguments),c=b.getCurrentFile();null!=c&&(d.filename=c.getTitle());d.pagecount=null!=b.pages?b.pages.length:1;d.page=null!=b.currentPage?b.currentPage.getName():"";d.pagenumber=null!=b.pages&&null!=b.currentPage?mxUtils.indexOf(b.pages,b.currentPage)+1:1;return d};var C=c.getGlobalVariable;c.getGlobalVariable=function(d){var c=b.getCurrentFile();return"filename"==d&&null!=c?c.getTitle():
"page"==d&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==d?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:"pagecount"==d?null!=b.pages?b.pages.length:1:C.apply(this,arguments)};var G=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isCustomLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))G.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))c.customLinkClicked(f),c.getRubberband().reset();
mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var d=b.defaultFilename,c=b.getCurrentFile();null!=c&&(d=null!=c.getTitle()?c.getTitle():d);return d};var J=this.actions.get("print");J.setEnabled(!mxClient.IS_IOS||!navigator.standalone);J.visible=J.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),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),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&c.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(b){var d=c.cellEditor.text2,e=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(b){null!=
-e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,k){c.insertImage(b,
-g,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,e)),f/Math.max(1,b));c.insertImage(decodeURIComponent(d),
+e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(d));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,d,e,f,g,l){c.insertImage(b,
+g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()},mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,e)),f/Math.max(1,b));c.insertImage(decodeURIComponent(d),
e*f,b*f)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));this.isSettingsEnabled()&&(J=this.editor.graph.view,J.setUnit(mxSettings.getUnit()),J.addListener("unitChanged",
function(b,d){mxSettings.setUnit(d.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,J.unit),this.refresh());if("1"==urlParams.styledev){J=document.getElementById("geFooter");null!=J&&(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)})),J.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,d){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 L=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:L.apply(this,arguments)}}J=document.getElementById("geInfo");null!=J&&J.parentNode.removeChild(J);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var H=null;mxEvent.addListener(c.container,
"dragleave",function(b){c.isEnabled()&&(null!=H&&(H.parentNode.removeChild(H),H=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(b){null!=H&&(H.parentNode.removeChild(H),H=null);if(c.isEnabled()){var d=
-mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,k=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(k=g=null),this.importFiles(b.dataTransfer.files,g,k,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(k=g=0);var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
-b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,k,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var p=null,e=d.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)||(p=
-!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var n=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,k,!0,p,null,n,mxEvent.isControlDown(b)))});p&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){n=b;q()},mxEvent.isControlDown(b)):q()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),
-mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,k,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(l,g,k,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),
-g,k,!0))}}b.stopPropagation();b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=
-c.items;for(index in g){var k=g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,k){b.insertImage(d,g,k)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var n=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],n.x,n.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML=
+mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),e=c.view.translate,f=c.view.scale,g=d.x/f-e.x,l=d.y/f-e.y;if(0<b.dataTransfer.files.length)mxEvent.isShiftDown(b)?this.openFiles(b.dataTransfer.files,!0):(mxEvent.isAltDown(b)&&(l=g=null),this.importFiles(b.dataTransfer.files,g,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b),b));else{mxEvent.isAltDown(b)&&(l=g=0);var k=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+b.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=d)c.setSelectionCells(this.importXml(d,g,l,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var m=b.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=c.sanitizeHtml(m);var n=null,e=d.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)||(n=
+!0)):(e=d.getElementsByTagName("a"),null!=e&&1==e.length?m=e[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(m=mxUtils.getTextContent(d[0]))));var p=!0,q=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,g,l,!0,n,null,p,mxEvent.isControlDown(b)))});n&&null!=m&&m.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;q()},mxEvent.isControlDown(b)):q()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),
+mxUtils.bind(this,function(b){var d=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,null,"",g,l,d*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(k,g,l,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),
+g,l,!0))}}b.stopPropagation();b.preventDefault()}),!1)}c.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var b=this.editor.graph;b.container.addEventListener("paste",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d))try{for(var c=d.clipboardData||d.originalEvent.clipboardData,e=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){e=!0;break}if(!e){var g=
+c.items;for(index in g){var k=g[index];if("file"===k.kind){if(b.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(d,c,e,f,g,l){b.insertImage(d,g,l)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var d=0;d<b.length;d++)b[d]()});else{var p=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],p.x,p.y,this.maxImageSize);mxEvent.consume(d)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function b(){window.setTimeout(function(){e.innerHTML=
"&nbsp;";e.focus();document.execCommand("selectAll",!1,null)},0)}var c=this.editor.graph,e=document.createElement("div");e.setAttribute("autocomplete","off");e.setAttribute("autocorrect","off");e.setAttribute("autocapitalize","off");e.setAttribute("spellcheck","false");e.style.textRendering="optimizeSpeed";e.style.fontFamily="monospace";e.style.wordBreak="break-all";e.style.background="transparent";e.style.color="transparent";e.style.position="absolute";e.style.whiteSpace="nowrap";e.style.overflow=
"hidden";e.style.display="block";e.style.fontSize="1";e.style.zIndex="-1";e.style.resize="none";e.style.outline="none";e.style.width="1px";e.style.height="1px";mxUtils.setOpacity(e,0);e.contentEditable=!0;e.innerHTML="&nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var d=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||
c.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||224!=b.keyCode&&(mxClient.IS_MAC||17!=b.keyCode)&&(!mxClient.IS_MAC||91!=b.keyCode&&93!=b.keyCode)||g||(e.style.left=c.container.scrollLeft+10+"px",e.style.top=c.container.scrollTop+10+"px",c.container.appendChild(e),g=!0,e.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var d=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!g||224!=d&&17!=
-d&&91!=d&&93!=d||(g=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e),b()}catch(v){this.handleError(v)}}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(v){this.handleError(v)}}));mxEvent.addListener(e,
+d&&91!=d&&93!=d||(g=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),e.parentNode.removeChild(e),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(e,"copy",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,"cut",mxUtils.bind(this,function(d){if(c.isEnabled())try{mxClipboard.copy(c),this.copyCells(e,!0),b()}catch(u){this.handleError(u)}}));mxEvent.addListener(e,
"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(e.innerHTML="&nbsp;",e.focus(),null!=b.clipboardData&&this.pasteCells(b,e,!0,!0),mxEvent.isConsumed(b)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,e,!1,!0)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==e?!0:k.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(b){this.spinner.spin(document.body,mxResources.get("working")+
"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(b);mxSettings.settings.sketchMode=b;mxSettings.save();this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=function(b){Editor.pagesVisible!=b&&(Editor.pagesVisible=b,mxSettings.settings.pagesVisible=b,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.doSetSketchMode=function(b){if(Editor.sketchMode!=b){var d=this.editor.graph;
Editor.sketchMode=b;this.menus.defaultFonts=Menus.prototype.defaultFonts;this.menus.defaultFontSize=20;d.defaultVertexStyle={pointerEvents:"0",fontSize:"20"};d.defaultEdgeStyle={fontSize:"16",edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",endSize:"14",startSize:"14"};b&&(d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultEdgeStyle.fontFamily=
@@ -3618,13 +3619,13 @@ mxUtils.bind(this,function(b,c){mxSettings.setCreateTarget(this.editor.graph.con
mxUtils.bind(this,function(b,c){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(b,c){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(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.copyImage=function(b,c,e){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
this.editor.exportToCanvas(mxUtils.bind(this,function(b,d){try{this.spinner.stop();var e=this.createImageDataUri(b,c,"png"),f=parseInt(d.getAttribute("width")),g=parseInt(d.getAttribute("height"));this.writeImageToClipboard(e,f,g,mxUtils.bind(this,function(b){this.handleError(b)}))}catch(y){this.handleError(y)}}),null,null,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,null,null!=e?e:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!1,null,0<b.length?b:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=
+null,null,null,10,null,null,!1,null,0<b.length?b:null)}catch(q){this.handleError(q)}};EditorUi.prototype.writeImageToClipboard=function(b,c,e,g){var d=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":d,"text/html":new Blob(['<img src="'+b+'" width="'+c+'" height="'+e+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](g)};EditorUi.prototype.copyCells=function(b,c){var d=this.editor.graph;if(d.isSelectionEmpty())b.innerHTML="";else{var e=
mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),f=mxUtils.getXml(d.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(f));c?(d.removeCells(e,!1),d.lastPasteXml=null):(d.lastPasteXml=f,d.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var b=null;if(Editor.enableNativeCipboard){var c=this.editor.graph;c.isSelectionEmpty()||(b=mxUtils.sortCells(c.getExportableCells(c.model.getTopmostCells(c.getSelectionCells()))),
-c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var k=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,k,k),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){k=d.getStartEditingCell(d.getSelectionCell(),g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(k)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,
-b,[k]);else{d.model.beginUpdate();try{d.labelChanged(k,b),Graph.isLink(b)&&d.setLinkForCell(k,b)}finally{d.model.endUpdate()}}d.setSelectionCell(k)}else f=d.getInsertPoint(),d.isMouseInsertPoint()&&(k=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+k,f.y+k,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=
-function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var k=b.clipboardData.getData("text/plain"),l=!1;if(null!=k&&0<k.length&&"%3CmxGraphModel%3E"==k.substring(0,18)){var m=decodeURIComponent(k);this.isCompatibleString(m)&&(l=!0,k=m)}l=l?null:b.clipboardData.getData("text/html");null!=l&&0<l.length?(d=this.parseHtmlData(l),f="text/plain"!=d.getAttribute("data-type")):null!=k&&0<k.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,
-l))}k=d.getElementsByTagName("span");if(null!=k&&0<k.length&&"application/vnd.lucid.chart.objects"===k[0].getAttribute("data-lucid-type"))e=k[0].getAttribute("data-lucid-content"),null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),
-mxEvent.consume(b));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);l=!1;try{var n=f.lastIndexOf("%3E");0<=n&&n<f.length-3&&(f=f.substring(0,n+3))}catch(C){}try{k=d.getElementsByTagName("span"),m=null!=k&&0<k.length?mxUtils.trim(decodeURIComponent(k[0].textContent)):decodeURIComponent(f),this.isCompatibleString(m)&&(l=!0,f=m)}catch(C){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,l,b);try{mxEvent.consume(b)}catch(C){}}else if(!e){var t=this.editor.graph;
+c=mxUtils.getXml(c.encodeCells(b)),navigator.clipboard.writeText(c))}return b};EditorUi.prototype.pasteXml=function(b,c,e,g){var d=this.editor.graph,f=null;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var l=d.pasteCounter*d.gridSize;if(e||this.isCompatibleString(b))f=this.importXml(b,l,l),d.setSelectionCells(f);else if(c&&1==d.getSelectionCount()){l=d.getStartEditingCell(d.getSelectionCell(),g);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)&&"image"==d.getCurrentCellStyle(l)[mxConstants.STYLE_SHAPE])d.setCellStyles(mxConstants.STYLE_IMAGE,
+b,[l]);else{d.model.beginUpdate();try{d.labelChanged(l,b),Graph.isLink(b)&&d.setLinkForCell(l,b)}finally{d.model.endUpdate()}}d.setSelectionCell(l)}else f=d.getInsertPoint(),d.isMouseInsertPoint()&&(l=0,d.lastPasteXml==b&&0<d.pasteCounter&&d.pasteCounter--),f=this.insertTextAt(b,f.x+l,f.y+l,!0),d.setSelectionCells(f);d.isSelectionEmpty()||(d.scrollCellToVisible(d.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell())));return f};EditorUi.prototype.pasteCells=
+function(b,c,e,g){if(!mxEvent.isConsumed(b)){var d=c,f=!1;if(e&&null!=b.clipboardData&&b.clipboardData.getData){var l=b.clipboardData.getData("text/plain"),k=!1;if(null!=l&&0<l.length&&"%3CmxGraphModel%3E"==l.substring(0,18)){var p=decodeURIComponent(l);this.isCompatibleString(p)&&(k=!0,l=p)}k=k?null:b.clipboardData.getData("text/html");null!=k&&0<k.length?(d=this.parseHtmlData(k),f="text/plain"!=d.getAttribute("data-type")):null!=l&&0<l.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,
+k))}l=d.getElementsByTagName("span");if(null!=l&&0<l.length&&"application/vnd.lucid.chart.objects"===l[0].getAttribute("data-lucid-type"))e=l[0].getAttribute("data-lucid-content"),null!=e&&0<e.length&&(this.convertLucidChart(e,mxUtils.bind(this,function(b){var d=this.editor.graph;d.lastPasteXml==b?d.pasteCounter++:(d.lastPasteXml=b,d.pasteCounter=0);var c=d.pasteCounter*d.gridSize;d.setSelectionCells(this.importXml(b,c,c));d.scrollCellToVisible(d.getSelectionCell())}),mxUtils.bind(this,function(b){this.handleError(b)})),
+mxEvent.consume(b));else{f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);k=!1;try{var q=f.lastIndexOf("%3E");0<=q&&q<f.length-3&&(f=f.substring(0,q+3))}catch(C){}try{l=d.getElementsByTagName("span"),p=null!=l&&0<l.length?mxUtils.trim(decodeURIComponent(l[0].textContent)):decodeURIComponent(f),this.isCompatibleString(p)&&(k=!0,f=p)}catch(C){}try{if(null!=f&&0<f.length){this.pasteXml(f,g,k,b);try{mxEvent.consume(b)}catch(C){}}else if(!e){var t=this.editor.graph;
t.lastPasteXml=null;t.pasteCounter=0}}catch(C){this.handleError(C)}}}c.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var d=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=d&&(d.parentNode.removeChild(d),d=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==d&&(!mxClient.IS_IE||10<document.documentMode&&
12>document.documentMode)&&(d=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=d&&(d.parentNode.removeChild(d),d=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);
else{var c=this.extractGraphModelFromEvent(b);if(null==c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.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&&
@@ -3634,9 +3635,9 @@ else{var c=this.extractGraphModelFromEvent(b);if(null==c){var e=null!=b.dataTran
function(b){b=mxUtils.parseXml(b);var d=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=d){var c=new mxCodec(d.ownerDocument),e=new mxGraphModel;c.decode(d,e);d=e.getChildAt(e.getRoot(),0);for(c=0;c<e.getChildCount(d);c++)b.push(e.getChildAt(d,c))}return b};EditorUi.prototype.openFileHandle=function(b,c,e,g,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 d=
mxUtils.bind(this,function(b){c=0<=c.lastIndexOf(".")?c.substring(0,c.lastIndexOf("."))+".drawio":c+".drawio";if("<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,c))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,c,g)});if(/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c))this.importVisio(e,mxUtils.bind(this,
function(b){this.spinner.stop();d(b)}));else if(/(\.*<graphml )/.test(b))this.importGraphML(b,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,c))this.parseFile(e,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?d(b.responseText):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));
-else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(u){this.handleError(u,
+else if(this.isLucidChartData(b))/(\.json)$/i.test(c)&&(c=c.substring(0,c.length-5)+".drawio"),this.convertLucidChart(b,mxUtils.bind(this,function(b){this.spinner.stop();this.openLocalFile(b,c,g)}),mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));else if("<mxlibrary"==b.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,g);try{this.loadLibrary(new LocalLibrary(this,b,e.name))}catch(v){this.handleError(v,
mxResources.get("errorLoadingFile"))}}else if(0==b.indexOf("PK"))this.importZipFile(e,mxUtils.bind(this,function(b){this.spinner.stop();d(b)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(b,c,g)}));else{if("image/png"==e.type.substring(0,9))b=this.extractGraphModelFromPng(b);else if("application/pdf"==e.type){var f=Editor.extractGraphModelFromPdf(b);null!=f&&(k=null,g=!0,b=f)}this.spinner.stop();this.openLocalFile(b,c,g,k,null!=k?e:null)}}};EditorUi.prototype.openFiles=function(b,
-c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(v){this.handleError(v)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};
+c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<b.length;d++)mxUtils.bind(this,function(b){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{this.openFileHandle(d.target.result,b.name,b,c)}catch(u){this.handleError(u)}});d.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"!==b.type.substring(0,5)&&"application/pdf"!==b.type||"image/svg"===b.type.substring(0,9)?d.readAsText(b):d.readAsDataURL(b)})(b[d])};
EditorUi.prototype.openLocalFile=function(b,c,e,g,k){var d=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(b);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,c||this.defaultFilename,e,g,k))});if(null!=b&&0<b.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=g)?f():(mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp||null!=g)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()})));else throw Error(mxResources.get("notADiagramFile"));
};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var c=[],e;for(e in b)c.push(e);return c};EditorUi.prototype.addBasenamesForCell=function(b,c){function d(b){if(null!=b){var d=b.lastIndexOf(".");0<d&&(b=b.substring(d+1,b.length));null==c[b]&&(c[b]=!0)}}var e=this.editor.graph,f=e.getCellStyle(b);
@@ -3648,46 +3649,46 @@ this.addEmbedButtons();this.setGraphEnabled(!0);if(null==b||0==b.length)b=this.e
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(b,c){null!=b?b.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(b){var d=this.editor.graph;return{event:b,pageVisible:d.pageVisible,translate:d.view.translate,bounds:d.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:d.view.scale,page:d.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(b){var d=null,c=!1,
e=!1,g=null,k=mxUtils.bind(this,function(b,d){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,l=mxUtils.bind(this,function(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/png;base64,"==
b.substring(0,22)?b=this.extractGraphModelFromPng(b):"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=Graph.decompress(b)))}catch(ra){}return b});if("json"==urlParams.proto){var m=!1;try{k=JSON.parse(k)}catch(R){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?
-mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var p=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?n.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),
-"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),
-"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{p.init()}catch(R){n.postMessage(JSON.stringify({event:"draft",error:R.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();
-var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var A=this.getCurrentUser(),y=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;n.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=A?A.id:
-null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}p=
-new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=d||this.emptyDiagramXml;null!=k.callback?n.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,
-"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){n.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(p.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();
-b&&this.actions.get("exit").funct()}));p.init();return}if("textContent"==k.action){var Q=this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:Q,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var T=null!=k.messageKey?mxResources.get(k.messageKey):
+mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("layout"==k.action){this.executeLayoutList(k.layouts);return}if("prompt"==k.action){this.spinner.stop();var n=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):k.ok,function(b){null!=b?p.postMessage(JSON.stringify({event:"prompt",value:b,message:k}),"*"):p.postMessage(JSON.stringify({event:"prompt-cancel",message:k}),
+"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(n.container,300,80,!0,!1);n.init();return}if("draft"==k.action){var q=l(k.xml);this.spinner.stop();n=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),
+"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();p.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(n.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{n.init()}catch(R){p.postMessage(JSON.stringify({event:"draft",error:R.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();
+var t=1==k.enableRecent,u=1==k.enableSearch,v=1==k.enableCustomTemp;if("1"==urlParams.newTempDlg&&!k.templatesOnly&&null!=k.callback){var A=this.getCurrentUser(),y=new TemplatesDialog(this,function(b,d,c){b=b||this.emptyDiagramXml;p.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d,tempUrl:c.url,libs:c.libs,builtIn:null!=c.info&&null!=c.info.custContentId,message:k}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=A?A.id:
+null,t?mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getRecentDiagrams",[c],null,b,d)}):null,u?mxUtils.bind(this,function(b,d,c,e){this.remoteInvoke("searchDiagrams",[b,e],null,d,c)}):null,mxUtils.bind(this,function(b,d,c){this.remoteInvoke("getFileContent",[b.url],null,d,c)}),null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,!1,!1,!0,!0);this.showDialog(y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}n=
+new NewDialog(this,!1,k.templatesOnly?!1:null!=k.callback,mxUtils.bind(this,function(d,c,e,g){d=d||this.emptyDiagramXml;null!=k.callback?p.postMessage(JSON.stringify({event:"template",xml:d,blank:d==this.emptyDiagramXml,name:c,tempUrl:e,libs:g,builtIn:!0,message:k}),"*"):(b(d,f,d!=this.emptyDiagramXml,k.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,t?mxUtils.bind(this,function(b){this.remoteInvoke("getRecentDiagrams",[null],null,b,function(){b(null,
+"Network Error!")})}):null,u?mxUtils.bind(this,function(b,d){this.remoteInvoke("searchDiagrams",[b,null],null,d,function(){d(null,"Network Error!")})}):null,mxUtils.bind(this,function(b,d,c){p.postMessage(JSON.stringify({event:"template",docUrl:b,info:d,name:c}),"*")}),null,null,v?mxUtils.bind(this,function(b){this.remoteInvoke("getCustomTemplates",null,null,b,function(){b({},0)})}):null,1==k.withoutType);this.showDialog(n.container,620,460,!0,!1,mxUtils.bind(this,function(b){this.sidebar.hideTooltip();
+b&&this.actions.get("exit").funct()}));n.init();return}if("textContent"==k.action){var Q=this.getDiagramTextContent();p.postMessage(JSON.stringify({event:"textContent",data:Q,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var T=null!=k.messageKey?mxResources.get(k.messageKey):
k.message;null==k.show||k.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var N=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var O=this.editor.graph,ha=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var d=this.createLoadMessage("export");
-d.format=k.format;d.message=k;d.data=b;d.xml=N;n.postMessage(JSON.stringify(d),"*")}),E=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(N)));O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);ha(b)}),B=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(N),c=
+d.format=k.format;d.message=k;d.data=b;d.xml=N;p.postMessage(JSON.stringify(d),"*")}),E=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==k.format&&(b=Editor.writeGraphModelToPng(b,"tEXt","mxfile",encodeURIComponent(N)));O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);ha(b)}),B=k.pageId||(null!=this.pages?k.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(N),c=
!1);if(null!=this.pages&&this.currentPage.getId()!=B){for(var F=O.getGlobalVariable,O=this.createTemporaryGraph(O.getStylesheet()),Z,I=0;I<this.pages.length;I++)if(this.pages[I].getId()==B){Z=this.updatePageRoot(this.pages[I]);break}null==Z&&(Z=this.currentPage);O.getGlobalVariable=function(b){return"page"==b?Z.getName():"pagenumber"==b?1:F.apply(this,arguments)};document.body.appendChild(O.container);O.model.setRoot(Z.root)}if(null!=k.layerIds){for(var ba=O.model,ca=ba.getChildCells(ba.getRoot()),
-p={},I=0;I<k.layerIds.length;I++)p[k.layerIds[I]]=!0;for(I=0;I<ca.length;I++)ba.setVisible(ca[I],p[ca[I].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){E(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){E(null)}),null,null,k.scale,k.transparent,k.shadow,null,O,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=B?"&pageId="+B:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+
+n={},I=0;I<k.layerIds.length;I++)n[k.layerIds[I]]=!0;for(I=0;I<ca.length;I++)ba.setVisible(ca[I],n[ca[I].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(b){E(b.toDataURL("image/png"))}),k.width,null,k.background,mxUtils.bind(this,function(){E(null)}),null,null,k.scale,k.transparent,k.shadow,null,O,k.border,null,k.grid,k.keepTheme)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=B?"&pageId="+B:"")+(null!=k.layerIds&&0<k.layerIds.length?"&extras="+
encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?ha("data:image/png;base64,"+b.getText()):E(null)}),mxUtils.bind(this,function(){E(null)}))}}else{null!=k.xml&&0<k.xml.length&&(c=!0,this.setFileData(k.xml),c=!1);T=this.createLoadMessage("export");T.message=k;if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&
1<this.pages.length)){var da=this.getXmlFileData();T.xml=mxUtils.getXml(da);T.data=this.getFileData(null,null,!0,null,null,null,da);T.format=k.format}else if("html"==k.format)N=this.editor.getGraphXml(),T.data=this.getHtml(N,this.editor.graph),T.xml=mxUtils.getXml(N),T.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ka=null!=k.background?k.background:this.editor.graph.background;ka==mxConstants.NONE&&(ka=null);T.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);T.format=
-"svg";var ma=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();T.data=Editor.createSvgDataUri(b);n.postMessage(JSON.stringify(T),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(T.xml,this.editor.graph,null,!0,ma,null,null,k.embedImages,ka,k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=
-k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var ia=this.editor.graph.getSvg(ka,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(ia);this.embedFonts(ia,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){ma(mxUtils.getXml(b))})):ma(mxUtils.getXml(b))}))}return}n.postMessage(JSON.stringify(T),
+"svg";var ma=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();T.data=Editor.createSvgDataUri(b);p.postMessage(JSON.stringify(T),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(T.xml,this.editor.graph,null,!0,ma,null,null,k.embedImages,ka,k.scale,k.border,k.shadow,k.keepTheme);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=
+k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var ia=this.editor.graph.getSvg(ka,k.scale,k.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||k.shadow,null,k.keepTheme);(this.editor.graph.shadowVisible||k.shadow)&&this.editor.graph.addSvgShadow(ia);this.embedFonts(ia,mxUtils.bind(this,function(b){k.embedImages||null==k.embedImages?this.editor.convertImages(b,mxUtils.bind(this,function(b){ma(mxUtils.getXml(b))})):ma(mxUtils.getXml(b))}))}return}p.postMessage(JSON.stringify(T),
"*")}return}if("load"==k.action){m=k.toSketch;e=1==k.autosave;this.hideDialog();null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified);null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit);null!=k.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=k.noSaveBtn);null!=k.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=k.noExitBtn);null!=k.title&&null!=this.buttonContainer&&(q=document.createElement("span"),mxUtils.write(q,k.title),
"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"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(q),this.embedFilenameSpan=q);try{k.libs&&this.sidebar.showEntries(k.libs)}catch(R){}k=
-null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var W=this.getCurrentFile();null!=W&&(q=l(k.xml),null!=q&&""!=q&&W.mergeFile(new LocalFile(this,q),function(){n.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){n.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(n):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):
-"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):n.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(R){this.handleError(R)}}var na=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),V=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,m)}catch(fa){this.handleError(fa)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");
+null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):null!=k.descriptor?k.descriptor:k.xml}else{if("merge"==k.action){var W=this.getCurrentFile();null!=W&&(q=l(k.xml),null!=q&&""!=q&&W.mergeFile(new LocalFile(this,q),function(){p.postMessage(JSON.stringify({event:"merge",message:k}),"*")},function(b){p.postMessage(JSON.stringify({event:"merge",message:k,error:b}),"*")}))}else"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(p):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):
+"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):p.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(R){this.handleError(R)}}var na=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),V=mxUtils.bind(this,function(f,k){c=!0;try{b(f,k,null,m)}catch(fa){this.handleError(fa)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");
g=na();e&&null==d&&(d=mxUtils.bind(this,function(b,d){var e=na();if(e!=g&&!c){var f=this.createLoadMessage("autosave");f.xml=e;(window.opener||window.parent).postMessage(JSON.stringify(f),"*")}g=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,d),this.editor.graph.addListener("gridSizeChanged",d),this.editor.graph.addListener("shadowVisibleChanged",d),this.addListener("pageFormatChanged",d),this.addListener("pageScaleChanged",d),this.addListener("backgroundColorChanged",d),this.addListener("backgroundImageChanged",
-d),this.addListener("foldingEnabledChanged",d),this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;n.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",
+d),this.addListener("foldingEnabledChanged",d),this.addListener("mathEnabledChanged",d),this.addListener("gridEnabledChanged",d),this.addListener("guidesEnabledChanged",d),this.addListener("pageViewChanged",d));if("1"==urlParams.returnbounds||"json"==urlParams.proto){var l=this.createLoadMessage("load");l.xml=f;p.postMessage(JSON.stringify(l),"*")}});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(l="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",
this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(b){V(b,f)},mxUtils.bind(this,function(b){this.handleError(b)}),l)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&"<mxGraphModel"==b.responseText.substring(0,13)&&V(b.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&
-this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){V(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),V(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){V(na(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var n=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";
-n.postMessage(k,"*");if("json"==urlParams.proto){var t=this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);n.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";
+this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(b){V(b)}),mxUtils.bind(this,function(b){this.handleError(b)})):null==k||"object"!==typeof k||null==k.format||null==k.data&&null==k.url?(k=l(k),V(k,f)):this.loadDescriptor(k,mxUtils.bind(this,function(b){V(na(),f)}),mxUtils.bind(this,function(b){this.handleError(b,mxResources.get("errorLoadingFile"))}))}}));var p=window.opener||window.parent,k="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";
+p.postMessage(k,"*");if("json"==urlParams.proto){var t=this.editor.graph.openLink;this.editor.graph.openLink=function(b,d,c){t.apply(this,arguments);p.postMessage(JSON.stringify({event:"openLink",href:b,target:d,allowOpener:c}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"0px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";
var c=document.createElement("button");c.className="geBigButton";var e=c;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,g);c.setAttribute("title",g);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));b.appendChild(c)}}else 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()})),b.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()})),b.appendChild(c),e=c);"1"!=urlParams.noExitBtn&&
(c=document.createElement("a"),e="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,e),c.setAttribute("title",e),c.className="geBigButton geBigStandardButton",c.style.marginLeft="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c),e=c);e.style.marginRight="20px";this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.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(b){this.importCsv(b)}),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(b,c){for(var d=this.editor.graph,
-e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);if(null!=b[f].config)for(var k in b[f].config)g[k]=b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g={};if(0<d.length){var k={},n=null,t=null,x=null,D=null,C=null,G=null,J=null,L=null,H=null,K="",A="auto",M="auto",Q=null,T=null,N=40,O=40,ha=100,E=0,B=this.editor.graph;B.getGraphBounds();
+e=d.getSelectionCells(),f=0;f<b.length;f++){var g=new window[b[f].layout](d);if(null!=b[f].config)for(var k in b[f].config)g[k]=b[f].config[k];this.executeLayout(function(){g.execute(d.getDefaultParent(),0==e.length?null:e)},f==b.length-1,c)}};EditorUi.prototype.importCsv=function(b,c){try{var d=b.split("\n"),e=[],f=[],g={};if(0<d.length){var k={},p=null,t=null,x=null,D=null,C=null,G=null,J=null,L=null,H=null,K="",A="auto",M="auto",Q=null,T=null,N=40,O=40,ha=100,E=0,B=this.editor.graph;B.getGraphBounds();
for(var F=function(){null!=c?c(la):(B.setSelectionCells(la),B.scrollCellToVisible(B.getSelectionCell()))},Z=B.getFreeInsertPoint(),I=Z.x,ba=Z.y,Z=ba,ca=null,da="auto",H=null,ka=[],ma=null,ia=null,W=0;W<d.length&&"#"==d[W].charAt(0);){b=d[W];for(W++;W<d.length&&"\\"==b.charAt(b.length-1)&&"#"==d[W].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(d[W].substring(1)),W++;if("#"!=b.charAt(1)){var na=b.indexOf(":");if(0<na){var V=mxUtils.trim(b.substring(1,na)),R=mxUtils.trim(b.substring(na+1));"label"==
-V?ca=B.sanitizeHtml(R):"labelname"==V&&0<R.length&&"-"!=R?C=R:"labels"==V&&0<R.length&&"-"!=R?G=JSON.parse(R):"style"==V?t=R:"parentstyle"==V?J=R:"stylename"==V&&0<R.length&&"-"!=R?D=R:"styles"==V&&0<R.length&&"-"!=R?x=JSON.parse(R):"vars"==V&&0<R.length&&"-"!=R?n=JSON.parse(R):"identity"==V&&0<R.length&&"-"!=R?L=R:"parent"==V&&0<R.length&&"-"!=R?H=R:"namespace"==V&&0<R.length&&"-"!=R?K=R:"width"==V?A=R:"height"==V?M=R:"left"==V&&0<R.length?Q=R:"top"==V&&0<R.length?T=R:"ignore"==V?ia=R.split(","):
+V?ca=B.sanitizeHtml(R):"labelname"==V&&0<R.length&&"-"!=R?C=R:"labels"==V&&0<R.length&&"-"!=R?G=JSON.parse(R):"style"==V?t=R:"parentstyle"==V?J=R:"stylename"==V&&0<R.length&&"-"!=R?D=R:"styles"==V&&0<R.length&&"-"!=R?x=JSON.parse(R):"vars"==V&&0<R.length&&"-"!=R?p=JSON.parse(R):"identity"==V&&0<R.length&&"-"!=R?L=R:"parent"==V&&0<R.length&&"-"!=R?H=R:"namespace"==V&&0<R.length&&"-"!=R?K=R:"width"==V?A=R:"height"==V?M=R:"left"==V&&0<R.length?Q=R:"top"==V&&0<R.length?T=R:"ignore"==V?ia=R.split(","):
"connect"==V?ka.push(JSON.parse(R)):"link"==V?ma=R:"padding"==V?E=parseFloat(R):"edgespacing"==V?N=parseFloat(R):"nodespacing"==V?O=parseFloat(R):"levelspacing"==V?ha=parseFloat(R):"layout"==V&&(da=R)}}}if(null==d[W])throw Error(mxResources.get("invalidOrMissingFile"));for(var ra=this.editor.csvToArray(d[W]),V=na=null,R=[],S=0;S<ra.length;S++)L==ra[S]&&(na=S),H==ra[S]&&(V=S),R.push(mxUtils.trim(ra[S]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ca&&(ca="%"+R[0]+"%");if(null!=
ka)for(var fa=0;fa<ka.length;fa++)null==k[ka[fa].to]&&(k[ka[fa].to]={});L=[];for(S=W+1;S<d.length;S++){var ga=this.editor.csvToArray(d[S]);if(null==ga){var qa=40<d[S].length?d[S].substring(0,40)+"...":d[S];throw Error(qa+" ("+S+"):\n"+mxResources.get("containsValidationErrors"));}0<ga.length&&L.push(ga)}B.model.beginUpdate();try{for(S=0;S<L.length;S++){var ga=L[S],U=null,pa=null!=na?K+ga[na]:null;null!=pa&&(U=B.model.getCell(pa));var d=null!=U,aa=new mxCell(ca,new mxGeometry(I,Z,0,0),t||"whiteSpace=wrap;html=1;");
-aa.vertex=!0;aa.id=pa;for(var ja=0;ja<ga.length;ja++)B.setAttributeForCell(aa,R[ja],ga[ja]);if(null!=C&&null!=G){var P=G[aa.getAttribute(C)];null!=P&&B.labelChanged(aa,P)}if(null!=D&&null!=x){var X=x[aa.getAttribute(D)];null!=X&&(aa.style=X)}B.setAttributeForCell(aa,"placeholders","1");aa.style=B.replacePlaceholders(aa,aa.style,n);d&&(B.model.setGeometry(U,aa.geometry),B.model.setStyle(U,aa.style),0>mxUtils.indexOf(f,U)&&f.push(U));U=aa;if(!d)for(fa=0;fa<ka.length;fa++)k[ka[fa].to][U.getAttribute(ka[fa].to)]=
+aa.vertex=!0;aa.id=pa;for(var ja=0;ja<ga.length;ja++)B.setAttributeForCell(aa,R[ja],ga[ja]);if(null!=C&&null!=G){var P=G[aa.getAttribute(C)];null!=P&&B.labelChanged(aa,P)}if(null!=D&&null!=x){var X=x[aa.getAttribute(D)];null!=X&&(aa.style=X)}B.setAttributeForCell(aa,"placeholders","1");aa.style=B.replacePlaceholders(aa,aa.style,p);d&&(B.model.setGeometry(U,aa.geometry),B.model.setStyle(U,aa.style),0>mxUtils.indexOf(f,U)&&f.push(U));U=aa;if(!d)for(fa=0;fa<ka.length;fa++)k[ka[fa].to][U.getAttribute(ka[fa].to)]=
U;null!=ma&&"link"!=ma&&(B.setLinkForCell(U,U.getAttribute(ma)),B.setAttributeForCell(U,ma,null));B.fireEvent(new mxEventObject("cellsInserted","cells",[U]));var ta=this.editor.graph.getPreferredSizeForCell(U);U.vertex&&(null!=Q&&null!=U.getAttribute(Q)&&(U.geometry.x=I+parseFloat(U.getAttribute(Q))),null!=T&&null!=U.getAttribute(T)&&(U.geometry.y=ba+parseFloat(U.getAttribute(T))),"@"==A.charAt(0)&&null!=U.getAttribute(A.substring(1))?U.geometry.width=parseFloat(U.getAttribute(A.substring(1))):U.geometry.width=
-"auto"==A?ta.width+E:parseFloat(A),"@"==M.charAt(0)&&null!=U.getAttribute(M.substring(1))?U.geometry.height=parseFloat(U.getAttribute(M.substring(1))):U.geometry.height="auto"==M?ta.height+E:parseFloat(M),Z+=U.geometry.height+O);d?(null==g[pa]&&(g[pa]=[]),g[pa].push(U)):(H=null!=V?B.model.getCell(K+ga[V]):null,e.push(U),null!=H?(H.style=B.replacePlaceholders(H,J,n),B.addCell(U,H)):f.push(B.addCell(U)))}for(var sa=f.slice(),la=f.slice(),fa=0;fa<ka.length;fa++)for(var Ba=ka[fa],S=0;S<e.length;S++){var U=
-e[S],Ea=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&(B.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=k[c.to][e[f]];if(null!=g){var l=c.label;null!=c.fromlabel&&(l=(d.getAttribute(c.fromlabel)||"")+(l||""));null!=c.sourcelabel&&(l=B.replacePlaceholders(d,c.sourcelabel,n)+(l||""));null!=c.tolabel&&(l=(l||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(l=(l||"")+B.replacePlaceholders(g,c.targetlabel,n));var m="target"==
-c.placeholders==!c.invert?g:b,m=null!=c.style?B.replacePlaceholders(m,c.style,n):B.createCurrentEdgeStyle(),l=B.insertEdge(null,null,l||"",c.invert?g:b,c.invert?b:g,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var p=c.labels[m],q=new mxCell(p.label||m,new mxGeometry(null!=p.x?p.x:0,null!=p.y?p.y:0,0,0),"resizable=0;html=1;");q.vertex=!0;q.connectable=!1;q.geometry.relative=!0;null!=p.placeholders&&(q.value=B.replacePlaceholders("target"==p.placeholders==!c.invert?g:b,q.value,n));if(null!=p.dx||
-null!=p.dy)q.geometry.offset=new mxPoint(null!=p.dx?p.dx:0,null!=p.dy?p.dy:0);l.insert(q)}la.push(l);mxUtils.remove(c.invert?b:g,sa)}}});Ea(U,U,Ba);if(null!=g[U.id])for(ja=0;ja<g[U.id].length;ja++)Ea(U,g[U.id][ja],Ba)}if(null!=ia)for(S=0;S<e.length;S++)for(U=e[S],ja=0;ja<ia.length;ja++)B.setAttributeForCell(U,mxUtils.trim(ia[ja]),null);if(0<f.length){var xa=new mxParallelEdgeLayout(B);xa.spacing=N;xa.checkOverlap=!0;var Fa=function(){0<xa.spacing&&xa.execute(B.getDefaultParent());for(var b=0;b<f.length;b++){var d=
+"auto"==A?ta.width+E:parseFloat(A),"@"==M.charAt(0)&&null!=U.getAttribute(M.substring(1))?U.geometry.height=parseFloat(U.getAttribute(M.substring(1))):U.geometry.height="auto"==M?ta.height+E:parseFloat(M),Z+=U.geometry.height+O);d?(null==g[pa]&&(g[pa]=[]),g[pa].push(U)):(H=null!=V?B.model.getCell(K+ga[V]):null,e.push(U),null!=H?(H.style=B.replacePlaceholders(H,J,p),B.addCell(U,H)):f.push(B.addCell(U)))}for(var sa=f.slice(),la=f.slice(),fa=0;fa<ka.length;fa++)for(var Ba=ka[fa],S=0;S<e.length;S++){var U=
+e[S],Ea=mxUtils.bind(this,function(b,d,c){var e=d.getAttribute(c.from);if(null!=e&&(B.setAttributeForCell(d,c.from,null),""!=e))for(var e=e.split(","),f=0;f<e.length;f++){var g=k[c.to][e[f]];if(null!=g){var l=c.label;null!=c.fromlabel&&(l=(d.getAttribute(c.fromlabel)||"")+(l||""));null!=c.sourcelabel&&(l=B.replacePlaceholders(d,c.sourcelabel,p)+(l||""));null!=c.tolabel&&(l=(l||"")+(g.getAttribute(c.tolabel)||""));null!=c.targetlabel&&(l=(l||"")+B.replacePlaceholders(g,c.targetlabel,p));var m="target"==
+c.placeholders==!c.invert?g:b,m=null!=c.style?B.replacePlaceholders(m,c.style,p):B.createCurrentEdgeStyle(),l=B.insertEdge(null,null,l||"",c.invert?g:b,c.invert?b:g,m);if(null!=c.labels)for(m=0;m<c.labels.length;m++){var n=c.labels[m],q=new mxCell(n.label||m,new mxGeometry(null!=n.x?n.x:0,null!=n.y?n.y:0,0,0),"resizable=0;html=1;");q.vertex=!0;q.connectable=!1;q.geometry.relative=!0;null!=n.placeholders&&(q.value=B.replacePlaceholders("target"==n.placeholders==!c.invert?g:b,q.value,p));if(null!=n.dx||
+null!=n.dy)q.geometry.offset=new mxPoint(null!=n.dx?n.dx:0,null!=n.dy?n.dy:0);l.insert(q)}la.push(l);mxUtils.remove(c.invert?b:g,sa)}}});Ea(U,U,Ba);if(null!=g[U.id])for(ja=0;ja<g[U.id].length;ja++)Ea(U,g[U.id][ja],Ba)}if(null!=ia)for(S=0;S<e.length;S++)for(U=e[S],ja=0;ja<ia.length;ja++)B.setAttributeForCell(U,mxUtils.trim(ia[ja]),null);if(0<f.length){var xa=new mxParallelEdgeLayout(B);xa.spacing=N;xa.checkOverlap=!0;var Fa=function(){0<xa.spacing&&xa.execute(B.getDefaultParent());for(var b=0;b<f.length;b++){var d=
B.getCellGeometry(f[b]);d.x=Math.round(B.snap(d.x));d.y=Math.round(B.snap(d.y));"auto"==A&&(d.width=Math.round(B.snap(d.width)));"auto"==M&&(d.height=Math.round(B.snap(d.height)))}};if("["==da.charAt(0)){var Ja=F;B.view.validate();this.executeLayoutList(JSON.parse(da),function(){Fa();Ja()});F=null}else if("circle"==da){var ya=new mxCircleLayout(B);ya.disableEdgeStyle=!1;ya.resetEdges=!1;var Ia=ya.isVertexIgnored;ya.isVertexIgnored=function(b){return Ia.apply(this,arguments)||0>mxUtils.indexOf(f,b)};
this.executeLayout(function(){ya.execute(B.getDefaultParent());Fa()},!0,F);F=null}else if("horizontaltree"==da||"verticaltree"==da||"auto"==da&&la.length==2*f.length-1&&1==sa.length){B.view.validate();var za=new mxCompactTreeLayout(B,"horizontaltree"==da);za.levelDistance=O;za.edgeRouting=!1;za.resetEdges=!1;this.executeLayout(function(){za.execute(B.getDefaultParent(),0<sa.length?sa[0]:null)},!0,F);F=null}else if("horizontalflow"==da||"verticalflow"==da||"auto"==da&&1==sa.length){B.view.validate();
var wa=new mxHierarchicalLayout(B,"horizontalflow"==da?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=O;wa.parallelEdgeSpacing=N;wa.interRankCellSpacing=ha;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(B.getDefaultParent(),la);B.moveCells(la,I,ba)},!0,F);F=null}else if("organic"==da||"auto"==da&&la.length>f.length){B.view.validate();var va=new mxFastOrganicLayout(B);va.forceConstant=3*O;va.disableEdgeStyle=!1;va.resetEdges=!1;var Ca=va.isVertexIgnored;
@@ -3697,66 +3698,66 @@ b,c,e,!0,g,k);this.showDialog(b.container,560,130,!0,!0);b.init()};EditorUi.prot
this.updateActionStates();var b=this.getCurrentFile(),c=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var e=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!e);this.actions.get("print").setEnabled(!e);this.menus.get("exportAs").setEnabled(!e);this.menus.get("embed").setEnabled(!e);e="1"!=urlParams.embed||this.editor.graph.isEnabled();
this.menus.get("extras").setEnabled(e);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(e),this.menus.get("newLibrary").setEnabled(e));b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.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()&&b);this.actions.get("redo").setEnabled(this.canRedo()&&
b);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(b);this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(b));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=
-function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=
+function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var b=this.getCurrentFile();return null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var b=this.editor.graph,c=this.getCurrentFile(),e=this.isDiagramActive(),g=b.getEditableCells(b.getSelectionCells());this.actions.get("pageSetup").setEnabled(e);this.actions.get("autosave").setEnabled(null!=
c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(e);this.actions.get("editData").setEnabled(0<g.length||b.isSelectionEmpty());this.actions.get("shadowVisible").setEnabled(e);this.actions.get("connectionArrows").setEnabled(e);this.actions.get("connectionPoints").setEnabled(e);this.actions.get("copyStyle").setEnabled(e&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(e&&0<g.length);this.actions.get("editGeometry").setEnabled(0<g.length&&b.getModel().isVertex(g[0]));
this.actions.get("createShape").setEnabled(e);this.actions.get("createRevision").setEnabled(e);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(e&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);
this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());c=this.actions.get("findReplace");c.setEnabled("hidden"!=this.diagramContainer.style.visibility);c.label=mxResources.get("find")+(b.isEnabled()?"/"+mxResources.get("replace"):"")+"...";b=b.view.getState(b.getSelectionCell());
-this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,n,t,u){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",
-mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,k,n)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),p=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*p<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};u&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,
-color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+p+"&border="+n+"&xml="+encodeURIComponent(f))})}else"png"==e?b.exportImage(k,null==g||"none"==g,!0,!1,!1,n,!0,!1,null,u,t):b.exportImage(k,!1,!0,!1,!1,n,!0,!1,"jpeg",u);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});
+this.actions.get("editShape").setEnabled(e&&null!=b&&null!=b.shape&&null!=b.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,c,e,g,k,p,t,v){var d=b.editor.graph;if("xml"==e)b.hideDialog(),b.saveData(c,"xml",
+mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==e)b.hideDialog(),b.saveData(c,"svg",mxUtils.getXml(d.getSvg(g,k,p)),"image/svg+xml");else{var f=b.getFileData(!0,null,null,null,null,!0),l=d.getGraphBounds(),m=Math.floor(l.width*k/d.view.scale),n=Math.floor(l.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&m*n<MAX_AREA)if(b.hideDialog(),"png"!=e&&"jpg"!=e&&"jpeg"!=e||!b.isExportToCanvas()){var q={globalVars:d.getExportVariables()};v&&(q.grid={size:d.gridSize,steps:d.view.gridSteps,
+color:d.view.gridColor});b.saveRequest(c,e,function(b,d){return new mxXmlRequest(EXPORT_URL,"format="+e+"&base64="+(d||"0")+(null!=b?"&filename="+encodeURIComponent(b):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<t?"&dpi="+t:"")+"&bg="+(null!=g?g:"none")+"&w="+m+"&h="+n+"&border="+p+"&xml="+encodeURIComponent(f))})}else"png"==e?b.exportImage(k,null==g||"none"==g,!0,!1,!1,p,!0,!1,null,v,t):b.exportImage(k,!1,!0,!1,!1,p,!0,!1,"jpeg",v);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});
EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var b=this.editor.graph,c="";if(null!=this.pages)for(var e=0;e<this.pages.length;e++){var g=b;this.currentPage!=this.pages[e]&&(g=this.createTemporaryGraph(b.getStylesheet()),this.updatePageRoot(this.pages[e]),g.model.setRoot(this.pages[e].root));c+=this.pages[e].getName()+" "+g.getIndexableText()+" "}else c=b.getIndexableText();this.editor.graph.setEnabled(!0);return c};EditorUi.prototype.showRemotelyStoredLibrary=
-function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";g.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var n=mxSettings.getCustomLibraries();
-for(b=0;b<n.length;b++){var t=n[b];if("R"==t.substring(0,1)){var y=JSON.parse(decodeURIComponent(t.substring(1)));k[y[0]]={id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){g.innerHTML="";if(0==b.length)g.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);
+function(b){var d={},c=document.createElement("div");c.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxUtils.htmlEntities(b));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(e);var g=document.createElement("div");g.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";g.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var k={};try{var p=mxSettings.getCustomLibraries();
+for(b=0;b<p.length;b++){var t=p[b];if("R"==t.substring(0,1)){var y=JSON.parse(decodeURIComponent(t.substring(1)));k[y[0]]={id:y[0],title:y[1],downloadUrl:y[2]}}}}catch(x){}this.remoteInvoke("getCustomLibraries",null,null,function(b){g.innerHTML="";if(0==b.length)g.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<b.length;c++){var e=b[c];k[e.id]&&(d[e.id]=e);var f=this.addCheckbox(g,e.title,k[e.id]);
(function(b,c){mxEvent.addListener(c,"change",function(){this.checked?d[b.id]=b:delete d[b.id]})})(e,f)}},mxUtils.bind(this,function(b){g.innerHTML="";var d=document.createElement("div");d.style.padding="8px";d.style.textAlign="center";mxUtils.write(d,mxResources.get("error")+": ");mxUtils.write(d,null!=b&&null!=b.message?b.message:mxResources.get("unknownError"));g.appendChild(d)}));c.appendChild(g);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));
var b=0,c;for(c in d)null==k[c]&&(b++,mxUtils.bind(this,function(d){this.remoteInvoke("getFileContent",[d.downloadUrl],null,mxUtils.bind(this,function(c){b--;0==b&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,d))}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){b--;0==b&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(d[c]));for(c in k)d[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));
0==b&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(c.container,340,390,!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(b){this.remoteWin=b;for(var d=0;d<this.remoteInvokeQueue.length;d++)b.postMessage(this.remoteInvokeQueue[d],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(b){var d=b.msgMarkers,c=this.remoteInvokeCallbacks[d.callbackId];if(null==c)throw Error("No callback for "+(null!=d?d.callbackId:"null"));b.error?c.error&&c.error(b.error.errResp):c.callback&&c.callback.apply(this,
b.resp);this.remoteInvokeCallbacks[d.callbackId]=null};EditorUi.prototype.remoteInvoke=function(b,c,e,g,k){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),l=mxUtils.bind(this,function(){window.clearTimeout(f);d&&g.apply(this,arguments)}),m=mxUtils.bind(this,function(){window.clearTimeout(f);d&&k.apply(this,arguments)});e=e||{};e.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:l,
error:m});b=JSON.stringify({event:"remoteInvoke",funtionName:b,functionArgs:c,msgMarkers:e});null!=this.remoteWin?this.remoteWin.postMessage(b,"*"):this.remoteInvokeQueue.push(b)};EditorUi.prototype.handleRemoteInvoke=function(b,c){var d=mxUtils.bind(this,function(d,c){var e={event:"remoteInvokeResponse",msgMarkers:b.msgMarkers};null!=c?e.error={errResp:c}:null!=d&&(e.resp=d);this.remoteWin.postMessage(JSON.stringify(e),"*")});try{var e=b.funtionName,f=this.remoteInvokableFns[e];if(null!=f&&"function"===
-typeof this[e]){if(f.allowedDomains){for(var g=!1,k=0;k<f.allowedDomains.length;k++)if(c=="https://"+f.allowedDomains[k]){g=!0;break}if(!g){d(null,"Invalid Call: "+e+" is not allowed.");return}}var n=b.functionArgs;Array.isArray(n)||(n=[]);if(f.isAsync)n.push(function(){d(Array.prototype.slice.apply(arguments))}),n.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,n);else{var t=this[e].apply(this,n);d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+
-x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(v){null!=c&&c(v)}};e.onsuccess=
+typeof this[e]){if(f.allowedDomains){for(var g=!1,k=0;k<f.allowedDomains.length;k++)if(c=="https://"+f.allowedDomains[k]){g=!0;break}if(!g){d(null,"Invalid Call: "+e+" is not allowed.");return}}var p=b.functionArgs;Array.isArray(p)||(p=[]);if(f.isAsync)p.push(function(){d(Array.prototype.slice.apply(arguments))}),p.push(function(b){d(null,b||"Unkown Error")}),this[e].apply(this,p);else{var t=this[e].apply(this,p);d([t])}}else d(null,"Invalid Call: "+e+" is not found.")}catch(x){d(null,"Invalid Call: An error occurred, "+
+x.message)}};EditorUi.prototype.openDatabase=function(b,c){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var e=d.open("database",2);e.onupgradeneeded=function(b){try{var d=e.result;1>b.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>b.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(u){null!=c&&c(u)}};e.onsuccess=
mxUtils.bind(this,function(d){var c=e.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(b){if(!b||"1"==urlParams.forceMigration){var d=document.createElement("iframe");d.style.display="none";d.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);
document.body.appendChild(d);var c=!0,e=!1,f,g=0,k=mxUtils.bind(this,function(){e=!0;this.setDatabaseItem(".drawioMigrated3",!0);d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){g++;m()}),m=mxUtils.bind(this,function(){try{if(g>=f.length)k();else{var b=f[g];StorageFile.getFileContent(this,b,mxUtils.bind(this,function(c){null==c||".scratchpad"==b&&c==this.emptyLibraryXml?d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(A){console.log(A)}}),n=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(A){console.log(A)}});b=mxUtils.bind(this,function(b){try{if(b.source==d.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(M){}"init"==g.event?(d.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
-"*"),d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||(c?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],c=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?n(g.resp[0]):l())}}catch(M){console.log(M)}});window.addEventListener("message",b)}})));b(c);c.onversionchange=function(){c.close()}});e.onerror=c;e.onblocked=function(){}}catch(p){null!=c&&c(p)}else null!=c&&c()}else b(this.database)};
-EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(u){null!=g&&g(u)}}),g)};EditorUi.prototype.removeDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){g=g||"objects";Array.isArray(g)||(g=[g],b=[b]);d=d.transaction(g,
-"readwrite");d.oncomplete=c;d.onerror=e;for(var f=0;f<g.length;f++)d.objectStore(g[f])["delete"](b[f])}),e)};EditorUi.prototype.getDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){try{g=g||"objects";var f=d.transaction([g],"readonly").objectStore(g).get(b);f.onsuccess=function(){c(f.result)};f.onerror=e}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.getDatabaseItems=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],
-"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(d){null==d.target.result?b(g):(g.push(d.target.result.value),d.target.result["continue"]())};f.onerror=c}catch(v){null!=c&&c(v)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).getAllKeys();f.onsuccess=function(){b(f.result)};f.onerror=c}catch(q){null!=c&&c(q)}}),c)};EditorUi.prototype.commentsSupported=
+funtionName:"getLocalStorageFile",functionArgs:[b]}),"*"):l()}),l)}}catch(A){console.log(A)}}),p=mxUtils.bind(this,function(b){try{this.setDatabaseItem(null,[{title:b.title,size:b.data.length,lastModified:Date.now(),type:b.isLib?"L":"F"},{title:b.title,data:b.data}],l,l,["filesInfo","files"])}catch(A){console.log(A)}});b=mxUtils.bind(this,function(b){try{if(b.source==d.contentWindow){var g={};try{g=JSON.parse(b.data)}catch(M){}"init"==g.event?(d.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),d.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=g.event||e||(c?null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?(f=g.resp[0],c=!1,m()):k():null!=g.resp&&0<g.resp.length&&null!=g.resp[0]?p(g.resp[0]):l())}}catch(M){console.log(M)}});window.addEventListener("message",b)}})));b(c);c.onversionchange=function(){c.close()}});e.onerror=c;e.onblocked=function(){}}catch(m){null!=c&&c(m)}else null!=c&&c()}else b(this.database)};
+EditorUi.prototype.setDatabaseItem=function(b,c,e,g,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],b=[b],c=[c]);var f=d.transaction(k,"readwrite");f.oncomplete=e;f.onerror=g;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=b&&null!=b[d]?{key:b[d],data:c[d]}:c[d])}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.removeDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){g=g||"objects";Array.isArray(g)||(g=[g],b=[b]);d=d.transaction(g,
+"readwrite");d.oncomplete=c;d.onerror=e;for(var f=0;f<g.length;f++)d.objectStore(g[f])["delete"](b[f])}),e)};EditorUi.prototype.getDatabaseItem=function(b,c,e,g){this.openDatabase(mxUtils.bind(this,function(d){try{g=g||"objects";var f=d.transaction([g],"readonly").objectStore(g).get(b);f.onsuccess=function(){c(f.result)};f.onerror=e}catch(u){null!=e&&e(u)}}),e)};EditorUi.prototype.getDatabaseItems=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],
+"readonly").objectStore(e).openCursor(IDBKeyRange.lowerBound(0)),g=[];f.onsuccess=function(d){null==d.target.result?b(g):(g.push(d.target.result.value),d.target.result["continue"]())};f.onerror=c}catch(u){null!=c&&c(u)}}),c)};EditorUi.prototype.getDatabaseItemKeys=function(b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).getAllKeys();f.onsuccess=function(){b(f.result)};f.onerror=c}catch(n){null!=c&&c(n)}}),c)};EditorUi.prototype.commentsSupported=
function(){var b=this.getCurrentFile();return null!=b?b.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var b=this.getCurrentFile();return null!=b?b.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(b,c){var d=this.getCurrentFile();null!=d?d.getComments(b,c):b([])};EditorUi.prototype.addComment=function(b,c,e){var d=this.getCurrentFile();
null!=d?d.addComment(b,c,e):c(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var b=this.getCurrentFile();return null!=b?b.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var b=this.getCurrentFile();return null!=b?b.canComment():!0};EditorUi.prototype.newComment=function(b,c){var d=this.getCurrentFile();return null!=d?d.newComment(b,c):new DrawioComment(this,null,b,Date.now(),Date.now(),!1,c)};EditorUi.prototype.isRevisionHistorySupported=function(){var b=this.getCurrentFile();
return null!=b&&b.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(b,c){var d=this.getCurrentFile();null!=d&&d.getRevisions?d.getRevisions(b,c):c({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var b=this.getCurrentFile();return null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(b){b.setRequestHeader("Content-Language",
-"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,g,k,n,t,u){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(b,c,e,g,k,n,t,u)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
-return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,n,t,u,y,x,D,C,G,J,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,n,t,u,y,x,D,C,G,J,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(b,c,e,g,k,p,t,v){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(b,c,e,g,k,p,t,v)};EditorUi.prototype.loadFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(b)};EditorUi.prototype.createSvgDataUri=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(b)};EditorUi.prototype.embedCssFonts=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(b,c)};EditorUi.prototype.embedExtFonts=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(b)};EditorUi.prototype.exportToCanvas=function(b,c,e,g,k,p,t,v,y,x,D,C,G,J,L,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(b,c,e,g,k,p,t,v,y,x,D,C,G,J,L,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(b,c,e,g)};EditorUi.prototype.convertImageToDataUri=function(b,c){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(b,c)};EditorUi.prototype.base64Encode=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(b)};EditorUi.prototype.updateCRC=
function(b,c,e,g){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(b,c,e,g)};EditorUi.prototype.crc32=function(b){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(b)};EditorUi.prototype.writeGraphModelToPng=function(b,c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(b,c,e,g,k)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
urlParams.forceMigration)return null;for(var b=[],c=0;c<localStorage.length;c++){var e=localStorage.key(c),g=localStorage.getItem(e);if(0<e.length&&(".scratchpad"==e||"."!=e.charAt(0))&&0<g.length){var k="<mxfile "===g.substring(0,8)||"<?xml"===g.substring(0,5)||"\x3c!--[if IE]>"===g.substring(0,12),g="<mxlibrary>"===g.substring(0,11);(k||g)&&b.push(e)}}return b};EditorUi.prototype.getLocalStorageFile=function(b){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
var c=localStorage.getItem(b);return{title:b,data:c,isLib:"<mxlibrary>"===c.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,c,e,k,g,n){function t(){for(var b=C.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==C&&c++;G.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
-"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),t()):f();y=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);y=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
-function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(p.click(),mxEvent.consume(b)):27==b.keyCode&&(n.click(),mxEvent.consume(b)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function f(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
-[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function m(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function p(b){b.style.border="";b.removeChild(b.busyImg)}function q(c,e,g,k,n){function A(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
-"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});J.appendChild(f);e&&(f.style.display="none")}function N(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=O;b(c);return{pdiv:e,replies:d}}function x(e,f,g,n,t){function u(){l(x);c.addReply(C,function(b){C.id=b;c.replies.push(C);p(x);g&&g()},function(c){v();m(x);b.handleError(c,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},n,t)}function v(){d(C,x,function(b){u()},!0)}var A=N().pdiv,C=b.newComment(e,b.getCurrentUser());C.pCommentId=c.id;null==c.replies&&(c.replies=[]);var x=q(C,c.replies,A,k+1);f?v():u()}if(n||!c.isResolved){G.style.display="none";var O=document.createElement("div");O.className="geCommentContainer";O.setAttribute("data-commentId",c.id);O.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(O.style.backgroundColor="ghostWhite");
+var CommentsWindow=function(b,c,e,k,g,p){function t(){for(var b=C.getElementsByTagName("div"),c=0,d=0;d<b.length;d++)"none"!=b[d].style.display&&b[d].parentNode==C&&c++;G.style.display=0==c?"block":"none"}function d(b,c,d,e){function f(){c.removeChild(l);c.removeChild(m);k.style.display="block";g.style.display="block"}y={div:c,comment:b,saveCallback:d,deleteOnCancel:e};var g=c.querySelector(".geCommentTxt"),k=c.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
+"geCommentEditTxtArea";l.style.minHeight=g.offsetHeight+"px";l.value=b.content;c.insertBefore(l,g);var m=document.createElement("div");m.className="geCommentEditBtns";var p=mxUtils.button(mxResources.get("cancel"),function(){e?(c.parentNode.removeChild(c),t()):f();y=null});p.className="geCommentEditBtn";m.appendChild(p);var n=mxUtils.button(mxResources.get("save"),function(){g.innerHTML="";b.content=l.value;mxUtils.write(g,b.content);f();d(b);y=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
+function(b){mxEvent.isConsumed(b)||((mxEvent.isControlDown(b)||mxClient.IS_MAC&&mxEvent.isMetaDown(b))&&13==b.keyCode?(n.click(),mxEvent.consume(b)):27==b.keyCode&&(p.click(),mxEvent.consume(b)))}));n.focus();n.className="geCommentEditBtn gePrimaryBtn";m.appendChild(n);c.insertBefore(m,g);k.style.display="none";g.style.display="none";l.focus()}function f(c,d){d.innerHTML="";var e=new Date(c.modifiedDate),f=b.timeSince(e);null==f&&(f=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
+[f],"{1} ago"));d.setAttribute("title",e.toLocaleDateString()+" "+e.toLocaleTimeString())}function l(b){var c=document.createElement("img");c.className="geCommentBusyImg";c.src=IMAGE_PATH+"/spin.gif";b.appendChild(c);b.busyImg=c}function q(b){b.style.border="1px solid red";b.removeChild(b.busyImg)}function m(b){b.style.border="";b.removeChild(b.busyImg)}function n(c,e,g,k,p){function A(b,d,e){var f=document.createElement("li");f.className="geCommentAction";var g=document.createElement("a");g.className=
+"geCommentActionLnk";mxUtils.write(g,b);f.appendChild(g);mxEvent.addListener(g,"click",function(b){d(b,c);b.preventDefault();mxEvent.consume(b)});J.appendChild(f);e&&(f.style.display="none")}function N(){function b(c){d.push(e);if(null!=c.replies)for(var f=0;f<c.replies.length;f++)e=e.nextSibling,b(c.replies[f])}var d=[],e=O;b(c);return{pdiv:e,replies:d}}function x(e,f,g,p,t){function u(){l(C);c.addReply(x,function(b){x.id=b;c.replies.push(x);m(C);g&&g()},function(c){v();q(C);b.handleError(c,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},p,t)}function v(){d(x,C,function(b){u()},!0)}var A=N().pdiv,x=b.newComment(e,b.getCurrentUser());x.pCommentId=c.id;null==c.replies&&(c.replies=[]);var C=n(x,c.replies,A,k+1);f?v():u()}if(p||!c.isResolved){G.style.display="none";var O=document.createElement("div");O.className="geCommentContainer";O.setAttribute("data-commentId",c.id);O.style.marginLeft=20*k+5+"px";c.isResolved&&!Editor.isDarkMode()&&(O.style.backgroundColor="ghostWhite");
var I=document.createElement("div");I.className="geCommentHeader";var T=document.createElement("img");T.className="geCommentUserImg";T.src=c.user.pictureUrl||Editor.userImage;I.appendChild(T);T=document.createElement("div");T.className="geCommentHeaderTxt";I.appendChild(T);var D=document.createElement("div");D.className="geCommentUsername";mxUtils.write(D,c.user.displayName||"");T.appendChild(D);D=document.createElement("div");D.className="geCommentDate";D.setAttribute("data-commentId",c.id);f(c,
-D);T.appendChild(D);O.appendChild(I);I=document.createElement("div");I.className="geCommentTxt";mxUtils.write(I,c.content||"");O.appendChild(I);c.isLocked&&(O.style.opacity="0.5");I=document.createElement("div");I.className="geCommentActions";var J=document.createElement("ul");J.className="geCommentActionsList";I.appendChild(J);v||c.isLocked||0!=k&&!u||A(mxResources.get("reply"),function(){x("",!0)},c.isResolved);T=b.getCurrentUser();null==T||T.id!=c.user.id||v||c.isLocked||(A(mxResources.get("edit"),
-function(){function e(){d(c,O,function(){l(O);c.editComment(c.content,function(){p(O)},function(c){m(O);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),A(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(O);c.deleteComment(function(b){if(!0===b){b=O.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=O.querySelectorAll(".geCommentAction");for(b=
-0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);p(O);O.style.opacity="0.5"}else{d=N(c).replies;for(b=0;b<d.length;b++)C.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}G.style.display=0==C.getElementsByTagName("div").length?"block":"none"}},function(c){m(O);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));v||c.isLocked||0!=k||A(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
+D);T.appendChild(D);O.appendChild(I);I=document.createElement("div");I.className="geCommentTxt";mxUtils.write(I,c.content||"");O.appendChild(I);c.isLocked&&(O.style.opacity="0.5");I=document.createElement("div");I.className="geCommentActions";var J=document.createElement("ul");J.className="geCommentActionsList";I.appendChild(J);u||c.isLocked||0!=k&&!v||A(mxResources.get("reply"),function(){x("",!0)},c.isResolved);T=b.getCurrentUser();null==T||T.id!=c.user.id||u||c.isLocked||(A(mxResources.get("edit"),
+function(){function e(){d(c,O,function(){l(O);c.editComment(c.content,function(){m(O)},function(c){q(O);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}e()},c.isResolved),A(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){l(O);c.deleteComment(function(b){if(!0===b){b=O.querySelector(".geCommentTxt");b.innerHTML="";mxUtils.write(b,mxResources.get("msgDeleted"));var d=O.querySelectorAll(".geCommentAction");for(b=
+0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);m(O);O.style.opacity="0.5"}else{d=N(c).replies;for(b=0;b<d.length;b++)C.removeChild(d[b]);for(b=0;b<e.length;b++)if(e[b]==c){e.splice(b,1);break}G.style.display=0==C.getElementsByTagName("div").length?"block":"none"}},function(c){q(O);b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},c.isResolved));u||c.isLocked||0!=k||A(c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(b){function d(){var d=
b.target;d.innerHTML="";c.isResolved=!c.isResolved;mxUtils.write(d,c.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var e=c.isResolved?"none":"",f=N(c).replies,g=Editor.isDarkMode()?"transparent":c.isResolved?"ghostWhite":"white",k=0;k<f.length;k++){f[k].style.backgroundColor=g;for(var l=f[k].querySelectorAll(".geCommentAction"),m=0;m<l.length;m++)l[m]!=d.parentNode&&(l[m].style.display=e);H||(f[k].style.display="none")}t()}c.isResolved?x(mxResources.get("reOpened")+": ",!0,
-d,!1,!0):x(mxResources.get("markedAsResolved"),!1,d,!0)});O.appendChild(I);null!=g?C.insertBefore(O,g.nextSibling):C.appendChild(O);for(g=0;null!=c.replies&&g<c.replies.length;g++)I=c.replies[g],I.isResolved=c.isResolved,q(I,c.replies,null,k+1,n);null!=y&&(y.comment.id==c.id?(n=c.content,c.content=y.comment.content,d(c,O,y.saveCallback,y.deleteOnCancel),c.content=n):null==y.comment.id&&y.comment.pCommentId==c.id&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return O}}
-var v=!b.canComment(),u=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var D=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.bottom=parseInt(D)+7+"px";x.appendChild(C);var G=document.createElement("span");G.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(G,mxResources.get("noCommentsFound"));var J=document.createElement("div");J.className="geToolbarContainer geCommentsToolbar";J.style.height=D;J.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";J.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D=document.createElement("a");D.className="geButton";if(!v){var L=D.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;K.push(c);p(g)},function(c){m(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=q(f,K,null,0);e();c.preventDefault();mxEvent.consume(c)});J.appendChild(L)}L=D.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
+d,!1,!0):x(mxResources.get("markedAsResolved"),!1,d,!0)});O.appendChild(I);null!=g?C.insertBefore(O,g.nextSibling):C.appendChild(O);for(g=0;null!=c.replies&&g<c.replies.length;g++)I=c.replies[g],I.isResolved=c.isResolved,n(I,c.replies,null,k+1,p);null!=y&&(y.comment.id==c.id?(p=c.content,c.content=y.comment.content,d(c,O,y.saveCallback,y.deleteOnCancel),c.content=p):null==y.comment.id&&y.comment.pCommentId==c.id&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel)));return O}}
+var u=!b.canComment(),v=b.canReplyToReplies(),y=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var D=EditorUi.compactUi?"26px":"30px",C=document.createElement("div");C.className="geCommentsList";C.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C.style.bottom=parseInt(D)+7+"px";x.appendChild(C);var G=document.createElement("span");G.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(G,mxResources.get("noCommentsFound"));var J=document.createElement("div");J.className="geToolbarContainer geCommentsToolbar";J.style.height=D;J.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";J.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D=document.createElement("a");D.className="geButton";if(!u){var L=D.cloneNode();L.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';L.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(L,"click",function(c){function e(){d(f,g,function(c){l(g);b.addComment(c,function(b){c.id=b;K.push(c);m(g)},function(c){q(g);e();b.handleError(c,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var f=b.newComment("",b.getCurrentUser()),g=n(f,K,null,0);e();c.preventDefault();mxEvent.consume(c)});J.appendChild(L)}L=D.cloneNode();L.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';L.setAttribute("title",mxResources.get("showResolved"));
var H=!1;Editor.isDarkMode()&&(L.style.filter="invert(100%)");mxEvent.addListener(L,"click",function(b){this.className=(H=!H)?"geButton geCheckedBtn":"geButton";A();b.preventDefault();mxEvent.consume(b)});J.appendChild(L);b.commentsRefreshNeeded()&&(L=D.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',L.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(b){A();
-b.preventDefault();mxEvent.consume(b)}),J.appendChild(L));b.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(b){n();b.preventDefault();mxEvent.consume(b)}),J.appendChild(D));x.appendChild(J);var K=[],A=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
-var c=y.div.querySelector(".geCommentEditTxtArea"),e=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(N){b.handleError(N)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";u=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
-new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});C.innerHTML="";C.appendChild(G);G.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),q(K[b],K,null,0,H);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
+b.preventDefault();mxEvent.consume(b)}),J.appendChild(L));b.commentsSaveNeeded()&&(D=D.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',D.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(b){p();b.preventDefault();mxEvent.consume(b)}),J.appendChild(D));x.appendChild(J);var K=[],A=mxUtils.bind(this,function(){this.hasError=!1;if(null!=y)try{y.div=y.div.cloneNode(!0);
+var c=y.div.querySelector(".geCommentEditTxtArea"),e=y.div.querySelector(".geCommentEditBtns");y.comment.content=c.value;c.parentNode.removeChild(c);e.parentNode.removeChild(e)}catch(N){b.handleError(N)}C.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";v=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(b){function c(b){if(null!=b){b.sort(function(b,c){return new Date(b.modifiedDate)-
+new Date(c.modifiedDate)});for(var d=0;d<b.length;d++)c(b[d].replies)}}b.sort(function(b,c){return new Date(b.modifiedDate)-new Date(c.modifiedDate)});C.innerHTML="";C.appendChild(G);G.style.display="block";K=b;for(b=0;b<K.length;b++)c(K[b].replies),n(K[b],K,null,0,H);null!=y&&null==y.comment.id&&null==y.comment.pCommentId&&(C.appendChild(y.div),d(y.comment,y.div,y.saveCallback,y.deleteOnCancel))},mxUtils.bind(this,function(b){C.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(b&&b.message?
": "+b.message:""));this.hasError=!0})):C.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});A();this.refreshComments=A;J=mxUtils.bind(this,function(){function b(c){var e=d[c.id];if(null!=e)for(f(c,e),e=0;null!=c.replies&&e<c.replies.length;e++)b(c.replies[e])}if(this.window.isVisible()){for(var c=C.querySelectorAll(".geCommentDate"),d={},e=0;e<c.length;e++){var g=c[e];d[g.getAttribute("data-commentId")]=g}for(e=0;e<K.length;e++)b(K[e])}});setInterval(J,6E4);this.refreshCommentsTime=J;this.window=
new mxWindow(mxResources.get("comments"),x,c,e,k,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(b,c){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;b=Math.max(0,Math.min(b,(window.innerWidth||
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));c=Math.max(0,Math.min(c,d-this.table.clientHeight-48));this.getX()==b&&this.getY()==c||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var b=this.window.getX(),c=this.window.getY();this.window.setLocation(b,c)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(b,c,e,
-k,g,n,t,d,f,l,m){var p=document.createElement("div");p.style.textAlign="center";m=null!=m?m:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=m+"px";q.style.lineHeight="1.2em";mxUtils.write(q,c);p.appendChild(q);null!=l&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),q.appendChild(c),p.appendChild(q));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
-"nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k(v.checked)});n.className="geBtn";null!=d&&(n.innerHTML=d+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&l.appendChild(n);var u=mxUtils.button(g||mxResources.get("ok"),function(){b.hideDialog();null!=e&&e(v.checked)});l.appendChild(u);null!=t?(u.innerHTML=
-t+"<br>"+u.innerHTML+"<br>",u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.className="geBtn",u.style.width="40%"):u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(n);p.appendChild(l);f?(l.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(v),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),q.appendChild(g),p.appendChild(q),mxEvent.addListener(g,
-"click",function(b){v.checked=!v.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){u.focus()};this.container=p};function DiagramPage(b,c){this.node=b;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")};
+k,g,p,t,d,f,l,q){var m=document.createElement("div");m.style.textAlign="center";q=null!=q?q:44;var n=document.createElement("div");n.style.padding="6px";n.style.overflow="auto";n.style.maxHeight=q+"px";n.style.lineHeight="1.2em";mxUtils.write(n,c);m.appendChild(n);null!=l&&(n=document.createElement("div"),n.style.padding="6px 0 6px 0",c=document.createElement("img"),c.setAttribute("src",l),n.appendChild(c),m.appendChild(n));l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace=
+"nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=k&&k(u.checked)});p.className="geBtn";null!=d&&(p.innerHTML=d+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&l.appendChild(p);var v=mxUtils.button(g||mxResources.get("ok"),function(){b.hideDialog();null!=e&&e(u.checked)});l.appendChild(v);null!=t?(v.innerHTML=
+t+"<br>"+v.innerHTML+"<br>",v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.className="geBtn",v.style.width="40%"):v.className="geBtn gePrimaryBtn";b.editor.cancelFirst||l.appendChild(p);m.appendChild(l);f?(l.style.marginTop="10px",n=document.createElement("p"),n.style.marginTop="20px",n.style.marginBottom="0px",n.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),n.appendChild(g),m.appendChild(n),mxEvent.addListener(g,
+"click",function(b){u.checked=!u.checked;mxEvent.consume(b)})):l.style.marginTop="12px";this.init=function(){v.focus()};this.container=m};function DiagramPage(b,c){this.node=b;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(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,c,e){this.ui=b;this.page=c;this.previous=this.name=e}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,c,e){this.ui=b;this.oldIndex=c;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,c,e){this.ui=b;this.previousPage=this.page=c;this.neverShown=!0;null!=c&&(this.neverShown=null==c.viewState,this.ui.updatePageRoot(c),null!=e&&(c.viewState=e,this.neverShown=!1))}
@@ -3766,15 +3767,15 @@ function ChangePage(b,c,e,k,g){SelectPage.call(this,b,e);this.relatedPage=c;this
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
EditorUi.prototype.getPageIndex=function(b){var c=null;if(null!=this.pages&&null!=b)for(var e=0;e<this.pages.length;e++)if(this.pages[e]==b){c=e;break}return c};EditorUi.prototype.getPageById=function(b){if(null!=this.pages)for(var c=0;c<this.pages.length;c++)if(this.pages[c].getId()==b)return this.pages[c];return null};
EditorUi.prototype.createImageForPageLink=function(b,c,e){var k=b.indexOf(","),g=null;0<k&&(k=this.getPageById(b.substring(k+1)),null!=k&&k!=c&&(g=this.getImageForPage(k,c,e),g.originalSrc=b));null==g&&(g={originalSrc:b});return g};
-EditorUi.prototype.getImageForPage=function(b,c,e){e=null!=e?e:this.editor.graph;var k=e.getGlobalVariable;e=this.createTemporaryGraph(e.getStylesheet());var g=this.getPageIndex(null!=c?c:this.currentPage);e.getGlobalVariable=function(b){return"pagenumber"==b?g+1:"page"==b&&null!=c?c.getName():k.apply(this,arguments)};document.body.appendChild(e.container);this.updatePageRoot(b);e.model.setRoot(b.root);b=e.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var n=e.getGraphBounds();
-document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),n.width,n.height,n.x,n.y)};
+EditorUi.prototype.getImageForPage=function(b,c,e){e=null!=e?e:this.editor.graph;var k=e.getGlobalVariable;e=this.createTemporaryGraph(e.getStylesheet());var g=this.getPageIndex(null!=c?c:this.currentPage);e.getGlobalVariable=function(b){return"pagenumber"==b?g+1:"page"==b&&null!=c?c.getName():k.apply(this,arguments)};document.body.appendChild(e.container);this.updatePageRoot(b);e.model.setRoot(b.root);b=e.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var p=e.getGraphBounds();
+document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),p.width,p.height,p.x,p.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,c=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var e=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";e!=this.tabContainer.style.height&&this.refresh(!1)}c.apply(b.view,arguments)});var e=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var c=this.currentPage;null!=c&&c!=e&&(null==c.viewState||null==c.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+c.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+c.viewState.scrollTop),e=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(b,c){for(var e=c.getProperty("edit").changes,d=0;d<e.length;d++)if(e[d]instanceof SelectPage||e[d]instanceof RenamePage||e[d]instanceof MovePage||e[d]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,c,e){b=null!=b?this.getPageById(b.getId()):null;var k=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,c):(k.setViewState(c),this.editor.updateGraphComponents(),k.view.revalidate(),k.sizeDidChange()),k.container.scrollLeft=k.view.translate.x*k.view.scale+c.scrollLeft,k.container.scrollTop=k.view.translate.y*k.view.scale+c.scrollTop,k.restoreSelection(e))};
-Graph.prototype.createViewState=function(b){var c=b.getAttribute("page"),e=parseFloat(b.getAttribute("pageScale")),k=parseFloat(b.getAttribute("pageWidth")),g=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),t=this.parseBackgroundImage(b.getAttribute("backgroundImage")),d=b.getAttribute("extFonts");if(d)try{d=d.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:t,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(k)||isNaN(g)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+Graph.prototype.createViewState=function(b){var c=b.getAttribute("page"),e=parseFloat(b.getAttribute("pageScale")),k=parseFloat(b.getAttribute("pageWidth")),g=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),t=this.parseBackgroundImage(b.getAttribute("backgroundImage")),d=b.getAttribute("extFonts");if(d)try{d=d.split("|").map(function(b){b=b.split("^");return{name:b[0],url:b[1]}})}catch(f){console.log("ExtFonts format error: "+f.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=c?"0"!=c:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:t,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(k)||isNaN(g)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,k,g),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:d||[]}};
Graph.prototype.saveViewState=function(b,c,e,k){e||(c.setAttribute("grid",null==b||b.gridEnabled?"1":"0"),c.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),c.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),c.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),c.setAttribute("connect",null==b||b.connect?"1":"0"),c.setAttribute("arrows",null==b||b.arrows?"1":"0"),c.setAttribute("page",null==b&&this.defaultPageVisible||null!=b&&b.pageVisible?"1":"0"),c.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));c.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);e=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=e&&(c.setAttribute("pageWidth",e.width),c.setAttribute("pageHeight",e.height));null!=b&&(null!=b.background&&c.setAttribute("background",b.background),k=this.getBackgroundImageObject(b.backgroundImage,k),null!=k&&c.setAttribute("backgroundImage",
@@ -3790,17 +3791,17 @@ Graph.prototype.addExtFont=function(b,c,e){if(b&&c){"1"!=urlParams["ext-fonts"]&
this.extFonts&&(this.extFonts=[]);e=this.extFonts;k=!0;for(g=0;g<e.length;g++)if(e[g].name==b){k=!1;break}k&&this.extFonts.push({name:b,url:c})}}};
EditorUi.prototype.updatePageRoot=function(b,c){if(null==b.root){var e=this.editor.extractGraphModel(b.node,null,c),k=Editor.extractParserError(e);if(k)throw Error(k);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),k=new mxCodec(e.ownerDocument),b.root=k.decode(e).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(e))throw Error(k);null!=e&&(b.graphModelNode=
e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,c,e){try{if(b!=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 k=this.editor.graph.model.createUndoableEdit();k.ignoreEdit=!0;var g=new SelectPage(this,b,e);g.execute();k.add(g);k.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",k))}}catch(n){this.handleError(n)}};
+EditorUi.prototype.selectPage=function(b,c,e){try{if(b!=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 k=this.editor.graph.model.createUndoableEdit();k.ignoreEdit=!0;var g=new SelectPage(this,b,e);g.execute();k.add(g);k.notify();this.editor.graph.tooltipHandler.hide();c||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",k))}}catch(p){this.handleError(p)}};
EditorUi.prototype.selectNextPage=function(b){var c=this.currentPage;null!=c&&null!=this.pages&&(c=mxUtils.indexOf(this.pages,c),b?this.selectPage(this.pages[mxUtils.mod(c+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(c-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(b,c){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:this.createPage(null,this.createPageId());c=null!=c?c:this.pages.length;var e=new ChangePage(this,b,b,c);this.editor.graph.model.execute(e)}return b};EditorUi.prototype.createPageId=function(){var b;do b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,c){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),c);e.setName(null!=b?b:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var b={},c=0;c<this.pages.length;c++){var e=this.pages[c].getName();null!=e&&0<e.length&&(b[e]=e)}c=this.pages.length;do e=mxResources.get("pageWithNumber",[++c]);while(null!=b[e]);return e};
EditorUi.prototype.removePage=function(b){try{var c=this.editor.graph,e=mxUtils.indexOf(this.pages,b);if(c.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);c.model.beginUpdate();try{var k=this.currentPage;k==b&&1<this.pages.length?(e==this.pages.length-1?e--:e++,k=this.pages[e]):1>=this.pages.length&&(k=this.insertPage(),c.model.execute(new RenamePage(this,k,mxResources.get("pageWithNumber",[1]))));c.model.execute(new ChangePage(this,b,k))}finally{c.model.endUpdate()}}}catch(g){this.handleError(g)}return b};
-EditorUi.prototype.duplicatePage=function(b,c){var e=null;try{var k=this.editor.graph;if(k.isEnabled()){k.isEditing()&&k.stopEditing();var g=b.node.cloneNode(!1);g.removeAttribute("id");var n={},t=k.createCellLookup([k.model.root]),e=new DiagramPage(g);e.root=k.cloneCell(k.model.root,null,n);e.viewState=k.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(c);e=this.insertPage(e,mxUtils.indexOf(this.pages,
-b)+1);k.updateCustomLinks(k.createCellMapping(n,t),[e.root])}}catch(d){this.handleError(d)}return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,b,c))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return b};
+EditorUi.prototype.duplicatePage=function(b,c){var e=null;try{var k=this.editor.graph;if(k.isEnabled()){k.isEditing()&&k.stopEditing();var g=b.node.cloneNode(!1);g.removeAttribute("id");var p={},t=k.createCellLookup([k.model.root]),e=new DiagramPage(g);e.root=k.cloneCell(k.model.root,null,p);e.viewState=k.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(c);e=this.insertPage(e,mxUtils.indexOf(this.pages,
+b)+1);k.updateCustomLinks(k.createCellMapping(p,t),[e.root])}}catch(d){this.handleError(d)}return e};EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var c=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&this.editor.graph.model.execute(new RenamePage(this,b,c))}),mxResources.get("rename"));this.showDialog(c.container,300,80,!0,!0);c.init()}return b};
EditorUi.prototype.movePage=function(b,c){this.editor.graph.model.execute(new MovePage(this,b,c))};EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,c=document.createElement("div");c.style.position="relative";c.style.display="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 e=this.editor.isChromelessView()?29:59,k=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-e)/this.pages.length)+
-1),g=null,n=0;n<this.pages.length;n++)mxUtils.bind(this,function(d,e){this.pages[d]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){b.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=d):mxEvent.consume(c)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(b){g=null;b.stopPropagation();
-b.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(b){null!=g&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(b){null!=g&&d!=g&&this.movePage(g,d);b.stopPropagation();b.preventDefault()}));c.appendChild(e)})(n,this.createTabForPage(this.pages[n],k,this.pages[n]!=this.currentPage,n+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);k=this.createPageMenuTab();this.tabContainer.appendChild(k);
+1),g=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(d,e){this.pages[d]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#fff"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(c){b.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=d):mxEvent.consume(c)}));mxEvent.addListener(e,"dragend",mxUtils.bind(this,function(b){g=null;b.stopPropagation();
+b.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(b){null!=g&&(b.dataTransfer.dropEffect="move");b.stopPropagation();b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(b){null!=g&&d!=g&&this.movePage(g,d);b.stopPropagation();b.preventDefault()}));c.appendChild(e)})(p,this.createTabForPage(this.pages[p],k,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(c);k=this.createPageMenuTab();this.tabContainer.appendChild(k);
k=null;this.isPageInsertTabVisible()&&(k=this.createPageInsertTab(),this.tabContainer.appendChild(k));if(c.clientWidth>this.tabContainer.clientWidth-e){null!=k&&(k.style.position="absolute",k.style.right="0px",c.style.marginRight="30px");var t=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");t.style.position="absolute";t.style.right=this.editor.chromeless?"29px":"55px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var d=this.createControlTab(4,"&nbsp;&#10095;");d.style.position="absolute";
d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));c.style.width=f+"px";mxEvent.addListener(t,"click",mxUtils.bind(this,function(b){c.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}));mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,
c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){c.scrollLeft+=Math.max(20,f-20);mxUtils.setOpacity(t,0<c.scrollLeft?100:50);mxUtils.setOpacity(d,c.scrollLeft<c.scrollWidth-c.clientWidth?100:50);mxEvent.consume(b)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
@@ -3810,58 +3811,58 @@ EditorUi.prototype.createControlTab=function(b,c,e){e=this.createTab(null!=e?e:!
EditorUi.prototype.createPageMenuTab=function(b){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var c=b.getElementsByTagName("div")[0];c.style.display="inline-block";c.style.marginTop="5px";c.style.width="21px";c.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();
var c=new mxPopupMenu(mxUtils.bind(this,function(b,c){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this,function(d){var e=b.addItem(this.pages[d].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[d])}),c),f=this.pages[d].getId();e.setAttribute("title",this.pages[d].getName()+(null!=f?" ("+f+")":"")+" ["+(d+1)+"]");this.pages[d]==this.currentPage&&b.addCheckmark(e,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){b.addSeparator(c);b.addItem(mxResources.get("insertPage"),
null,mxUtils.bind(this,function(){this.insertPage()}),c);var e=this.currentPage;null!=e&&(b.addSeparator(c),d=e.getName(),b.addItem(mxResources.get("removeIt",[d]),null,mxUtils.bind(this,function(){this.removePage(e)}),c),b.addItem(mxResources.get("renameIt",[d]),null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),c),b.addSeparator(c),b.addItem(mxResources.get("duplicateIt",[d]),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.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 e=mxEvent.getClientX(b),n=mxEvent.getClientY(b);c.popup(e,n,null,b);this.setCurrentMenu(c);mxEvent.consume(b)}));return b};
+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 e=mxEvent.getClientX(b),p=mxEvent.getClientY(b);c.popup(e,p,null,b);this.setCurrentMenu(c);mxEvent.consume(b)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.insertPage();mxEvent.consume(b)}));var c=b.getElementsByTagName("div")[0];c.style.display="inline-block";c.style.width="21px";c.style.height="21px";return b};
-EditorUi.prototype.createTabForPage=function(b,c,e,k){e=this.createTab(e);var g=b.getName()||mxResources.get("untitled"),n=b.getId();e.setAttribute("title",g+(null!=n?" ("+n+")":"")+" ["+k+"]");mxUtils.write(e,g);e.style.maxWidth=c+"px";e.style.width=c+"px";this.addTabListeners(b,e);42<c&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(b,c){mxEvent.disableContextMenu(c);var e=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(c){this.renamePage(b);mxEvent.consume(c)}));var k=!1,g=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){k=null!=this.currentMenu;g=b==this.currentPage;e.isMouseDown||g||this.selectPage(b)}),null,mxUtils.bind(this,function(n){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(n)&&g||mxEvent.isPopupTrigger(n))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!k){var t=new mxPopupMenu(this.createPageMenu(b));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);this.resetCurrentMenu();t.destroy()});var d=mxEvent.getClientX(n),f=mxEvent.getClientY(n);t.popup(d,f,null,n);this.setCurrentMenu(t,c)}mxEvent.consume(n)}}))};
+EditorUi.prototype.createTabForPage=function(b,c,e,k){e=this.createTab(e);var g=b.getName()||mxResources.get("untitled"),p=b.getId();e.setAttribute("title",g+(null!=p?" ("+p+")":"")+" ["+k+"]");mxUtils.write(e,g);e.style.maxWidth=c+"px";e.style.width=c+"px";this.addTabListeners(b,e);42<c&&(e.style.textOverflow="ellipsis");return e};
+EditorUi.prototype.addTabListeners=function(b,c){mxEvent.disableContextMenu(c);var e=this.editor.graph;mxEvent.addListener(c,"dblclick",mxUtils.bind(this,function(c){this.renamePage(b);mxEvent.consume(c)}));var k=!1,g=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){k=null!=this.currentMenu;g=b==this.currentPage;e.isMouseDown||g||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(p)&&g||mxEvent.isPopupTrigger(p))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!k){var t=new mxPopupMenu(this.createPageMenu(b));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);this.resetCurrentMenu();t.destroy()});var d=mxEvent.getClientX(p),f=mxEvent.getClientY(p);t.popup(d,f,null,p);this.setCurrentMenu(t,c)}mxEvent.consume(p)}}))};
EditorUi.prototype.getLinkForPage=function(b,c,e){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var k=this.getCurrentFile();if(null!=k&&k.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var g=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages".split(" ")),g=g+((0==g.length?"?":"&")+"page-id="+b.getId());null!=c&&(g+="&"+c.join("&"));return(e&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+g+"#"+k.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,c){return mxUtils.bind(this,function(e,k){var g=this.editor.graph;e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),k);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),k);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,c)}),k);null!=this.getLinkForPage(b)&&(e.addSeparator(k),e.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,e,d,f,k,m){c=this.createUrlParameters(c,e,d,f,k,m);d||c.push("hide-pages=1");g.isSelectionEmpty()||(d=g.getBoundingBox(g.getSelectionCells()),e=g.view.translate,k=g.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-e.x,d.y=d.y/k-e.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(c,e,d,f,k,q){c=this.createUrlParameters(c,e,d,f,k,q);d||c.push("hide-pages=1");g.isSelectionEmpty()||(d=g.getBoundingBox(g.getSelectionCells()),e=g.view.translate,k=g.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-e.x,d.y=d.y/k-e.y,c.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
f=new EmbedDialog(this,this.getLinkForPage(b,c,f));this.showDialog(f.container,440,240,!0,!0);f.init()}))})));e.addSeparator(k);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),k);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(k),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),k))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){b=k.oldIndex;k.oldIndex=k.newIndex;k.newIndex=b;return k};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(b,e,k){k.ui=b.ui;return e};b.afterDecode=function(b,e,k){b=k.previous;k.previous=k.name;k.name=b;return k};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),c="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");b.afterEncode=function(b,k,g){g.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(g.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&g.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(b,e){return 0>mxUtils.indexOf(c,
b)?e:void 0})),null!=k.relatedPage.root&&b.encodeCell(k.relatedPage.root,g));return g};b.beforeDecode=function(b,c,g){g.ui=b.ui;g.relatedPage=g.ui.getPageById(c.getAttribute("relatedPage"));if(null==g.relatedPage){var e=c.ownerDocument.createElement("diagram");e.setAttribute("id",c.getAttribute("relatedPage"));e.setAttribute("name",c.getAttribute("name"));g.relatedPage=new DiagramPage(e);e=c.getAttribute("viewState");null!=e&&(g.relatedPage.viewState=JSON.parse(e),c.removeAttribute("viewState"));
-c=c.cloneNode(!0);e=c.firstChild;if(null!=e)for(g.relatedPage.root=b.decodeCell(e,!1),g=e.nextSibling,e.parentNode.removeChild(e),e=g;null!=e;){g=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==b.lookup(k)&&b.decodeCell(e)}e.parentNode.removeChild(e);e=g}}return c};b.afterDecode=function(b,c,g){g.index=g.previousIndex;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,e,n,t,d){e=null!=e?e:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var f=n.slice(),g=0;g<n.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[g]),"treeFolding","0")&&this.foldTreeCell(c,n[g]);n=f;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=
+c=c.cloneNode(!0);e=c.firstChild;if(null!=e)for(g.relatedPage.root=b.decodeCell(e,!1),g=e.nextSibling,e.parentNode.removeChild(e),e=g;null!=e;){g=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==b.lookup(k)&&b.decodeCell(e)}e.parentNode.removeChild(e);e=g}}return c};b.afterDecode=function(b,c,g){g.index=g.previousIndex;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,e,p,t,d){e=null!=e?e:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var f=p.slice(),g=0;g<p.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[g]),"treeFolding","0")&&this.foldTreeCell(c,p[g]);p=f;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
function(b,c){this.model.beginUpdate();try{var e=[];this.traverse(c,!0,mxUtils.bind(this,function(b,f){var d=null!=f&&this.isTreeEdge(f);d&&e.push(f);b==c||null!=f&&!d||e.push(b);return(null==f||d)&&(b==c||!this.model.isCollapsed(b))}));this.model.setCollapsed(c,b);for(var g=0;g<e.length;g++)this.model.setVisible(e[g],!b)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(b){return!this.isEdgeIgnored(b)};Graph.prototype.getTreeEdges=function(b,c,e,t,d,f){return this.model.filterCells(this.getEdges(b,
c,e,t,d,f),mxUtils.bind(this,function(b){return this.isTreeEdge(b)}))};Graph.prototype.getIncomingTreeEdges=function(b,c){return this.getTreeEdges(b,c,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(b,c){return this.getTreeEdges(b,c,!1,!0,!1)};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 b(b){return y.isVertex(b)&&e(b)}function c(b){var c=
-!1;null!=b&&(c="1"==u.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=y.getParent(b),c=u.view.getState(b),c="tree"==(null!=c?c.style:u.getCellStyle(b)).containerType);return c}function t(b){var c=!1;null!=b&&(b=y.getParent(b),c=u.view.getState(b),u.view.getState(b),c=null!=(null!=c?c.style:u.getCellStyle(b)).childLayout);return c}function d(b){b=u.view.getState(b);if(null!=b){var c=u.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=u.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
-null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(b,c){c=null!=c?c:!0;u.model.beginUpdate();try{var e=u.model.getParent(b),f=u.getIncomingTreeEdges(b),g=u.cloneCells([f[0],b]);u.model.setTerminal(g[0],u.model.getTerminal(f[0],
-!0),!0);var k=d(b),l=e.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;u.view.currentRoot!=e&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var m=u.view.getState(b),n=u.view.scale;if(null!=m){var p=mxRectangle.fromRectangle(m);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?p.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*n:p.y+=(c?
-b.geometry.height+10:-g[1].geometry.height-10)*n;var q=u.getOutgoingTreeEdges(u.model.getTerminal(f[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,v=l=f=0;v<q.length;v++){var A=u.model.getTerminal(q[v],!1);if(k==d(A)){var C=u.view.getState(A);A!=b&&null!=C&&(t&&c!=C.getCenterX()<m.getCenterX()||!t&&c!=C.getCenterY()<m.getCenterY())&&mxUtils.intersects(p,C)&&(f=10+Math.max(f,(Math.min(p.x+p.width,C.x+C.width)-Math.max(p.x,C.x))/n),l=10+Math.max(l,(Math.min(p.y+
-p.height,C.y+C.height)-Math.max(p.y,C.y))/n))}}t?l=0:f=0;for(v=0;v<q.length;v++)if(A=u.model.getTerminal(q[v],!1),k==d(A)&&(C=u.view.getState(A),A!=b&&null!=C&&(t&&c!=C.getCenterX()<m.getCenterX()||!t&&c!=C.getCenterY()<m.getCenterY()))){var x=[];u.traverse(C.cell,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&x.push(c);(null==c||d)&&x.push(b);return null==c||d});u.moveCells(x,(c?1:-1)*f,(c?1:-1)*l)}}}return u.addCells(g,e)}finally{u.model.endUpdate()}}function l(b){u.model.beginUpdate();try{var c=
-d(b),e=u.getIncomingTreeEdges(b),f=u.cloneCells([e[0],b]);u.model.setTerminal(e[0],f[1],!1);u.model.setTerminal(f[0],f[1],!0);u.model.setTerminal(f[0],b,!1);var g=u.model.getParent(b),k=g.geometry,l=[];u.view.currentRoot!=g&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);u.traverse(b,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var m=b.geometry.width+40,n=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?m=0:c==mxConstants.DIRECTION_NORTH?
-(m=0,n=-n):c==mxConstants.DIRECTION_WEST?(m=-m,n=0):c==mxConstants.DIRECTION_EAST&&(n=0);u.moveCells(l,m,n);return u.addCells(f,g)}finally{u.model.endUpdate()}}function m(b,c){u.model.beginUpdate();try{var e=u.model.getParent(b),f=u.getIncomingTreeEdges(b),g=d(b);0==f.length&&(f=[u.createEdge(e,null,"",null,null,u.createCurrentEdgeStyle())],g=c);var k=u.cloneCells([f[0],b]);u.model.setTerminal(k[0],b,!0);if(null==u.model.getTerminal(k[0],!1)){u.model.setTerminal(k[0],k[1],!1);var l=u.getCellStyle(k[1]).newEdgeStyle;
-if(null!=l)try{var m=JSON.parse(l),n;for(n in m)u.setCellStyles(n,m[n],[k[0]]),"edgeStyle"==n&&"elbowEdgeStyle"==m[n]&&u.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(W){}}var f=u.getOutgoingTreeEdges(b),p=e.geometry,l=[];u.view.currentRoot==e&&(p=new mxRectangle);for(m=0;m<f.length;m++){var q=u.model.getTerminal(f[m],!1);null!=q&&l.push(q)}var t=u.view.getBounds(l),v=u.view.translate,A=u.view.scale;g==mxConstants.DIRECTION_SOUTH?
-(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/A-v.x-p.x+10,k[1].geometry.y+=k[1].geometry.height-p.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/A-v.x+-p.x+10,k[1].geometry.y-=k[1].geometry.height+p.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+p.x+40):k[1].geometry.x+(k[1].geometry.width-p.x+40),k[1].geometry.y=null==t?b.geometry.y+
-(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/A-v.y+-p.y+10);return u.addCells(k,e)}finally{u.model.endUpdate()}}function p(b,c,d){b=u.getOutgoingTreeEdges(b);d=u.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=u.view.getState(u.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
-d.y-d.height})}return e}function q(b,c){var e=d(b),f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST)==f&&e!=c?v.actions.get("selectParent").funct():e==c?(f=u.getOutgoingTreeEdges(b),null!=f&&0<f.length&&u.setSelectionCell(u.model.getTerminal(f[0],!1))):(e=u.getIncomingTreeEdges(b),null!=e&&0<e.length&&(f=p(u.model.getTerminal(e[0],!0),f,b),e=u.view.getState(b),null!=e&&(e=mxUtils.indexOf(f,e),0<=e&&(e+=c==mxConstants.DIRECTION_NORTH||
-c==mxConstants.DIRECTION_WEST?-1:1,0<=e&&e<=f.length-1&&u.setSelectionCell(f[e].cell)))))}var v=this,u=v.editor.graph,y=u.getModel(),x=v.menus.createPopupMenu;v.menus.createPopupMenu=function(c,d,e){x.apply(this,arguments);if(1==u.getSelectionCount()){d=u.getSelectionCell();var f=u.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(u.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(u.getSelectionCell())?(c.addSeparator(),
-0<u.getIncomingTreeEdges(d).length&&this.addMenuItems(c,["selectSiblings","selectParent"],null,e)):0<u.model.getEdgeCount(d)&&this.addMenuItems(c,["selectConnections"],null,e)}};v.actions.addAction("selectChildren",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var b=u.getSelectionCell(),b=u.getOutgoingTreeEdges(b);if(null!=b){for(var c=[],d=0;d<b.length;d++)c.push(u.model.getTerminal(b[d],!1));u.setSelectionCells(c)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&
-1==u.getSelectionCount()){var b=u.getSelectionCell(),b=u.getIncomingTreeEdges(b);if(null!=b&&0<b.length&&(b=u.getOutgoingTreeEdges(u.model.getTerminal(b[0],!0)),null!=b)){for(var c=[],d=0;d<b.length;d++)c.push(u.model.getTerminal(b[d],!1));u.setSelectionCells(c)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var b=u.getSelectionCell(),b=u.getIncomingTreeEdges(b);null!=b&&0<b.length&&u.setSelectionCell(u.model.getTerminal(b[0],
-!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(b,c){var d=u.getSelectionCell();if(u.isEnabled()&&u.model.isVertex(d)){if(null!=c&&mxEvent.isAltDown(c))u.setSelectionCells(u.model.getTreeEdges(d,null==c||!mxEvent.isShiftDown(c),null==c||!mxEvent.isControlDown(c)));else{var e=[];u.traverse(d,!0,function(b,d){var f=null!=d&&u.isTreeEdge(d);f&&e.push(d);null!=d&&!f||null!=c&&mxEvent.isShiftDown(c)||e.push(b);return null==d||f})}u.setSelectionCells(e)}},null,null,"Alt+Shift+D");
-var D=u.removeCells;u.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];u.traverse(k,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=u.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
-f;return D.apply(this,arguments)};v.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var C=u.duplicateCells;u.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=u.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=u.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=C.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
-u.getIncomingTreeEdges(l[f]),k=u.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var n=this.cloneCell(k[0]);this.addEdge(n,u.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var G=u.moveCells;u.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var n=g,p=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||u.model.isEdge(c[q])&&null==u.model.getTerminal(c[q],
-!0)){g=u.model.getParent(c[q]);break}if(null!=n&&g!=n&&null!=this.view.getState(c[0])){var t=u.getIncomingTreeEdges(c[0]);if(0<t.length){var v=u.view.getState(u.model.getTerminal(t[0],!0));if(null!=v){var A=u.view.getState(n);null!=A&&(d=(A.getCenterX()-v.getCenterX())/u.view.scale,e=(A.getCenterY()-v.getCenterY())/u.view.scale)}}}}m=G.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
-!0))&&this.model.setTerminal(m[q],n,!0);else if(b(c[q])&&(t=u.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(n)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==u.getIncomingTreeEdges(m[q]).length){p=n;if(null==p||p==u.model.getParent(c[q]))p=u.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,u.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=v.sidebar){var J=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=
-function(c,d,e,f){var g=u.model,k=null;g.beginUpdate();try{if(k=J.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=u.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},H=v.onKeyDown;v.onKeyDown=function(c){try{if(u.isEnabled()&&
-!u.isEditing()&&b(u.getSelectionCell())&&1==u.getSelectionCount()){var d=null;0<u.getIncomingTreeEdges(u.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(u.getSelectionCell()):m(u.getSelectionCell()):13==c.which&&(d=f(u.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&u.model.isEdge(d[0])?u.setSelectionCell(u.model.getTerminal(d[0],!1)):u.setSelectionCell(d[d.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(u.view.getState(u.getSelectionCell())),
-u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(q(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(q(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(q(u.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(q(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(c))}}catch(E){v.handleError(E)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var K=u.connectVertex;u.connectVertex=function(c,e,g,k,n,p,q){var t=u.getIncomingTreeEdges(c);if(b(c)){var v=d(c),A=v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST,C=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return v==e||0==t.length?m(c,e):A==C?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return K.apply(this,arguments)};u.getSubtree=function(d){var e=
-[d];!c(d)&&!b(d)||t(d)||u.traverse(d,!0,function(b,c){var d=null!=c&&u.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var A=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){A.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+!1;null!=b&&(c="1"==v.getCurrentCellStyle(b).treeMoving);return c}function e(b){var c=!1;null!=b&&(b=y.getParent(b),c=v.view.getState(b),c="tree"==(null!=c?c.style:v.getCellStyle(b)).containerType);return c}function t(b){var c=!1;null!=b&&(b=y.getParent(b),c=v.view.getState(b),v.view.getState(b),c=null!=(null!=c?c.style:v.getCellStyle(b)).childLayout);return c}function d(b){b=v.view.getState(b);if(null!=b){var c=v.getIncomingTreeEdges(b.cell);if(0<c.length&&(c=v.view.getState(c[0]),null!=c&&(c=c.absolutePoints,
+null!=c&&0<c.length&&(c=c[c.length-1],null!=c)))){if(c.y==b.y&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_SOUTH;if(c.y==b.y+b.height&&Math.abs(c.x-b.getCenterX())<b.width/2)return mxConstants.DIRECTION_NORTH;if(c.x>b.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(b,c){c=null!=c?c:!0;v.model.beginUpdate();try{var e=v.model.getParent(b),f=v.getIncomingTreeEdges(b),g=v.cloneCells([f[0],b]);v.model.setTerminal(g[0],v.model.getTerminal(f[0],
+!0),!0);var k=d(b),l=e.geometry;k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?g[1].geometry.x+=c?b.geometry.width+10:-g[1].geometry.width-10:g[1].geometry.y+=c?b.geometry.height+10:-g[1].geometry.height-10;v.view.currentRoot!=e&&(g[1].geometry.x-=l.x,g[1].geometry.y-=l.y);var m=v.view.getState(b),p=v.view.scale;if(null!=m){var n=mxRectangle.fromRectangle(m);k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH?n.x+=(c?b.geometry.width+10:-g[1].geometry.width-10)*p:n.y+=(c?
+b.geometry.height+10:-g[1].geometry.height-10)*p;var q=v.getOutgoingTreeEdges(v.model.getTerminal(f[0],!0));if(null!=q){for(var t=k==mxConstants.DIRECTION_SOUTH||k==mxConstants.DIRECTION_NORTH,u=l=f=0;u<q.length;u++){var A=v.model.getTerminal(q[u],!1);if(k==d(A)){var x=v.view.getState(A);A!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY())&&mxUtils.intersects(n,x)&&(f=10+Math.max(f,(Math.min(n.x+n.width,x.x+x.width)-Math.max(n.x,x.x))/p),l=10+Math.max(l,(Math.min(n.y+
+n.height,x.y+x.height)-Math.max(n.y,x.y))/p))}}t?l=0:f=0;for(u=0;u<q.length;u++)if(A=v.model.getTerminal(q[u],!1),k==d(A)&&(x=v.view.getState(A),A!=b&&null!=x&&(t&&c!=x.getCenterX()<m.getCenterX()||!t&&c!=x.getCenterY()<m.getCenterY()))){var C=[];v.traverse(x.cell,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&C.push(c);(null==c||d)&&C.push(b);return null==c||d});v.moveCells(C,(c?1:-1)*f,(c?1:-1)*l)}}}return v.addCells(g,e)}finally{v.model.endUpdate()}}function l(b){v.model.beginUpdate();try{var c=
+d(b),e=v.getIncomingTreeEdges(b),f=v.cloneCells([e[0],b]);v.model.setTerminal(e[0],f[1],!1);v.model.setTerminal(f[0],f[1],!0);v.model.setTerminal(f[0],b,!1);var g=v.model.getParent(b),k=g.geometry,l=[];v.view.currentRoot!=g&&(f[1].geometry.x-=k.x,f[1].geometry.y-=k.y);v.traverse(b,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});var m=b.geometry.width+40,p=b.geometry.height+40;c==mxConstants.DIRECTION_SOUTH?m=0:c==mxConstants.DIRECTION_NORTH?
+(m=0,p=-p):c==mxConstants.DIRECTION_WEST?(m=-m,p=0):c==mxConstants.DIRECTION_EAST&&(p=0);v.moveCells(l,m,p);return v.addCells(f,g)}finally{v.model.endUpdate()}}function q(b,c){v.model.beginUpdate();try{var e=v.model.getParent(b),f=v.getIncomingTreeEdges(b),g=d(b);0==f.length&&(f=[v.createEdge(e,null,"",null,null,v.createCurrentEdgeStyle())],g=c);var k=v.cloneCells([f[0],b]);v.model.setTerminal(k[0],b,!0);if(null==v.model.getTerminal(k[0],!1)){v.model.setTerminal(k[0],k[1],!1);var l=v.getCellStyle(k[1]).newEdgeStyle;
+if(null!=l)try{var m=JSON.parse(l),p;for(p in m)v.setCellStyles(p,m[p],[k[0]]),"edgeStyle"==p&&"elbowEdgeStyle"==m[p]&&v.setCellStyles("elbow",g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[k[0]])}catch(W){}}var f=v.getOutgoingTreeEdges(b),n=e.geometry,l=[];v.view.currentRoot==e&&(n=new mxRectangle);for(m=0;m<f.length;m++){var q=v.model.getTerminal(f[m],!1);null!=q&&l.push(q)}var t=v.view.getBounds(l),u=v.view.translate,A=v.view.scale;g==mxConstants.DIRECTION_SOUTH?
+(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/A-u.x-n.x+10,k[1].geometry.y+=k[1].geometry.height-n.y+40):g==mxConstants.DIRECTION_NORTH?(k[1].geometry.x=null==t?b.geometry.x+(b.geometry.width-k[1].geometry.width)/2:(t.x+t.width)/A-u.x+-n.x+10,k[1].geometry.y-=k[1].geometry.height+n.y+40):(k[1].geometry.x=g==mxConstants.DIRECTION_WEST?k[1].geometry.x-(k[1].geometry.width+n.x+40):k[1].geometry.x+(k[1].geometry.width-n.x+40),k[1].geometry.y=null==t?b.geometry.y+
+(b.geometry.height-k[1].geometry.height)/2:(t.y+t.height)/A-u.y+-n.y+10);return v.addCells(k,e)}finally{v.model.endUpdate()}}function m(b,c,d){b=v.getOutgoingTreeEdges(b);d=v.view.getState(d);var e=[];if(null!=d&&null!=b){for(var f=0;f<b.length;f++){var g=v.view.getState(v.model.getTerminal(b[f],!1));null!=g&&(!c&&Math.min(g.x+g.width,d.x+d.width)>=Math.max(g.x,d.x)||c&&Math.min(g.y+g.height,d.y+d.height)>=Math.max(g.y,d.y))&&e.push(g)}e.sort(function(b,d){return c?b.x+b.width-d.x-d.width:b.y+b.height-
+d.y-d.height})}return e}function n(b,c){var e=d(b),f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST;(e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST)==f&&e!=c?u.actions.get("selectParent").funct():e==c?(f=v.getOutgoingTreeEdges(b),null!=f&&0<f.length&&v.setSelectionCell(v.model.getTerminal(f[0],!1))):(e=v.getIncomingTreeEdges(b),null!=e&&0<e.length&&(f=m(v.model.getTerminal(e[0],!0),f,b),e=v.view.getState(b),null!=e&&(e=mxUtils.indexOf(f,e),0<=e&&(e+=c==mxConstants.DIRECTION_NORTH||
+c==mxConstants.DIRECTION_WEST?-1:1,0<=e&&e<=f.length-1&&v.setSelectionCell(f[e].cell)))))}var u=this,v=u.editor.graph,y=v.getModel(),x=u.menus.createPopupMenu;u.menus.createPopupMenu=function(c,d,e){x.apply(this,arguments);if(1==v.getSelectionCount()){d=v.getSelectionCell();var f=v.getOutgoingTreeEdges(d);c.addSeparator();0<f.length&&(b(v.getSelectionCell())&&this.addMenuItems(c,["selectChildren"],null,e),this.addMenuItems(c,["selectDescendants"],null,e));b(v.getSelectionCell())?(c.addSeparator(),
+0<v.getIncomingTreeEdges(d).length&&this.addMenuItems(c,["selectSiblings","selectParent"],null,e)):0<v.model.getEdgeCount(d)&&this.addMenuItems(c,["selectConnections"],null,e)}};u.actions.addAction("selectChildren",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getOutgoingTreeEdges(b);if(null!=b){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(v.isEnabled()&&
+1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);if(null!=b&&0<b.length&&(b=v.getOutgoingTreeEdges(v.model.getTerminal(b[0],!0)),null!=b)){for(var c=[],d=0;d<b.length;d++)c.push(v.model.getTerminal(b[d],!1));v.setSelectionCells(c)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(v.isEnabled()&&1==v.getSelectionCount()){var b=v.getSelectionCell(),b=v.getIncomingTreeEdges(b);null!=b&&0<b.length&&v.setSelectionCell(v.model.getTerminal(b[0],
+!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",function(b,c){var d=v.getSelectionCell();if(v.isEnabled()&&v.model.isVertex(d)){if(null!=c&&mxEvent.isAltDown(c))v.setSelectionCells(v.model.getTreeEdges(d,null==c||!mxEvent.isShiftDown(c),null==c||!mxEvent.isControlDown(c)));else{var e=[];v.traverse(d,!0,function(b,d){var f=null!=d&&v.isTreeEdge(d);f&&e.push(d);null!=d&&!f||null!=c&&mxEvent.isShiftDown(c)||e.push(b);return null==d||f})}v.setSelectionCells(e)}},null,null,"Alt+Shift+D");
+var D=v.removeCells;v.removeCells=function(c,d){d=null!=d?d:!0;null==c&&(c=this.getDeletableCells(this.getSelectionCells()));d&&(c=this.getDeletableCells(this.addAllEdges(c)));for(var f=[],g=0;g<c.length;g++){var k=c[g];y.isEdge(k)&&e(k)&&(f.push(k),k=y.getTerminal(k,!1));if(b(k)){var l=[];v.traverse(k,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&l.push(c);(null==c||d)&&l.push(b);return null==c||d});0<l.length&&(f=f.concat(l),k=v.getIncomingTreeEdges(c[g]),c=c.concat(k))}else null!=k&&f.push(c[g])}c=
+f;return D.apply(this,arguments)};u.hoverIcons.getStateAt=function(c,d,e){return b(c.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,e))};var C=v.duplicateCells;v.duplicateCells=function(c,d){c=null!=c?c:this.getSelectionCells();for(var e=c.slice(0),f=0;f<e.length;f++){var g=v.view.getState(e[f]);if(null!=g&&b(g.cell))for(var k=v.getIncomingTreeEdges(g.cell),g=0;g<k.length;g++)mxUtils.remove(k[g],c)}this.model.beginUpdate();try{var l=C.call(this,c,d);if(l.length==c.length)for(f=0;f<c.length;f++)if(b(c[f])){var m=
+v.getIncomingTreeEdges(l[f]),k=v.getIncomingTreeEdges(c[f]);if(0==m.length&&0<k.length){var p=this.cloneCell(k[0]);this.addEdge(p,v.getDefaultParent(),this.model.getTerminal(k[0],!0),l[f])}}}finally{this.model.endUpdate()}return l};var G=v.moveCells;v.moveCells=function(c,d,e,f,g,k,l){var m=null;this.model.beginUpdate();try{var p=g,n=this.getCurrentCellStyle(g);if(null!=c&&b(g)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<c.length;q++)if(b(c[q])||v.model.isEdge(c[q])&&null==v.model.getTerminal(c[q],
+!0)){g=v.model.getParent(c[q]);break}if(null!=p&&g!=p&&null!=this.view.getState(c[0])){var t=v.getIncomingTreeEdges(c[0]);if(0<t.length){var u=v.view.getState(v.model.getTerminal(t[0],!0));if(null!=u){var A=v.view.getState(p);null!=A&&(d=(A.getCenterX()-u.getCenterX())/v.view.scale,e=(A.getCenterY()-u.getCenterY())/v.view.scale)}}}}m=G.apply(this,arguments);if(null!=m&&null!=c&&m.length==c.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(p)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],
+!0))&&this.model.setTerminal(m[q],p,!0);else if(b(c[q])&&(t=v.getIncomingTreeEdges(c[q]),0<t.length))if(!f)b(p)&&0>mxUtils.indexOf(c,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],p,!0);else if(0==v.getIncomingTreeEdges(m[q]).length){n=p;if(null==n||n==v.model.getParent(c[q]))n=v.model.getTerminal(t[0],!0);f=this.cloneCell(t[0]);this.addEdge(f,v.getDefaultParent(),n,m[q])}}finally{this.model.endUpdate()}return m};if(null!=u.sidebar){var J=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=
+function(c,d,e,f){var g=v.model,k=null;g.beginUpdate();try{if(k=J.apply(this,arguments),b(c))for(var l=0;l<k.length;l++)if(g.isEdge(k[l])&&null==g.getTerminal(k[l],!0)){g.setTerminal(k[l],c,!0);var m=v.getCellGeometry(k[l]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return k}}var L={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},H=u.onKeyDown;u.onKeyDown=function(c){try{if(v.isEnabled()&&
+!v.isEditing()&&b(v.getSelectionCell())&&1==v.getSelectionCount()){var d=null;0<v.getIncomingTreeEdges(v.getSelectionCell()).length&&(9==c.which?d=mxEvent.isShiftDown(c)?l(v.getSelectionCell()):q(v.getSelectionCell()):13==c.which&&(d=f(v.getSelectionCell(),!mxEvent.isShiftDown(c))));if(null!=d&&0<d.length)1==d.length&&v.model.isEdge(d[0])?v.setSelectionCell(v.model.getTerminal(d[0],!1)):v.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(v.view.getState(v.getSelectionCell())),
+v.startEditingAtCell(v.getSelectionCell()),mxEvent.consume(c);else if(mxEvent.isAltDown(c)&&mxEvent.isShiftDown(c)){var e=L[c.keyCode];null!=e&&(e.funct(c),mxEvent.consume(c))}else 37==c.keyCode?(n(v.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(c)):38==c.keyCode?(n(v.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(c)):39==c.keyCode?(n(v.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(c)):40==c.keyCode&&(n(v.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(c))}}catch(E){u.handleError(E)}mxEvent.isConsumed(c)||H.apply(this,arguments)};var K=v.connectVertex;v.connectVertex=function(c,e,g,k,m,p,n){var t=v.getIncomingTreeEdges(c);if(b(c)){var u=d(c),A=u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST,x=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST;return u==e||0==t.length?q(c,e):A==x?l(c):f(c,e!=mxConstants.DIRECTION_NORTH&&e!=mxConstants.DIRECTION_WEST)}return K.apply(this,arguments)};v.getSubtree=function(d){var e=
+[d];!c(d)&&!b(d)||t(d)||v.traverse(d,!0,function(b,c){var d=null!=c&&v.isTreeEdge(c);d&&0>mxUtils.indexOf(e,c)&&e.push(c);(null==c||d)&&0>mxUtils.indexOf(e,b)&&e.push(b);return null==c||d});return e};var A=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){A.apply(this,arguments);(c(this.state.cell)||b(this.state.cell))&&!t(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(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(b){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(b),mxEvent.getClientY(b),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(b);
-this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(b)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.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 Q=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){Q.apply(this,
+this.graph.isMouseDown=!0;u.hoverIcons.reset();mxEvent.consume(b)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.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 Q=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(b){Q.apply(this,
arguments);null!=this.moveHandle&&(this.moveHandle.style.display=b?"":"none")};var T=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(b,c){T.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=e.apply(this,arguments),c=this.graph;return b.concat([this.addEntry("tree container",
function(){var b=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");b.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 d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);b.insert(e);b.insert(c);b.insert(d);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var b=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
b.vertex=!0;var c=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');c.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;c.insertEdge(e,!0);d.insertEdge(e,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-g.vertex=!0;var 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);g.insertEdge(k,!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 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;c.insertEdge(q,!0);p.insertEdge(q,!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 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;c.insertEdge(u,!0);v.insertEdge(u,!1);b.insert(e);b.insert(k);b.insert(q);b.insert(u);b.insert(c);b.insert(d);b.insert(g);b.insert(p);b.insert(v);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=new mxCell("Central Idea",
+g.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);g.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 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;c.insertEdge(n,!0);m.insertEdge(n,!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 v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");v.geometry.relative=!0;v.edge=!0;c.insertEdge(v,!0);u.insertEdge(v,!1);b.insert(e);b.insert(k);b.insert(n);b.insert(v);b.insert(c);b.insert(d);b.insert(g);b.insert(m);b.insert(u);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var b=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;');b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var b=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var b=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;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 c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree orgchart organization division",function(){var b=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -3888,27 +3889,27 @@ EditorUi.prototype.setDarkMode=function(b){this.spinner.spin(document.body,mxRes
function(b){if(Editor.darkMode!=b){var c=this.editor.graph;Editor.darkMode=b;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";this.setGridColor(Editor.isDarkMode()?c.view.defaultDarkGridColor:c.view.defaultGridColor);c.defaultPageBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";c.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";c.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";c.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";c.loadStylesheet();
null!=this.actions.layersWindow&&(b=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,b&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Dialog.backdropColor=Editor.isDarkMode()?"#2a2a2a":"white";
StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?"#2a2a2a":"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;
-document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";n.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }":
+document.body.style.backgroundColor=Editor.isDarkMode()?"#2a2a2a":"#ffffff";p.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==g.parentNode&&document.getElementsByTagName("head")[0].appendChild(g):null!=g.parentNode&&g.parentNode.removeChild(g)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html body .geStatus { padding-top:3px !important; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?"#2a2a2a":"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?"#2a2a2a":"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?"#2a2a2a":"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var n=document.createElement("style");n.type="text/css";n.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(n);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var t=EditorUi.prototype.updateTabContainer;
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var p=document.createElement("style");p.type="text/css";p.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(p);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var t=EditorUi.prototype.updateTabContainer;
EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");t.apply(this,arguments)};var d=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){d.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var f=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(b,
c){null!=c.shortcut&&900>e&&!mxClient.IS_IOS?b.firstChild.nextSibling.setAttribute("title",c.shortcut):f.apply(this,arguments)};var l=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){l.apply(this,arguments);if(null!=this.userElement){var b=this.userElement;b.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+b.style.display;b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.userImage+")";b.style.backgroundPosition="center center";
-b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var m=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){m.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
+b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";b.style.cssFloat="right";b.setAttribute("title",mxResources.get("changeUser"));"none"!=b.style.display&&(b.style.display="inline-block")}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
b.className="geToolbarButton";b.innerHTML="";b.style.backgroundImage="url("+Editor.shareImage+")";b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var b=
document.createElement("div");b.style.display="inline-block";b.style.position="relative";b.style.marginTop="6px";b.style.marginRight="4px";var c=document.createElement("a");c.className="geMenuItem gePrimaryBtn";c.style.marginLeft="8px";c.style.padding="6px";if("1"==urlParams.noSaveBtn){var d="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(c,d);c.setAttribute("title",d);mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
b.appendChild(c)}else 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()})),b.appendChild(c),"1"==urlParams.saveAndExit&&(c=document.createElement("a"),mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(c));"1"!=urlParams.noExitBtn&&(c=document.createElement("a"),d="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(c,d),c.setAttribute("title",d),c.className="geMenuItem",c.style.marginLeft="6px",c.style.padding="6px",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),b.appendChild(c));this.buttonContainer.appendChild(b);this.buttonContainer.style.top=
-"6px"}};var p=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=p.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);e.x+=d.x-16;e.y+=d.y;return e};var q=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=
-function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;q.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()&&this.addMenuItems(b,["-","lockUnlock"],null,d)):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),this.addMenuItems(b,["collapsible","-","lockUnlock","enterGroup"],null,d),b.addSeparator(),this.addSubmenu("layout",b)):e.isSelectionEmpty()&&
-e.isEnabled()?(b.addSeparator(),this.addMenuItems(b,["editData"],null,d),b.addSeparator(),this.addSubmenu("layout",b),this.addSubmenu("insert",b),this.addMenuItems(b,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(b,["-","lockUnlock"],null,d);e.isEnabled()&&e.isSelectionEmpty()&&(this.addMenuItems(b,["-","fullscreen"]),(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(b,["toggleDarkMode"]))};var v=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=
-function(b,c,d){v.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(b,["copyAsImage"],null,d)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),
+"6px"}};var m=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(b,c){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,b)){var d=mxUtils.getOffset(this.editorUi.picker);d.x+=this.editorUi.picker.offsetWidth+4;d.y+=b.offsetTop-c.height/2+16;return d}var e=m.apply(this,arguments),d=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);e.x+=d.x-16;e.y+=d.y;return e};var n=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=
+function(b,c,d){var e=this.editorUi.editor.graph;b.smartSeparators=!0;n.apply(this,arguments);"1"==urlParams.sketch?e.isEnabled()&&(b.addSeparator(),1==e.getSelectionCount()&&this.addMenuItems(b,["-","lockUnlock"],null,d)):1==e.getSelectionCount()?(e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(b,e.isCellCollapsed(c)?["expand"]:["collapse"],null,d),this.addMenuItems(b,["collapsible","-","lockUnlock","enterGroup"],null,d),b.addSeparator(),this.addSubmenu("layout",b)):e.isSelectionEmpty()&&
+e.isEnabled()?(b.addSeparator(),this.addMenuItems(b,["editData"],null,d),b.addSeparator(),this.addSubmenu("layout",b),this.addSubmenu("insert",b),this.addMenuItems(b,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(b,["-","lockUnlock"],null,d);e.isEnabled()&&e.isSelectionEmpty()&&(this.addMenuItems(b,["-","fullscreen"]),(Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(b,["toggleDarkMode"]))};var u=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=
+function(b,c,d){u.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(b,["copyAsImage"],null,d)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var v=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.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);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);u.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;
+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);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);v.apply(this,arguments)};var y=EditorUi.prototype.setGraphEnabled;
EditorUi.prototype.setGraphEnabled=function(b){y.apply(this,arguments);if(b){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=c||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else 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 d=this.editorUi,e=d.editor.graph;d.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";d.actions.get("createShape").label=mxResources.get("shape")+"...";d.actions.get("outline").label=mxResources.get("outline")+"...";d.actions.get("layers").label=mxResources.get("layers")+"...";d.actions.get("tags").label=mxResources.get("tags")+"...";d.actions.get("forkme").visible="1"!=urlParams.sketch;
d.actions.get("downloadDesktop").visible="1"!=urlParams.sketch;var f=d.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(b){d.setDarkMode(!Editor.darkMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.isDarkMode()});f=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(b){d.setSketchMode(!Editor.sketchMode)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return Editor.sketchMode});f=d.actions.put("togglePagesVisible",
@@ -3946,12 +3947,12 @@ q.appendChild(n.buttonContainer);n.menubarContainer=n.buttonContainer;n.tabConta
"0px":"47px";var B=n.menus.get("viewZoom"),F="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,Z="1"==urlParams.sketch?document.createElement("div"):null,I="1"==urlParams.sketch?document.createElement("div"):null,ba="1"==urlParams.sketch?document.createElement("div"):null,ca=mxUtils.bind(this,function(){null!=this.sidebar&&(this.sidebar.graph.stylesheet.styles=mxUtils.clone(p.stylesheet.styles),this.sidebar.container.innerHTML="",this.sidebar.palettes={},this.sidebar.init(),"1"==urlParams.sketch&&
(this.scratchpad=null,this.toggleScratchpad()));p.refresh();p.view.validateBackground()});n.addListener("darkModeChanged",ca);n.addListener("sketchModeChanged",ca);Graph.touchStyle&&(p.panningHandler.isPanningTrigger=function(b){var c=b.getEvent();return null==b.getState()&&!mxEvent.isMouseEvent(c)&&!p.freehand.isDrawing()||mxEvent.isPopupTrigger(c)&&(null==b.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))});if(null!=n.hoverIcons){var da=n.hoverIcons.update;n.hoverIcons.update=function(){p.freehand.isDrawing()||
da.apply(this,arguments)}}if(null!=p.freehand){var ka=p.freehand.createStyle;p.freehand.createStyle=function(b){return ka.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){I.className="geToolbarContainer";Z.className="geToolbarContainer";ba.className="geToolbarContainer";q.className="geToolbarContainer";n.picker=I;var ma=!1;mxEvent.addListener(q,"mouseenter",function(){n.statusContainer.style.display="inline-block"});mxEvent.addListener(q,"mouseleave",function(){ma||(n.statusContainer.style.display=
-"none")});var ia=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&(q.style.visibility=14>q.clientWidth?"hidden":"",n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&null==n.statusContainer.firstChild.getAttribute("class")){var b=null!=n.statusContainer.firstChild?
-n.statusContainer.firstChild.getAttribute("title"):n.editor.getStatus();ia(b);var c=n.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(c))+'..."src="'+Editor.tailSpin+'">',n.statusContainer.style.display="inline-block",ma=!0):6<n.buttonContainer.clientWidth&&(n.statusContainer.style.display="none",ma=!1)}else n.statusContainer.style.display="inline-block",ia(null),
-ma=!0;q.style.visibility=12<q.clientWidth?"":"hidden"})));P=d("diagram",null,Editor.menuImage);P.style.boxShadow="none";P.style.padding="6px";P.style.margin="0px";ba.appendChild(P);mxEvent.disableContextMenu(P);mxEvent.addGestureListeners(P,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position="";n.statusContainer.style.display="none";
-n.statusContainer.style.margin="0px";n.statusContainer.style.padding="6px 0px";n.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";n.statusContainer.style.display="inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var W=document.createElement("a");W.style.padding="0px";W.style.boxShadow="none";W.className="geMenuItem";W.style.display="inline-block";W.style.width=
-"40px";W.style.height="12px";W.style.marginBottom="-2px";W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";W.style.backgroundPosition="top center";W.style.backgroundRepeat="no-repeat";W.setAttribute("title","Minimize");var na=!1,V=mxUtils.bind(this,function(){I.innerHTML="";if(!na){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";b.style.opacity="0.7";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=null!=d?d:"default";
-b.style.margin="2px 0px";I.appendChild(b);mxUtils.br(I);return b};c(n.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!0,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(n.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+"none")});var ia=mxUtils.bind(this,function(b){null!=n.notificationBtn&&(null!=b?n.notificationBtn.setAttribute("title",b):n.notificationBtn.removeAttribute("title"))});"1"!=urlParams.embed&&(q.style.visibility=14>q.clientWidth?"hidden":"",n.editor.addListener("statusChanged",mxUtils.bind(this,function(){n.setStatusText(n.editor.getStatus());if(0==n.statusContainer.children.length||1==n.statusContainer.children.length&&"function"===typeof n.statusContainer.firstChild.getAttribute&&null==n.statusContainer.firstChild.getAttribute("class")){var b=
+null!=n.statusContainer.firstChild?n.statusContainer.firstChild.getAttribute("title"):n.editor.getStatus();ia(b);var c=n.getCurrentFile(),c=null!=c?c.savingStatusKey:DrawioFile.prototype.savingStatusKey;b==mxResources.get(c)+"..."?(n.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(c))+'..."src="'+Editor.tailSpin+'">',n.statusContainer.style.display="inline-block",ma=!0):6<n.buttonContainer.clientWidth&&(n.statusContainer.style.display="none",ma=!1)}else n.statusContainer.style.display=
+"inline-block",ia(null),ma=!0;q.style.visibility=12<q.clientWidth?"":"hidden"})));P=d("diagram",null,Editor.menuImage);P.style.boxShadow="none";P.style.padding="6px";P.style.margin="0px";ba.appendChild(P);mxEvent.disableContextMenu(P);mxEvent.addGestureListeners(P,mxUtils.bind(this,function(b){(mxEvent.isShiftDown(b)||mxEvent.isAltDown(b)||mxEvent.isMetaDown(b)||mxEvent.isControlDown(b)||mxEvent.isPopupTrigger(b))&&this.appIconClicked(b)}),null,null);n.statusContainer.style.position="";n.statusContainer.style.display=
+"none";n.statusContainer.style.margin="0px";n.statusContainer.style.padding="6px 0px";n.statusContainer.style.maxWidth=Math.min(e-240,280)+"px";n.statusContainer.style.display="inline-block";n.statusContainer.style.textOverflow="ellipsis";n.buttonContainer.style.position="";n.buttonContainer.style.paddingRight="0px";n.buttonContainer.style.display="inline-block";var W=document.createElement("a");W.style.padding="0px";W.style.boxShadow="none";W.className="geMenuItem";W.style.display="inline-block";
+W.style.width="40px";W.style.height="12px";W.style.marginBottom="-2px";W.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";W.style.backgroundPosition="top center";W.style.backgroundRepeat="no-repeat";W.setAttribute("title","Minimize");var na=!1,V=mxUtils.bind(this,function(){I.innerHTML="";if(!na){var b=function(b,d,e){b=f("",b.funct,null,d,b,e);b.style.width="40px";b.style.opacity="0.7";return c(b,null,"pointer")},c=function(b,c,d){null!=c&&b.setAttribute("title",c);b.style.cursor=
+null!=d?d:"default";b.style.margin="2px 0px";I.appendChild(b);mxUtils.br(I);return b};c(n.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!0,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");c(n.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
140,160,"",mxResources.get("note"),!0,!0,null,!0),mxResources.get("note"));c(n.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!0,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");c(n.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!0,null,!0),mxResources.get("ellipse"));(function(){var b=new mxCell("",new mxGeometry(0,0,p.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,0),!1);b.geometry.points=[];b.geometry.relative=!0;b.edge=!0;c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,b.geometry.height,mxResources.get("line"),!1,null,!0),mxResources.get("line"));b=b.clone();b.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";b.geometry.width=p.defaultEdgeLength+20;b.geometry.setTerminalPoint(new mxPoint(0,
20),!0);b.geometry.setTerminalPoint(new mxPoint(b.geometry.width,20),!1);b=c(n.sidebar.createEdgeTemplateFromCells([b],b.geometry.width,40,mxResources.get("arrow"),!1,null,!0),mxResources.get("arrow"));b.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");b.style.paddingBottom="14px";b.style.marginBottom="14px"})();b(n.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var e=n.actions.get("toggleShapes");b(e,mxResources.get("shapes")+" ("+e.shortcut+
@@ -3969,7 +3970,7 @@ Z.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;
" (Alt+Mousewheel)");P.style.whiteSpace="nowrap";P.style.paddingRight="10px";P.style.textDecoration="none";P.style.textDecoration="none";P.style.overflow="hidden";P.style.visibility="hidden";P.style.textAlign="center";P.style.cursor="pointer";P.style.height=parseInt(n.tabContainerHeight)-1+"px";P.style.lineHeight=parseInt(n.tabContainerHeight)+1+"px";P.style.position="absolute";P.style.display="block";P.style.fontSize="12px";P.style.width="59px";P.style.right="0px";P.style.bottom="0px";P.style.backgroundImage=
"url("+mxWindow.prototype.minimizeImage+")";P.style.backgroundPosition="right 6px center";P.style.backgroundRepeat="no-repeat";y.appendChild(P)}(function(b){var c=mxUtils.bind(this,function(){b.innerHTML=Math.round(100*n.editor.graph.view.scale)+"%"});n.editor.graph.view.addListener(mxEvent.EVENT_SCALE,c);n.editor.addListener("resetGraphView",c);n.editor.addListener("pageSelected",c)})(P);var sa=n.setGraphEnabled;n.setGraphEnabled=function(){sa.apply(this,arguments);null!=this.tabContainer&&(P.style.visibility=
this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==Z?this.tabContainerHeight+"px":"0px")}}y.appendChild(q);y.appendChild(n.diagramContainer);l.appendChild(y);n.updateTabContainer();null==Z&&y.appendChild(n.tabContainer);var la=null;k();mxEvent.addListener(window,"resize",function(){k();null!=n.sidebarWindow&&n.sidebarWindow.window.fit();null!=n.formatWindow&&n.formatWindow.window.fit();null!=n.actions.outlineWindow&&n.actions.outlineWindow.window.fit();
-null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,g,n,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=g;this.isResolved=n;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,g){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,g){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=g};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\nbringForward=Bring Forward\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\ncompare=Compare\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.\ncontainer=Container\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.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\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.\ncopyData=Copy Data\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.\nlicenseRequired=This feature requires draw.io to be licensed.\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\nmerge=Merge\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\nnotion=Notion\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\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\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\nradial=Radial\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\nsendBackward=Send Backward\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\ntooLargeUseDownload=Too large, use download instead.\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\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\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;
+null!=n.actions.layersWindow&&n.actions.layersWindow.window.fit();null!=n.menus.tagsWindow&&n.menus.tagsWindow.window.fit();null!=n.menus.findWindow&&n.menus.findWindow.window.fit();null!=n.menus.findReplaceWindow&&n.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var c=EditorUi.initTheme;EditorUi.initTheme=function(){c.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,c,e,k,g,p,t){this.file=b;this.id=c;this.content=e;this.modifiedDate=k;this.createdDate=g;this.isResolved=p;this.user=t;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,c,e,k,g){c()};DrawioComment.prototype.editComment=function(b,c,e){c()};DrawioComment.prototype.deleteComment=function(b,c){b()};DrawioUser=function(b,c,e,k,g){this.id=b;this.email=c;this.displayName=e;this.pictureUrl=k;this.locale=g};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\nbringForward=Bring Forward\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\ncompare=Compare\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.\ncontainer=Container\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.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\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.\ncopyData=Copy Data\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.\nlicenseRequired=This feature requires draw.io to be licensed.\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\nmerge=Merge\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\nnotion=Notion\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\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\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\nradial=Radial\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\nsendBackward=Send Backward\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\ntooLargeUseDownload=Too large, use download instead.\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\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found \nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\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(b,c,e){this.init(b,c,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
GraphViewer.prototype.init=function(b,c,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
@@ -3979,18 +3980,18 @@ this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageI
this.graph.dialect==mxConstants.DIALECT_SVG){var e=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?e.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(e.style.padding="8px");e.style.boxSizing="border-box";e.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var b=this.view.graphBounds,c=this.view.translate;e.setAttribute("viewBox",b.x+c.x-this.panDx+" "+(b.y+c.y-this.panDy)+" "+(b.width+1)+
" "+(b.height+1));this.container.style.backgroundColor=e.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",b))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(b){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&
(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=c&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(b){return d.getImageUrl(b)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var f=this.xmlNode.getElementsByTagName("diagram");if(0<f.length){if(null!=this.pageId)for(var g=
-0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(b){var c=f[d.currentPage];return"page"==b?c.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==b?d.currentPage+1:"pagecount"==b?f.length:k.apply(this,arguments)}}}this.diagrams=[];var n=null;this.selectPage=function(b){this.handlingResize||(this.currentPage=mxUtils.mod(b,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
-this.selectPageById=function(b){b=this.getIndexById(b);var c=0<=b;c&&this.selectPage(b);return c};var g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=n&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),n=this.xmlNode)}),q=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(b){if(null!=b&&Graph.isPageLink(b.src)){var c=b.src,e=c.indexOf(",");0<e&&(e=d.getIndexById(c.substring(e+1)),0<=e&&(b=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[e])),
-b.originalSrc=c))}q.apply(this,arguments)};var v=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=v.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale;c.add(new mxRectangle((d.x+b.x)*e,(d.y+b.y)*e,b.width*e,b.height*e))}return c};this.addListener("xmlNodeChanged",g);g();urlParams.page=d.currentPage;g=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),
+0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var k=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(b){var c=f[d.currentPage];return"page"==b?c.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==b?d.currentPage+1:"pagecount"==b?f.length:k.apply(this,arguments)}}}this.diagrams=[];var m=null;this.selectPage=function(b){this.handlingResize||(this.currentPage=mxUtils.mod(b,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};
+this.selectPageById=function(b){b=this.getIndexById(b);var c=0<=b;c&&this.selectPage(b);return c};var g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=m&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),m=this.xmlNode)}),n=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(b){if(null!=b&&Graph.isPageLink(b.src)){var c=b.src,e=c.indexOf(",");0<e&&(e=d.getIndexById(c.substring(e+1)),0<=e&&(b=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[e])),
+b.originalSrc=c))}n.apply(this,arguments)};var p=this.graph.getGraphBounds;this.graph.getGraphBounds=function(b){var c=p.apply(this,arguments);b=this.backgroundImage;if(null!=b){var d=this.view.translate,e=this.view.scale;c.add(new mxRectangle((d.x+b.x)*e,(d.y+b.y)*e,b.width*e,b.height*e))}return c};this.addListener("xmlNodeChanged",g);g();urlParams.page=d.currentPage;g=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),
this.graph.view.scale=this.graphConfig.zoom||1,g=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(b){return!mxEvent.isPopupTrigger(b.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=
!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),
-scale:this.graph.view.scale};null!=g&&this.setLayersVisible(g);this.graph.customLinkClicked=function(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");d.selectPageById(b.substring(c+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(b);return!0};var u=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return u.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||
-window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof e){var g=this.getObservableParent(b),n=new e(mxUtils.bind(this,function(c){0<b.offsetWidth&&(n.disconnect(),k())}));n.observe(g,{attributes:!0})}else k()}};GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};
+scale:this.graph.view.scale};null!=g&&this.setLayersVisible(g);this.graph.customLinkClicked=function(b){if(Graph.isPageLink(b)){var c=b.indexOf(",");d.selectPageById(b.substring(c+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(b);return!0};var v=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=!0;return v.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||
+window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof e){var g=this.getObservableParent(b),p=new e(mxUtils.bind(this,function(c){0<b.offsetWidth&&(p.disconnect(),k())}));p.observe(g,{attributes:!0})}else k()}};GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};
GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
GraphViewer.prototype.getImageForGraphModel=function(b){var c=Graph.createOffscreenGraph(this.graph.getStylesheet());c.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(c.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;c.model.setRoot(b);b=c.getSvg();var e=c.getGraphBounds();document.body.removeChild(c.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),e.width,e.height,e.x,e.y)};
GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==b)return c;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(b){var c=!0;if(!this.autoOrigin){var e=[],k=this.graph.getModel();k.beginUpdate();try{for(var g=0;g<k.getChildCount(k.root);g++){var n=k.getChildAt(k.root,g),c=c&&k.isVisible(n);e.push(k.isVisible(n));k.setVisible(n,null!=b?b[g]:!0)}}finally{k.endUpdate()}}return c?null:e};
+GraphViewer.prototype.setLayersVisible=function(b){var c=!0;if(!this.autoOrigin){var e=[],k=this.graph.getModel();k.beginUpdate();try{for(var g=0;g<k.getChildCount(k.root);g++){var p=k.getChildAt(k.root,g),c=c&&k.isVisible(p);e.push(k.isVisible(p));k.setVisible(p,null!=b?b[g]:!0)}}finally{k.endUpdate()}}return c?null:e};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var c=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),c=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(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};c&&this.setLayersVisible(c)}};
GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,c=this.graph.getGraphBounds(),e=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var k=mxUtils.bind(this,function(){if(!e){e=!0;var c=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?c.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var c=b.getBoundingClientRect(),f=mxUtils.getScrollOrigin(document.body),
@@ -3998,31 +3999,31 @@ f="relative"===document.body.style.position?document.body.getBoundingClientRect(
this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());e=!1}}),g=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(c){var d=b.offsetWidth;d==g||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=c?c:this.graphConfig.zoom||
(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,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},g=d,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",k),this.graph.addListener("size",k)):new ResizeSensor(this.graph.container,k));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||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,c.width+2*this.graph.border),
-0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,c.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var n=g=null,k=mxUtils.bind(this,function(){window.clearTimeout(n);this.handlingResize||(n=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",k):new ResizeSensor(this.graph.container,k))}else 9>=document.documentMode||this.graph.addListener("size",
+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,c.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=g=null,k=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",k):new ResizeSensor(this.graph.container,k))}else 9>=document.documentMode||this.graph.addListener("size",
k);var t=mxUtils.bind(this,function(d){var e=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var k=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==d&&this.allowZoomOut&&(this.allowZoomIn||c.width+2*this.graph.border>b.offsetWidth||c.height+2*this.graph.border>k)?(d=null,null!=k&&c.height+2*this.graph.border>k-2&&(d=(k-2*this.graph.border-2)/c.height),this.fitGraph(d)):this.widthIsEmpty||
null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-c.x/this.graph.view.scale)+d.x,Math.floor(this.graph.border-c.y/this.graph.view.scale)+d.y),g=b.offsetWidth):this.graph.center((!this.widthIsEmpty||c.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=e});8==document.documentMode?window.setTimeout(t,0):t();this.positionGraph=function(b){c=this.graph.getGraphBounds();g=null;t(b)}};
GraphViewer.prototype.crop=function(){var b=this.graph,c=b.getGraphBounds(),e=b.border,k=b.view.scale;b.view.setTranslate(null!=c.x?Math.floor(b.view.translate.x-c.x/k+e):e,null!=c.y?Math.floor(b.view.translate.y-c.y/k+e):e)};GraphViewer.prototype.updateContainerWidth=function(b,c){b.style.width=c+"px"};GraphViewer.prototype.updateContainerHeight=function(b,c){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=c+"px"};
-GraphViewer.prototype.showLayers=function(b,c){var e=this.graphConfig.layers,e=null!=e&&0<e.length?e.split(" "):[],k=this.graphConfig.layerIds,g=null!=k&&0<k.length,n=!1;if(0<e.length||g||null!=c){var t=null!=c?c.getModel():null,n=b.getModel();n.beginUpdate();try{var d=n.getChildCount(n.root);if(null==t){var t=!1,f={};if(g)for(var l=0;l<k.length;l++){var m=n.getCell(k[l]);null!=m&&(t=!0,f[m.id]=!0)}else for(l=0;l<e.length;l++)m=n.getChildAt(n.root,parseInt(e[l])),null!=m&&(t=!0,f[m.id]=!0);for(l=
-0;t&&l<d;l++)m=n.getChildAt(n.root,l),n.setVisible(m,f[m.id]||!1)}else for(l=0;l<d;l++)n.setVisible(n.getChildAt(n.root,l),t.isVisible(t.getChildAt(t.root,l)))}finally{n.endUpdate()}n=!0}return n};
+GraphViewer.prototype.showLayers=function(b,c){var e=this.graphConfig.layers,e=null!=e&&0<e.length?e.split(" "):[],k=this.graphConfig.layerIds,g=null!=k&&0<k.length,p=!1;if(0<e.length||g||null!=c){var t=null!=c?c.getModel():null,p=b.getModel();p.beginUpdate();try{var d=p.getChildCount(p.root);if(null==t){var t=!1,f={};if(g)for(var l=0;l<k.length;l++){var q=p.getCell(k[l]);null!=q&&(t=!0,f[q.id]=!0)}else for(l=0;l<e.length;l++)q=p.getChildAt(p.root,parseInt(e[l])),null!=q&&(t=!0,f[q.id]=!0);for(l=
+0;t&&l<d;l++)q=p.getChildAt(p.root,l),p.setVisible(q,f[q.id]||!1)}else for(l=0;l<d;l++)p.setVisible(p.getChildAt(p.root,l),t.isVisible(t.getChildAt(t.root,l)))}finally{p.endUpdate()}p=!0}return p};
GraphViewer.prototype.addToolbar=function(){function b(b,c,d,f){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",b);null!=d&&g.setAttribute("title",d);g.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",c);b.style.width="18px";null==f||f?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
-function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(b);e.appendChild(g);m++;return g}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 e=c.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
-e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,g=null,n=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(e,0);k=null;g=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";g=null}),100)}),b||200)}),t=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,b||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(t(30),n())}));mxEvent.addListener(e,mxClient.IS_POINTER?
+function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(b);e.appendChild(g);q++;return g}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 e=c.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
+e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,g=null,p=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(e,0);k=null;g=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";g=null}),100)}),b||200)}),t=mxUtils.bind(this,function(b){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,b||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||(t(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?
"pointermove":"mousemove",function(b){mxEvent.consume(b)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(b){t(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(b){t(100);mxEvent.consume(b)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(b){mxEvent.isTouchEvent(b)||t(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?n():t(30))}})}for(var l=this.toolbarItems,m=0,p=null,q=null,v=null,u=null,y=0;y<l.length;y++){var x=l[y];if("pages"==x){u=c.ownerDocument.createElement("div");
-u.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(u,70);var D=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");D.style.borderRightStyle="none";D.style.paddingLeft="0px";D.style.paddingRight="0px";e.appendChild(u);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");C.style.paddingLeft="0px";C.style.paddingRight="0px";x=mxUtils.bind(this,function(){u.innerHTML="";mxUtils.write(u,this.currentPage+1+" / "+this.diagrams.length);u.style.display=1<this.diagrams.length?"inline-block":"none";D.style.display=u.style.display;C.style.display=u.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)this.zoomEnabled&&(b(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(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"==x){if(this.layersEnabled){var G=this.graph.getModel(),J=b(mxUtils.bind(this,function(b){if(null!=p)p.parentNode.removeChild(p),
-p=null;else{p=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&
-(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});b=J.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily=Editor.defaultHtmlFont;p.style.fontSize=
-"11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var c=mxUtils.getDocumentScrollOrigin(document);p.style.left=c.x+b.left-1+"px";p.style.top=c.y+b.bottom-2+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");G.addListener(mxEvent.CHANGE,function(){J.style.display=1<G.getChildCount(G.root)?"inline-block":"none"});J.style.display=1<G.getChildCount(G.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
-function(b){null==q&&(q=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),q.div.getElementsByTagName("div")[0].style.position="",q.div.style.maxHeight="160px",q.div.style.maxWidth="120px",q.div.style.padding="2px",q.div.style.overflow="auto",q.div.style.height="auto",q.div.style.position="fixed",q.div.style.fontFamily=Editor.defaultHtmlFont,q.div.style.fontSize="11px",q.div.style.backgroundColor="#eee",q.div.style.color="#000",q.div.style.border="1px solid #d0d0d0",q.div.style.zIndex=
-this.toolbarZIndex+1,mxUtils.setOpacity(q.div,80));if(null!=v)v.parentNode.removeChild(v),v=null;else{v=q.div;mxEvent.addListener(v,"mouseleave",function(){v.parentNode.removeChild(v);v=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);v.style.left=c.x+b.left-1+"px";v.style.top=c.y+b.bottom-2+"px";document.body.appendChild(v);q.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");G.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){L.style.display=0<
+this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(b,c){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-c.getGraphX())<f&&Math.abs(this.startY-c.getGraphY())<f&&(0<parseFloat(e.style.opacity||0)?p():t(30))}})}for(var l=this.toolbarItems,q=0,m=null,n=null,u=null,v=null,y=0;y<l.length;y++){var x=l[y];if("pages"==x){v=c.ownerDocument.createElement("div");
+v.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(v,70);var D=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");D.style.borderRightStyle="none";D.style.paddingLeft="0px";D.style.paddingRight="0px";e.appendChild(v);var C=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");C.style.paddingLeft="0px";C.style.paddingRight="0px";x=mxUtils.bind(this,function(){v.innerHTML="";mxUtils.write(v,this.currentPage+1+" / "+this.diagrams.length);v.style.display=1<this.diagrams.length?"inline-block":"none";D.style.display=v.style.display;C.style.display=v.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)this.zoomEnabled&&(b(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(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"==x){if(this.layersEnabled){var G=this.graph.getModel(),J=b(mxUtils.bind(this,function(b){if(null!=m)m.parentNode.removeChild(m),
+m=null;else{m=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var b=this.graph.getGraphBounds(),c=this.graph.view;0>b.x||0>b.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale}):null!=this.graph.originalViewState&&0<b.x/c.scale+this.graph.originalViewState.translate.x-c.translate.x&&0<b.y/c.scale+this.graph.originalViewState.translate.y-c.translate.y&&
+(c.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:c.translate.clone(),scale:c.scale})}}));mxEvent.addListener(m,"mouseleave",function(){m.parentNode.removeChild(m);m=null});b=J.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=Editor.defaultHtmlFont;m.style.fontSize=
+"11px";m.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(m,80);var c=mxUtils.getDocumentScrollOrigin(document);m.style.left=c.x+b.left-1+"px";m.style.top=c.y+b.bottom-2+"px";document.body.appendChild(m)}}),Editor.layersImage,mxResources.get("layers")||"Layers");G.addListener(mxEvent.CHANGE,function(){J.style.display=1<G.getChildCount(G.root)?"inline-block":"none"});J.style.display=1<G.getChildCount(G.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var L=b(mxUtils.bind(this,
+function(b){null==n&&(n=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),n.div.getElementsByTagName("div")[0].style.position="",n.div.style.maxHeight="160px",n.div.style.maxWidth="120px",n.div.style.padding="2px",n.div.style.overflow="auto",n.div.style.height="auto",n.div.style.position="fixed",n.div.style.fontFamily=Editor.defaultHtmlFont,n.div.style.fontSize="11px",n.div.style.backgroundColor="#eee",n.div.style.color="#000",n.div.style.border="1px solid #d0d0d0",n.div.style.zIndex=
+this.toolbarZIndex+1,mxUtils.setOpacity(n.div,80));if(null!=u)u.parentNode.removeChild(u),u=null;else{u=n.div;mxEvent.addListener(u,"mouseleave",function(){u.parentNode.removeChild(u);u=null});b=L.getBoundingClientRect();var c=mxUtils.getDocumentScrollOrigin(document);u.style.left=c.x+b.left-1+"px";u.style.top=c.y+b.bottom-2+"px";document.body.appendChild(u);n.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");G.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){L.style.display=0<
this.graph.getAllTags().length?"inline-block":"none"}));L.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==x?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(x=this.graphConfig["toolbar-buttons"][x],null!=x&&(x.elem=b(null==x.enabled||x.enabled?x.handler:function(){},x.image,x.title,x.enabled)))}null!=this.graph.minimumContainerSize&&
-(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.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;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*m;var H=c.style.border,K=mxUtils.bind(this,function(){e.style.width=
+(this.graph.minimumContainerSize.width=34*q);null!=this.graphConfig.title&&(l=c.ownerDocument.createElement("div"),l.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;",l.setAttribute("title",this.graphConfig.title),mxUtils.write(l,this.graphConfig.title),mxUtils.setOpacity(l,70),e.appendChild(l),this.filename=l);this.minToolbarWidth=34*q;var H=c.style.border,K=mxUtils.bind(this,function(){e.style.width=
"inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,c.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var b=c.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};e.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?
-e.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==H&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=p&&(p.parentNode.removeChild(p),p=null);c.style.border=H});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==
-c||b==e||b==p)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",K):K();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&K()})).observe(c)};
+e.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=b.top+1+"px"):e.style.top=b.top+"px";"1px solid transparent"==H&&(c.style.border="1px solid #d0d0d0");document.body.appendChild(e);var f=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=m&&(m.parentNode.removeChild(m),m=null);c.style.border=H});mxEvent.addListener(document,"mousemove",function(b){for(b=mxEvent.getSource(b);null!=b;){if(b==
+c||b==e||b==m)return;b=b.parentNode}f()});mxEvent.addListener(document.body,"mouseleave",function(b){f()})}else e.style.top=-this.toolbarHeight+"px",c.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(c,"mouseenter",K):K();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&K()})).observe(c)};
GraphViewer.prototype.disableButton=function(b){var c=this.graphConfig["toolbar-buttons"][b];null!=c&&(mxUtils.setOpacity(c.elem,30),mxEvent.removeListener(c.elem,"click",c.handler),mxEvent.addListener(c.elem,"mouseenter",function(){c.elem.style.backgroundColor="#eee"}))};
GraphViewer.prototype.addClickHandler=function(b,c){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,k){if(null==k)for(var g=mxEvent.getSource(e);g!=b.container&&null!=g&&null==k;)"a"==g.nodeName.toLowerCase()&&(k=g.getAttribute("href")),g=g.parentNode;null!=c?null==k||b.isCustomLink(k)?mxEvent.consume(e):b.isExternalProtocol(k)||b.isBlankLink(k)||window.setTimeout(function(){c.destroy()},0):null!=k&&null==c&&b.isCustomLink(k)&&
(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&b.customLinkClicked(k)&&(mxUtils.clearSelection(),mxEvent.consume(e))}),mxUtils.bind(this,function(b){null!=c||!this.lightboxClickEnabled||mxEvent.isTouchEvent(b)&&0!=this.toolbarItems.length||this.showLightbox()}))};
@@ -4032,7 +4033,7 @@ this.graphConfig.highlight&&(e.highlight=this.graphConfig.highlight.substring(1)
GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("src",Editor.closeBlackImage);c.style.cssText="position:fixed;top:32px;right:32px;";c.style.cursor="pointer";
mxEvent.addListener(c,"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";this.tagsEnabled&&(urlParams.tags="{}");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 e=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=e;
-k.refresh=function(){};var g=mxUtils.bind(this,function(b){27==b.keyCode&&k.destroy()}),n=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",g);document.body.removeChild(b);document.body.removeChild(c);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;n.apply(this,arguments)};var t=k.editor.graph,d=t.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,
+k.refresh=function(){};var g=mxUtils.bind(this,function(b){27==b.keyCode&&k.destroy()}),p=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",g);document.body.removeChild(b);document.body.removeChild(c);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;p.apply(this,arguments)};var t=k.editor.graph,d=t.container;d.style.overflow="hidden";this.lightboxChrome?(d.style.border="1px solid #c0c0c0",d.style.margin="40px",mxEvent.addListener(document.documentElement,
"keydown",g)):(b.style.display="none",c.style.display="none");var f=this;t.getImageFromBundles=function(b){return f.getImageUrl(b)};var l=k.createTemporaryGraph;k.createTemporaryGraph=function(){var b=l.apply(this,arguments);b.getImageFromBundles=function(b){return f.getImageUrl(b)};return b};this.graphConfig.move&&(t.isMoveCellsEvent=function(b){return!0});mxUtils.setPrefixedStyle(d.style,"border-radius","4px");d.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(d.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(d.style,"transition","all .25s ease-in-out"));this.addClickHandler(t,k);window.setTimeout(mxUtils.bind(this,function(){d.style.outline="none";d.style.zIndex=this.lightboxZIndex;c.style.zIndex=this.lightboxZIndex;document.body.appendChild(d);document.body.appendChild(c);k.setFileData(this.xml);mxUtils.setPrefixedStyle(d.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});k.lightboxFit();k.chromelessResize();this.showLayers(t,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
@@ -4042,9 +4043,9 @@ GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassNam
GraphViewer.createViewerForElement=function(b,c){var e=b.getAttribute("data-mxgraph");if(null!=e){var k=JSON.parse(e),g=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(b,e.documentElement,k);null!=c&&c(e)};null!=k.url?GraphViewer.getUrl(k.url,function(b){g(b)}):g(k.xml)}};
GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.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(b)}catch(c){}};
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,c,e){if(null!=GraphViewer.cachedUrls[b])c(GraphViewer.cachedUrls[b]);else{var k=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;k.open("GET",b);k.onload=function(){c(null!=k.getText?k.getText():k.responseText)};k.onerror=e;k.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(b){return window.setTimeout(b,20)},c=function(e,k){function g(){this.q=[];this.add=function(b){this.q.push(b)};var b,c;this.call=function(){b=0;for(c=this.q.length;b<c;b++)this.q[b].call()}}function n(b,c){return b.currentStyle?b.currentStyle[c]:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue(c):b.style[c]}function t(c,d){if(!c.resizedAttached)c.resizedAttached=
+(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(b){return window.setTimeout(b,20)},c=function(e,k){function g(){this.q=[];this.add=function(b){this.q.push(b)};var b,c;this.call=function(){b=0;for(c=this.q.length;b<c;b++)this.q[b].call()}}function p(b,c){return b.currentStyle?b.currentStyle[c]:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue(c):b.style[c]}function t(c,d){if(!c.resizedAttached)c.resizedAttached=
new g,c.resizedAttached.add(d);else if(c.resizedAttached){c.resizedAttached.add(d);return}c.resizeSensor=document.createElement("div");c.resizeSensor.className="resize-sensor";c.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";c.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>';
-c.appendChild(c.resizeSensor);"static"==n(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,p=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(p))};b(p);var q,t,L,H,K=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},A=function(b,c,d){b.attachEvent?
-b.attachEvent("on"+c,d):b.addEventListener(c,d)};A(e,"scroll",K);A(k,"scroll",K)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,m=e.length;f<m;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
+c.appendChild(c.resizeSensor);"static"==p(c,"position")&&(c.style.position="relative");var e=c.resizeSensor.childNodes[0],f=e.childNodes[0],k=c.resizeSensor.childNodes[1],l=function(){f.style.width="100000px";f.style.height="100000px";e.scrollLeft=1E5;e.scrollTop=1E5;k.scrollLeft=1E5;k.scrollTop=1E5};l();var m=!1,n=function(){c.resizedAttached&&(m&&(c.resizedAttached.call(),m=!1),b(n))};b(n);var q,t,L,H,K=function(){if((L=c.offsetWidth)!=q||(H=c.offsetHeight)!=t)m=!0,q=L,t=H;l()},A=function(b,c,d){b.attachEvent?
+b.attachEvent("on"+c,d):b.addEventListener(c,d)};A(e,"scroll",K);A(k,"scroll",K)}var d=function(){GraphViewer.resizeSensorEnabled&&k()},f=Object.prototype.toString.call(e),l="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(l)for(var f=0,q=e.length;f<q;f++)t(e[f],d);else t(e,d);this.detach=function(){if(l)for(var b=0,d=e.length;b<d;b++)c.detach(e[b]);else c.detach(e)}};
c.detach=function(b){b.resizeSensor&&(b.removeChild(b.resizeSensor),delete b.resizeSensor,delete b.resizedAttached)};window.ResizeSensor=c})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index 1ca32a76..85c50c8c 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"15.4.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),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/"),
+var mxClient={VERSION:"15.4.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),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.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 008acd19..1f64268c 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-f163abaa"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"7b1c84394a6ac8e9efbc34cad5579dc1"},{url:"js/extensions.min.js",revision:"cb7b81b25eaa0a0a287c6ca35dd459e6"},{url:"js/stencils.min.js",revision:"8ada746d21157d3d47e6ad3abbbcc3ab"},{url:"js/shapes-14-6-5.min.js",revision:"2a45abd06dfe78e69135e9f87f9b78d3"},{url:"js/math-print.js",revision:"9d98c920695f6c3395da4b68f723e60a"},{url:"index.html",revision:"28ab148081b0ccd22ad2db634d538b6b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/grapheditor.css",revision:"92e740f4f44f203bac29c4e208bf45b0"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"87d5d01385c5d0f0c4c4f5d0f3532826"},{url:"js/croppie/croppie.min.css",revision:"fc297c9002c79c15a132f13ee3ec427e"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"08d8306ff6e63f203bd6f58f6db0249b"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"2ce6e99d95113e9ca6b24343cea202e0"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"6e9412c359a21b86dc7c5128bf6208d4"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"375a89b2a867264a395f384d00eeba13"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"197ed5837ed27992688fc424699a9a78"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"ec6e55011746305549024292f46270bd"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"9f62a20024e4ab1f036ab97e6b9c5e6f"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"293aa21acaf0a3349686f420b2be874a"},{url:"connect/confluence/viewer-init.js",revision:"4a60c6c805cab7bc782f1e52f7818d9f"},{url:"connect/confluence/viewer.js",revision:"8ce5887817b32603d1dcd23a1011989d"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c7b38b3af4eb7a58ab6dc4791216530e"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"374099e93482baae432490d9e55e4e24"},{url:"connect/confluence/includeDiagram.html",revision:"538252ed4fed6d5e9f4e53b35954c116"},{url:"connect/confluence/macro-editor.js",revision:"e273a48b8e81faac4530bf1a68d75aa0"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_am.txt",revision:"ff59ef2ea422e962065b978f74f1989e"},{url:"resources/dia_ar.txt",revision:"b53a2876e65d205d42c0217216db0a0b"},{url:"resources/dia_bg.txt",revision:"5ae6ea7a2b816b32ded88cb15651dbfc"},{url:"resources/dia_bn.txt",revision:"f8775fef4398d0863d1c95b92f778f14"},{url:"resources/dia_bs.txt",revision:"1a5bbe8e6e02b215c7457d9735ada682"},{url:"resources/dia_ca.txt",revision:"d8ac61cb5b3e5d47f9ce8160c8b2f057"},{url:"resources/dia_cs.txt",revision:"aeaa9d93c19d60a9ab385a21d57f025c"},{url:"resources/dia_da.txt",revision:"5e0221a99a3fdf557b5ccf72965d99b2"},{url:"resources/dia_de.txt",revision:"d3ad299dc8cfbd2a34479edfafce74ad"},{url:"resources/dia_el.txt",revision:"80761a88228f85296bfc029bf5340718"},{url:"resources/dia_eo.txt",revision:"4544b6600298fe72d2d516fd135c54fa"},{url:"resources/dia_es.txt",revision:"863e0e73d4cdf95093461ef0157e13e5"},{url:"resources/dia_et.txt",revision:"3a47c1b462102c60e47e0f7d6e07d379"},{url:"resources/dia_eu.txt",revision:"92c451283a83cae2d83460b1b0aaf1c4"},{url:"resources/dia_fa.txt",revision:"c56a53dac116441fac2a6e6a110b4fcf"},{url:"resources/dia_fi.txt",revision:"fcc968a8202ebe596bb4efa31d5c55b7"},{url:"resources/dia_fil.txt",revision:"0c98b10b2ce7660502fab8f8a09216c0"},{url:"resources/dia_fr.txt",revision:"550ba55018af500d82b2ade74f49d6a6"},{url:"resources/dia_gl.txt",revision:"d9dedee9a17ce0e98cac6a641dbd1b17"},{url:"resources/dia_gu.txt",revision:"6d6d7e768e1d255dcb9f9abf87676787"},{url:"resources/dia_he.txt",revision:"404b9e323e5bbbecb63ea4a58385431a"},{url:"resources/dia_hi.txt",revision:"8c4436fda7e9278685d9d5d6e0942ae9"},{url:"resources/dia_hr.txt",revision:"38cf52a7e23c4e8796d0cbb7ea217f7e"},{url:"resources/dia_hu.txt",revision:"e17887d5e7057c80ec1da14fe7749c52"},{url:"resources/dia_id.txt",revision:"32c8349f2744c3b6023fd17742eb1c2c"},{url:"resources/dia_it.txt",revision:"57eba100f012d139d00543c31060cf04"},{url:"resources/dia_ja.txt",revision:"cbb7bea7bd120272c6dfe0d6f0ca85f4"},{url:"resources/dia_kn.txt",revision:"ca9045d8ab0d3c8448228187c8ba77cd"},{url:"resources/dia_ko.txt",revision:"ea4948e5456ac276658b0071172dee82"},{url:"resources/dia_lt.txt",revision:"05955be58d94abc2707dea99394a60db"},{url:"resources/dia_lv.txt",revision:"47aa1bcdd23457cd5f3026db7a357fc9"},{url:"resources/dia_ml.txt",revision:"5735f8afcd3fb73882147629d044e368"},{url:"resources/dia_mr.txt",revision:"8e891bbae07ac6fbe9038e8d19fb66fd"},{url:"resources/dia_ms.txt",revision:"ea1992800627d8e54c54d54d1078cd50"},{url:"resources/dia_my.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_nl.txt",revision:"a158a142f848a44f4b9a86b2c71de770"},{url:"resources/dia_no.txt",revision:"a73fe6de8d13ff09b57022c6152de435"},{url:"resources/dia_pl.txt",revision:"a731cde706b7b10c2bb9b8b804ecf99e"},{url:"resources/dia_pt-br.txt",revision:"099ff3baec465f1f42dd417d4f3d6a03"},{url:"resources/dia_pt.txt",revision:"5fdec4aa7a49475cc6d3a8b4a2a8ce75"},{url:"resources/dia_ro.txt",revision:"e2485ba528fffc006ddc16a2bdbba588"},{url:"resources/dia_ru.txt",revision:"4e4dff4df4bb635eab4648a31718bb71"},{url:"resources/dia_si.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_sk.txt",revision:"aa39fa602751e960c408b51bc4d1e9a3"},{url:"resources/dia_sl.txt",revision:"a1e9ea18592a3520a564da53754435f1"},{url:"resources/dia_sr.txt",revision:"ee7f392d230f3acf9ee64e59912d2240"},{url:"resources/dia_sv.txt",revision:"d1af4adc3abc689e2b2877348fe3a80e"},{url:"resources/dia_sw.txt",revision:"ee11057cc33d2db3915810afa98e4fb8"},{url:"resources/dia_ta.txt",revision:"64633496007987935476811363899867"},{url:"resources/dia_te.txt",revision:"b67de98cc3819f31d6aedc4a8e332d3f"},{url:"resources/dia_th.txt",revision:"bf3564b735dddb73bafa110e1ba4f364"},{url:"resources/dia_tr.txt",revision:"e66e3a8530b0bda46ff6de26598a637b"},{url:"resources/dia_uk.txt",revision:"1ea94afcd9c9383c784ceae2896c8af4"},{url:"resources/dia_vi.txt",revision:"2ea8a953b560713a201dff1d8d3917dd"},{url:"resources/dia_zh-tw.txt",revision:"7a19eef01a4ee231cc05d3b3833bba4f"},{url:"resources/dia_zh.txt",revision:"f609cb57ae40941ae6c8165f89d7aed0"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return a[e]||(i=new Promise((async i=>{if("document"in self){const a=document.createElement("script");a.src=e,document.head.appendChild(a),a.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!a[e])throw new Error(`Module ${e} didn’t register its module`);return a[e]}))},i=(i,a)=>{Promise.all(i.map(e)).then((e=>a(1===e.length?e[0]:e)))},a={require:Promise.resolve(i)};self.define=(i,r,c)=>{a[i]||(a[i]=Promise.resolve().then((()=>{let a={};const s={uri:location.origin+i.slice(1)};return Promise.all(r.map((i=>{switch(i){case"exports":return a;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return a.default||(a.default=i),a}))})))}}define("./service-worker.js",["./workbox-f163abaa"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"ea6fec31011beca73a677c088872f8ca"},{url:"js/extensions.min.js",revision:"cb7b81b25eaa0a0a287c6ca35dd459e6"},{url:"js/stencils.min.js",revision:"8ada746d21157d3d47e6ad3abbbcc3ab"},{url:"js/shapes-14-6-5.min.js",revision:"2a45abd06dfe78e69135e9f87f9b78d3"},{url:"js/math-print.js",revision:"9d98c920695f6c3395da4b68f723e60a"},{url:"index.html",revision:"28ab148081b0ccd22ad2db634d538b6b"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/grapheditor.css",revision:"92e740f4f44f203bac29c4e208bf45b0"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"87d5d01385c5d0f0c4c4f5d0f3532826"},{url:"js/croppie/croppie.min.css",revision:"fc297c9002c79c15a132f13ee3ec427e"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"86f46f47da472498864d8b81285ab0b6"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"2ce6e99d95113e9ca6b24343cea202e0"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"6e9412c359a21b86dc7c5128bf6208d4"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"375a89b2a867264a395f384d00eeba13"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"197ed5837ed27992688fc424699a9a78"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"ec6e55011746305549024292f46270bd"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"9f62a20024e4ab1f036ab97e6b9c5e6f"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"293aa21acaf0a3349686f420b2be874a"},{url:"connect/confluence/viewer-init.js",revision:"4a60c6c805cab7bc782f1e52f7818d9f"},{url:"connect/confluence/viewer.js",revision:"8ce5887817b32603d1dcd23a1011989d"},{url:"connect/confluence/viewer-1-4-42.html",revision:"c7b38b3af4eb7a58ab6dc4791216530e"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"374099e93482baae432490d9e55e4e24"},{url:"connect/confluence/includeDiagram.html",revision:"538252ed4fed6d5e9f4e53b35954c116"},{url:"connect/confluence/macro-editor.js",revision:"e273a48b8e81faac4530bf1a68d75aa0"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_am.txt",revision:"ff59ef2ea422e962065b978f74f1989e"},{url:"resources/dia_ar.txt",revision:"b53a2876e65d205d42c0217216db0a0b"},{url:"resources/dia_bg.txt",revision:"5ae6ea7a2b816b32ded88cb15651dbfc"},{url:"resources/dia_bn.txt",revision:"f8775fef4398d0863d1c95b92f778f14"},{url:"resources/dia_bs.txt",revision:"1a5bbe8e6e02b215c7457d9735ada682"},{url:"resources/dia_ca.txt",revision:"d8ac61cb5b3e5d47f9ce8160c8b2f057"},{url:"resources/dia_cs.txt",revision:"aeaa9d93c19d60a9ab385a21d57f025c"},{url:"resources/dia_da.txt",revision:"5e0221a99a3fdf557b5ccf72965d99b2"},{url:"resources/dia_de.txt",revision:"d3ad299dc8cfbd2a34479edfafce74ad"},{url:"resources/dia_el.txt",revision:"80761a88228f85296bfc029bf5340718"},{url:"resources/dia_eo.txt",revision:"4544b6600298fe72d2d516fd135c54fa"},{url:"resources/dia_es.txt",revision:"863e0e73d4cdf95093461ef0157e13e5"},{url:"resources/dia_et.txt",revision:"3a47c1b462102c60e47e0f7d6e07d379"},{url:"resources/dia_eu.txt",revision:"92c451283a83cae2d83460b1b0aaf1c4"},{url:"resources/dia_fa.txt",revision:"c56a53dac116441fac2a6e6a110b4fcf"},{url:"resources/dia_fi.txt",revision:"fcc968a8202ebe596bb4efa31d5c55b7"},{url:"resources/dia_fil.txt",revision:"0c98b10b2ce7660502fab8f8a09216c0"},{url:"resources/dia_fr.txt",revision:"550ba55018af500d82b2ade74f49d6a6"},{url:"resources/dia_gl.txt",revision:"d9dedee9a17ce0e98cac6a641dbd1b17"},{url:"resources/dia_gu.txt",revision:"6d6d7e768e1d255dcb9f9abf87676787"},{url:"resources/dia_he.txt",revision:"404b9e323e5bbbecb63ea4a58385431a"},{url:"resources/dia_hi.txt",revision:"8c4436fda7e9278685d9d5d6e0942ae9"},{url:"resources/dia_hr.txt",revision:"38cf52a7e23c4e8796d0cbb7ea217f7e"},{url:"resources/dia_hu.txt",revision:"e17887d5e7057c80ec1da14fe7749c52"},{url:"resources/dia_id.txt",revision:"32c8349f2744c3b6023fd17742eb1c2c"},{url:"resources/dia_it.txt",revision:"57eba100f012d139d00543c31060cf04"},{url:"resources/dia_ja.txt",revision:"cbb7bea7bd120272c6dfe0d6f0ca85f4"},{url:"resources/dia_kn.txt",revision:"ca9045d8ab0d3c8448228187c8ba77cd"},{url:"resources/dia_ko.txt",revision:"ea4948e5456ac276658b0071172dee82"},{url:"resources/dia_lt.txt",revision:"05955be58d94abc2707dea99394a60db"},{url:"resources/dia_lv.txt",revision:"47aa1bcdd23457cd5f3026db7a357fc9"},{url:"resources/dia_ml.txt",revision:"5735f8afcd3fb73882147629d044e368"},{url:"resources/dia_mr.txt",revision:"8e891bbae07ac6fbe9038e8d19fb66fd"},{url:"resources/dia_ms.txt",revision:"ea1992800627d8e54c54d54d1078cd50"},{url:"resources/dia_my.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_nl.txt",revision:"a158a142f848a44f4b9a86b2c71de770"},{url:"resources/dia_no.txt",revision:"a73fe6de8d13ff09b57022c6152de435"},{url:"resources/dia_pl.txt",revision:"a731cde706b7b10c2bb9b8b804ecf99e"},{url:"resources/dia_pt-br.txt",revision:"099ff3baec465f1f42dd417d4f3d6a03"},{url:"resources/dia_pt.txt",revision:"5fdec4aa7a49475cc6d3a8b4a2a8ce75"},{url:"resources/dia_ro.txt",revision:"e2485ba528fffc006ddc16a2bdbba588"},{url:"resources/dia_ru.txt",revision:"4e4dff4df4bb635eab4648a31718bb71"},{url:"resources/dia_si.txt",revision:"b27e8770b0fc71f51c97a80bed58ec4e"},{url:"resources/dia_sk.txt",revision:"aa39fa602751e960c408b51bc4d1e9a3"},{url:"resources/dia_sl.txt",revision:"a1e9ea18592a3520a564da53754435f1"},{url:"resources/dia_sr.txt",revision:"ee7f392d230f3acf9ee64e59912d2240"},{url:"resources/dia_sv.txt",revision:"d1af4adc3abc689e2b2877348fe3a80e"},{url:"resources/dia_sw.txt",revision:"ee11057cc33d2db3915810afa98e4fb8"},{url:"resources/dia_ta.txt",revision:"64633496007987935476811363899867"},{url:"resources/dia_te.txt",revision:"b67de98cc3819f31d6aedc4a8e332d3f"},{url:"resources/dia_th.txt",revision:"bf3564b735dddb73bafa110e1ba4f364"},{url:"resources/dia_tr.txt",revision:"e66e3a8530b0bda46ff6de26598a637b"},{url:"resources/dia_uk.txt",revision:"1ea94afcd9c9383c784ceae2896c8af4"},{url:"resources/dia_vi.txt",revision:"2ea8a953b560713a201dff1d8d3917dd"},{url:"resources/dia_zh-tw.txt",revision:"7a19eef01a4ee231cc05d3b3833bba4f"},{url:"resources/dia_zh.txt",revision:"f609cb57ae40941ae6c8165f89d7aed0"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index c2fdb04a..d0b6774b 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/cv/_wml09cx4cd5ryt_r7z2tjjm0000gn/T/7a70ca1e6d1cc82e9360e272b70a9515/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/local/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"7b1c84394a6ac8e9efbc34cad5579dc1\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"cb7b81b25eaa0a0a287c6ca35dd459e6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"8ada746d21157d3d47e6ad3abbbcc3ab\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"2a45abd06dfe78e69135e9f87f9b78d3\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"9d98c920695f6c3395da4b68f723e60a\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"28ab148081b0ccd22ad2db634d538b6b\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"92e740f4f44f203bac29c4e208bf45b0\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"87d5d01385c5d0f0c4c4f5d0f3532826\"\n },\n {\n \"url\": \"js/croppie/croppie.min.css\",\n \"revision\": \"fc297c9002c79c15a132f13ee3ec427e\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"08d8306ff6e63f203bd6f58f6db0249b\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"2ce6e99d95113e9ca6b24343cea202e0\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"6e9412c359a21b86dc7c5128bf6208d4\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"375a89b2a867264a395f384d00eeba13\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"197ed5837ed27992688fc424699a9a78\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"ec6e55011746305549024292f46270bd\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"9f62a20024e4ab1f036ab97e6b9c5e6f\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"293aa21acaf0a3349686f420b2be874a\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"4a60c6c805cab7bc782f1e52f7818d9f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"8ce5887817b32603d1dcd23a1011989d\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c7b38b3af4eb7a58ab6dc4791216530e\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"374099e93482baae432490d9e55e4e24\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"538252ed4fed6d5e9f4e53b35954c116\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"e273a48b8e81faac4530bf1a68d75aa0\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"ff59ef2ea422e962065b978f74f1989e\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"b53a2876e65d205d42c0217216db0a0b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"5ae6ea7a2b816b32ded88cb15651dbfc\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"f8775fef4398d0863d1c95b92f778f14\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"1a5bbe8e6e02b215c7457d9735ada682\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"d8ac61cb5b3e5d47f9ce8160c8b2f057\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"aeaa9d93c19d60a9ab385a21d57f025c\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"5e0221a99a3fdf557b5ccf72965d99b2\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"d3ad299dc8cfbd2a34479edfafce74ad\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"80761a88228f85296bfc029bf5340718\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"4544b6600298fe72d2d516fd135c54fa\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"863e0e73d4cdf95093461ef0157e13e5\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"3a47c1b462102c60e47e0f7d6e07d379\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"92c451283a83cae2d83460b1b0aaf1c4\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"c56a53dac116441fac2a6e6a110b4fcf\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"fcc968a8202ebe596bb4efa31d5c55b7\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"0c98b10b2ce7660502fab8f8a09216c0\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"550ba55018af500d82b2ade74f49d6a6\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"d9dedee9a17ce0e98cac6a641dbd1b17\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"6d6d7e768e1d255dcb9f9abf87676787\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"404b9e323e5bbbecb63ea4a58385431a\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"8c4436fda7e9278685d9d5d6e0942ae9\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"38cf52a7e23c4e8796d0cbb7ea217f7e\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"e17887d5e7057c80ec1da14fe7749c52\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"32c8349f2744c3b6023fd17742eb1c2c\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"57eba100f012d139d00543c31060cf04\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"cbb7bea7bd120272c6dfe0d6f0ca85f4\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"ca9045d8ab0d3c8448228187c8ba77cd\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"ea4948e5456ac276658b0071172dee82\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"05955be58d94abc2707dea99394a60db\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"47aa1bcdd23457cd5f3026db7a357fc9\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"5735f8afcd3fb73882147629d044e368\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"8e891bbae07ac6fbe9038e8d19fb66fd\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"ea1992800627d8e54c54d54d1078cd50\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"a158a142f848a44f4b9a86b2c71de770\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"a73fe6de8d13ff09b57022c6152de435\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a731cde706b7b10c2bb9b8b804ecf99e\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"099ff3baec465f1f42dd417d4f3d6a03\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"5fdec4aa7a49475cc6d3a8b4a2a8ce75\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"e2485ba528fffc006ddc16a2bdbba588\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"4e4dff4df4bb635eab4648a31718bb71\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"aa39fa602751e960c408b51bc4d1e9a3\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"a1e9ea18592a3520a564da53754435f1\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ee7f392d230f3acf9ee64e59912d2240\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"d1af4adc3abc689e2b2877348fe3a80e\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"ee11057cc33d2db3915810afa98e4fb8\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"64633496007987935476811363899867\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b67de98cc3819f31d6aedc4a8e332d3f\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"bf3564b735dddb73bafa110e1ba4f364\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"e66e3a8530b0bda46ff6de26598a637b\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"1ea94afcd9c9383c784ceae2896c8af4\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"2ea8a953b560713a201dff1d8d3917dd\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"7a19eef01a4ee231cc05d3b3833bba4f\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"f609cb57ae40941ae6c8165f89d7aed0\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,oCAY2B,CAClC,KACS,yBACK,oCAEd,KACS,gCACK,oCAEd,KACS,8BACK,oCAEd,KACS,mCACK,oCAEd,KACS,4BACK,oCAEd,KACS,sBACK,oCAEd,KACS,qBACK,oCAEd,KACS,kCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,sCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,mCACK,oCAEd,KACS,0CACK,oCAEd,KACS,gDACK,oCAEd,KACS,oDACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kDACK,oCAEd,KACS,6CACK,oCAEd,KACS,kCACK,oCAEd,KACS,qCACK,oCAEd,KACS,kCACK,oCAEd,KACS,oDACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,yCACK,oCAEd,KACS,6CACK,oCAEd,KACS,wCACK,oCAEd,KACS,iDACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,kDACK,oCAEd,KACS,8CACK,oCAEd,KACS,2BACK,oCAEd,KACS,8CACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,+DACK,oCAEd,KACS,2EACK,oCAEd,KACS,wEACK,oCAEd,KACS,6BACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,iCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,uBACK,oCAEd,KACS,gCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,iCACK,oCAEd,KACS,oCACK,oCAEd,KACS,2CACK,oCAEd,KACS,mCACK,oCAEd,KACS,sCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,oCACK,oCAEd,KACS,6CACK,oCAEd,KACS,6CACK,oCAEd,KACS,6BACK,oCAEd,KACS,iCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,gCACK,oCAEd,KACS,wCACK,oCAEd,KACS,oCACK,oCAEd,KACS,mCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,8CACK,oCAEd,KACS,yCACK,oCAEd,KACS,0CACK,oCAEd,KACS,wCACK,oCAEd,KACS,wCACK,oCAEd,KACS,+CACK,oCAEd,KACS,sCACK,oCAEd,KACS,gCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,gCACK,oCAEd,KACS,yBACK,oCAEd,KACS,+BACK,oCAEd,KACS,kCACK,oCAEd,KACS,uCACK,oCAEd,KACS,wCACK,oCAEd,KACS,uCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,qCACK,oCAEd,KACS,2CACK,oCAEd,KACS,qCACK,oCAEd,KACS,oCACK,qCAEb,6BAC8B,CAAC"} \ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/cv/_wml09cx4cd5ryt_r7z2tjjm0000gn/T/cf186e21758fb1277c0d72150896aaf7/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/usr/local/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"ea6fec31011beca73a677c088872f8ca\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"cb7b81b25eaa0a0a287c6ca35dd459e6\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"8ada746d21157d3d47e6ad3abbbcc3ab\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"2a45abd06dfe78e69135e9f87f9b78d3\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"9d98c920695f6c3395da4b68f723e60a\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"28ab148081b0ccd22ad2db634d538b6b\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"92e740f4f44f203bac29c4e208bf45b0\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"87d5d01385c5d0f0c4c4f5d0f3532826\"\n },\n {\n \"url\": \"js/croppie/croppie.min.css\",\n \"revision\": \"fc297c9002c79c15a132f13ee3ec427e\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"86f46f47da472498864d8b81285ab0b6\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"2ce6e99d95113e9ca6b24343cea202e0\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"6e9412c359a21b86dc7c5128bf6208d4\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"375a89b2a867264a395f384d00eeba13\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"197ed5837ed27992688fc424699a9a78\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"ec6e55011746305549024292f46270bd\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"9f62a20024e4ab1f036ab97e6b9c5e6f\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"293aa21acaf0a3349686f420b2be874a\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"4a60c6c805cab7bc782f1e52f7818d9f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"8ce5887817b32603d1dcd23a1011989d\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"c7b38b3af4eb7a58ab6dc4791216530e\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"374099e93482baae432490d9e55e4e24\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"538252ed4fed6d5e9f4e53b35954c116\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"e273a48b8e81faac4530bf1a68d75aa0\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"ff59ef2ea422e962065b978f74f1989e\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"b53a2876e65d205d42c0217216db0a0b\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"5ae6ea7a2b816b32ded88cb15651dbfc\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"f8775fef4398d0863d1c95b92f778f14\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"1a5bbe8e6e02b215c7457d9735ada682\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"d8ac61cb5b3e5d47f9ce8160c8b2f057\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"aeaa9d93c19d60a9ab385a21d57f025c\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"5e0221a99a3fdf557b5ccf72965d99b2\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"d3ad299dc8cfbd2a34479edfafce74ad\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"80761a88228f85296bfc029bf5340718\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"4544b6600298fe72d2d516fd135c54fa\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"863e0e73d4cdf95093461ef0157e13e5\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"3a47c1b462102c60e47e0f7d6e07d379\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"92c451283a83cae2d83460b1b0aaf1c4\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"c56a53dac116441fac2a6e6a110b4fcf\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"fcc968a8202ebe596bb4efa31d5c55b7\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"0c98b10b2ce7660502fab8f8a09216c0\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"550ba55018af500d82b2ade74f49d6a6\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"d9dedee9a17ce0e98cac6a641dbd1b17\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"6d6d7e768e1d255dcb9f9abf87676787\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"404b9e323e5bbbecb63ea4a58385431a\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"8c4436fda7e9278685d9d5d6e0942ae9\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"38cf52a7e23c4e8796d0cbb7ea217f7e\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"e17887d5e7057c80ec1da14fe7749c52\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"32c8349f2744c3b6023fd17742eb1c2c\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"57eba100f012d139d00543c31060cf04\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"cbb7bea7bd120272c6dfe0d6f0ca85f4\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"ca9045d8ab0d3c8448228187c8ba77cd\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"ea4948e5456ac276658b0071172dee82\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"05955be58d94abc2707dea99394a60db\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"47aa1bcdd23457cd5f3026db7a357fc9\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"5735f8afcd3fb73882147629d044e368\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"8e891bbae07ac6fbe9038e8d19fb66fd\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"ea1992800627d8e54c54d54d1078cd50\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"a158a142f848a44f4b9a86b2c71de770\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"a73fe6de8d13ff09b57022c6152de435\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a731cde706b7b10c2bb9b8b804ecf99e\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"099ff3baec465f1f42dd417d4f3d6a03\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"5fdec4aa7a49475cc6d3a8b4a2a8ce75\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"e2485ba528fffc006ddc16a2bdbba588\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"4e4dff4df4bb635eab4648a31718bb71\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"b27e8770b0fc71f51c97a80bed58ec4e\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"aa39fa602751e960c408b51bc4d1e9a3\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"a1e9ea18592a3520a564da53754435f1\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ee7f392d230f3acf9ee64e59912d2240\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"d1af4adc3abc689e2b2877348fe3a80e\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"ee11057cc33d2db3915810afa98e4fb8\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"64633496007987935476811363899867\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"b67de98cc3819f31d6aedc4a8e332d3f\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"bf3564b735dddb73bafa110e1ba4f364\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"e66e3a8530b0bda46ff6de26598a637b\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"1ea94afcd9c9383c784ceae2896c8af4\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"2ea8a953b560713a201dff1d8d3917dd\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"7a19eef01a4ee231cc05d3b3833bba4f\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"f609cb57ae40941ae6c8165f89d7aed0\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,oCAY2B,CAClC,KACS,yBACK,oCAEd,KACS,gCACK,oCAEd,KACS,8BACK,oCAEd,KACS,mCACK,oCAEd,KACS,4BACK,oCAEd,KACS,sBACK,oCAEd,KACS,qBACK,oCAEd,KACS,kCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,sCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,mCACK,oCAEd,KACS,0CACK,oCAEd,KACS,gDACK,oCAEd,KACS,oDACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kDACK,oCAEd,KACS,6CACK,oCAEd,KACS,kCACK,oCAEd,KACS,qCACK,oCAEd,KACS,kCACK,oCAEd,KACS,oDACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,yCACK,oCAEd,KACS,6CACK,oCAEd,KACS,wCACK,oCAEd,KACS,iDACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,kDACK,oCAEd,KACS,8CACK,oCAEd,KACS,2BACK,oCAEd,KACS,8CACK,oCAEd,KACS,qDACK,oCAEd,KACS,sDACK,oCAEd,KACS,+DACK,oCAEd,KACS,2EACK,oCAEd,KACS,wEACK,oCAEd,KACS,6BACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,iCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,gCACK,oCAEd,KACS,mCACK,oCAEd,KACS,gCACK,oCAEd,KACS,uBACK,oCAEd,KACS,gCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,iCACK,oCAEd,KACS,oCACK,oCAEd,KACS,2CACK,oCAEd,KACS,mCACK,oCAEd,KACS,sCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,oCACK,oCAEd,KACS,6CACK,oCAEd,KACS,6CACK,oCAEd,KACS,6BACK,oCAEd,KACS,iCACK,oCAEd,KACS,2BACK,oCAEd,KACS,+BACK,oCAEd,KACS,gCACK,oCAEd,KACS,wCACK,oCAEd,KACS,oCACK,oCAEd,KACS,mCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,kCACK,oCAEd,KACS,yCACK,oCAEd,KACS,mCACK,oCAEd,KACS,8CACK,oCAEd,KACS,yCACK,oCAEd,KACS,0CACK,oCAEd,KACS,wCACK,oCAEd,KACS,wCACK,oCAEd,KACS,+CACK,oCAEd,KACS,sCACK,oCAEd,KACS,gCACK,oCAEd,KACS,4BACK,oCAEd,KACS,2BACK,oCAEd,KACS,gCACK,oCAEd,KACS,yBACK,oCAEd,KACS,+BACK,oCAEd,KACS,kCACK,oCAEd,KACS,uCACK,oCAEd,KACS,wCACK,oCAEd,KACS,uCACK,oCAEd,KACS,uCACK,oCAEd,KACS,oCACK,oCAEd,KACS,qCACK,oCAEd,KACS,wCACK,oCAEd,KACS,qCACK,oCAEd,KACS,2CACK,oCAEd,KACS,qCACK,oCAEd,KACS,oCACK,qCAEb,6BAC8B,CAAC"} \ No newline at end of file